1

Topic: Allowing SMTP relay from local network.

Is is possible to allow an open relay from any computer on my internal network?  ie: 10.10.10.0/24   I would prefer using just plain old port 25 and no authentication as these are all just servers sending eMails mostly to people inside the company, but a few times to people outside the company.   Is this possible?

----

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

2

Re: Allowing SMTP relay from local network.

Add this ip network in 2 places should work for you:

*) Postfix /etc/postfix/main.cf, parameter "mynetworks =".
*) iRedAPD /opt/iredapd/settings.py, parameter "MYNETWORKS =" (if doesn't present, add it like below):

MYNETWORKS = ['10.10.10.0/24', '192.168.1.1']

3

Re: Allowing SMTP relay from local network.

ZhangHuangbin wrote:

Add this ip network in 2 places should work for you:

*) Postfix /etc/postfix/main.cf, parameter "mynetworks =".
*) iRedAPD /opt/iredapd/settings.py, parameter "MYNETWORKS =" (if doesn't present, add it like below):

MYNETWORKS = ['10.10.10.0/24', '192.168.1.1']

I am assuming I should add the line:
mynetowks = ['10.10.10.0/24']
but I can not find any indication of where I should be adding this line to in each file.   Or can I just add the line anywhere in the two files?

4

Re: Allowing SMTP relay from local network.

If it exists in config file, modify it. If not, add a new one at the bottom.

5

Re: Allowing SMTP relay from local network.

ZhangHuangbin wrote:

If it exists in config file, modify it. If not, add a new one at the bottom.

I added the lines in question.  But I am still getting a relay rejection:
220 mail.dbwsys.mb.ca ESMTP Postfix
ehlo
502 5.5.2 Error: command not recognized
helo
501 Syntax: HELO hostname
helo test.com
250 mail.dbwsys.mb.ca
HELO
501 Syntax: HELO hostname
EHLO
501 Syntax: EHLO hostname
MAIL FROM:gregorywest501@gmail.com
250 2.1.0 Ok
RCPT TO:kurbysmith@gmail.com
554 5.7.1 <kurbysmith@gmail.com>: Recipient address rejected: Policy rejection not logged in
^C

This is the text from a telnet session.   

This is that I have in the main.cf file:
mynetworks = 127.0.0.1 10.10.10.0/24
and in my setting.py I have:
mynetworks = ["127.0.0.1", "10.10.10.0/24"]

I tried mynetworks = ['127.0.0.1','10.10.10.0/24']
But that caused SoGo to stop being about to send out eMail.    I have also seen examples of:  mysetworks = ["127.0.0.1" , "10.10.10.0/24"]    Not quite sure what the correct syntax is.

6

Re: Allowing SMTP relay from local network.

gregorywest wrote:

I tried mynetworks = ['127.0.0.1','10.10.10.0/24']

in iRedAPD config file, /opt/iredapd/settings.py, the variable name is MYNETWORKS and upper case:

MYNETWORKS = ['127.0.0.1','10.10.10.0/24']

7

Re: Allowing SMTP relay from local network.

Is the IPv4 127 required in MYNETWORKS = ['127.0.0.1','10.10.10.0/24']

Any preferred syntax or CIDR for IPv6?