1

Topic: Allow user to send email without smtp authentication

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.6
- Linux/BSD distribution name and version:  Ubuntu 16.04
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): mySQL
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====
Sorry to revisit this, but I am failing to get this to work. I followed your link from my other thread (http://www.iredmail.org/docs/allow.user … ation.html)
but I still cannot get it to work.

Here is what I did

1 - created /etc/postfix/accepted_unauth_senders with a single entry as follows
172.16.1.10 OK

2 - ran postmap hash:/etc/postfix/accepted_unauth_senders

3 - modified /etc/postfix/main.cf as below
# Sender restrictions
smtpd_sender_restrictions =
    check_sender_access hash:/etc/postfix/accepted_unauth_senders
    reject_unknown_sender_domain
    reject_non_fqdn_sender
   ... etc ...

4 - restarted /etc/init.d/postfix restart (got OK response)

5 - modified /opt/iredapd/settings.py as below
############################################################
# DO NOT TOUCH BELOW LINE.
#
# Import default settings.
# You can always override default settings by placing custom settings in this
# file.
from libs.default_settings import *
############################################################

# Override for local network devices to send emails
# example line MYNETWORKS = ['192.168.0.1', '192.168.1.0/24']
MYNETWORKS = ['172.16.1.10']

# Listen address and port.
listen_address = "127.0.0.1"
listen_port = "7777"
... etc ...

6 - restarted the whole machine.

7 - opened the network device mailer config screen and did a test connection which returned
'Test e-mail failed; SMTP configuration error.'

What am I doing wrong?

Thanks again for your help

----

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

2

Re: Allow user to send email without smtp authentication

Any related log in Postfix log file?

3 (edited by chc-pr 2017-06-29 18:07:44)

Re: Allow user to send email without smtp authentication

ZhangHuangbin wrote:

Any related log in Postfix log file?

extracted from /var/log/mail.log

Jun 29 11:00:41 mail2 postfix/postscreen[22112]: CONNECT from [172.16.1.10]:39275 to [172.16.1.42]:25
Jun 29 11:00:43 mail2 postfix/postscreen[22112]: PASS OLD [172.16.1.10]:39275
Jun 29 11:00:43 mail2 postfix/smtpd[22115]: connect from UPS.pchmt.net[172.16.1.10]
Jun 29 11:00:43 mail2 postfix/smtpd[22115]: NOQUEUE: reject: RCPT from UPS.pchmt.net[172.16.1.10]: 504 5.5.2 <ups>: Helo command rejected: need fully-qualified hostname; from=<ups@pchmt.net> to=<usr@pchmt.net> proto=ESMTP helo=<ups>
Jun 29 11:00:43 mail2 postfix/smtpd[22115]: lost connection after RCPT from UPS.pchmt.net[172.16.1.10]
Jun 29 11:00:43 mail2 postfix/smtpd[22115]: disconnect from UPS.pchmt.net[172.16.1.10] ehlo=1 mail=1 rcpt=0/1 commands=2/3

4

Re: Allow user to send email without smtp authentication

Oops, you need a fix for improper Postfix setting. It's mentioned in upgrade tutorial for upcoming iRedMail-0.9.7:
http://www.iredmail.org/docs/upgrade.ir … tion-rules

After you fixed it, please whitelist this HELO hostname "ups" in /etc/postfix/helo_access.pcre like this:

/^ups$/ OK

5

Re: Allow user to send email without smtp authentication

ZhangHuangbin wrote:

Oops, you need a fix for improper Postfix setting. It's mentioned in upgrade tutorial for upcoming iRedMail-0.9.7:
http://www.iredmail.org/docs/upgrade.ir … tion-rules

After you fixed it, please whitelist this HELO hostname "ups" in /etc/postfix/helo_access.pcre like this:

/^ups$/ OK

Brilliant.  All working now.  Thanks ...