1

Topic: MyNetworks in main.cf vs Settings.py

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release):
- Deployed with iRedMail Easy or the downloadable installer?
- Linux/BSD distribution name and version:
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):
- Web server (Apache or Nginx):
- Manage mail accounts with iRedAdmin-Pro?
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

Hello,
I've got a web server out on one network which is attempting to send e-mail to an iRedMail system and being declined. 

I tried adding to the GUI in whitelist of the iRedMail server but email is not getting through. 

I suspect that the IP of the web hosting machine should be put into the MyNetworks value in /etc/postfix/main.cf
where I found this stanza


# trusted SMTP clients which are allowed to relay mail through Postfix.
#
# Note: additional IP addresses/networks listed in mynetworks should be listed
#       in iRedAPD setting 'MYNETWORKS' (in `/opt/iredapd/settings.py`) too.
#       for example:
#
#       MYNETWORKS = ['xx.xx.xx.xx', 'xx.xx.xx.0/24', ...]
#
mynetworks = 127.0.0.1 [::1]


Does the IP of the web host machine have to be inserted into both fields?  I do not recall this being the case previously and just want to make sure that the statement to do such is not old or incorrect? 

Thank you for the feedback/answer!

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: MyNetworks in main.cf vs Settings.py

The best choice is enabling SMTP authentication on any mail client which needs to send email through your server, no modification required on your server.

3

Re: MyNetworks in main.cf vs Settings.py

ZhangHuangbin wrote:

The best choice is enabling SMTP authentication on any mail client which needs to send email through your server, no modification required on your server.

Can you elaborate on what you mean by "enabling SMTP authentication?"  For example, do you mean that the web server should be using some code which which connects just like an email client?

Regarding the GUI whitelist, is it just for whitelisting (stopping) the greylisting process on the IP added or are there additional consequences when putting the IP into the GUI (e.g. bypasses Spam processing)?

4

Re: MyNetworks in main.cf vs Settings.py

pbf343 wrote:

I've got a web server out on one network which is attempting to send e-mail to an iRedMail system and being declined. 

Just enable SMTP authentication in your web application to send email, no changes required to Postfix or iRedAPD. Do not make it complex.