1 (edited by aarango 2017-01-20 14:14:03)

Topic: Accept emails from tester server

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.4
- Linux/BSD distribution name and version:  Ubuntu 14
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):  LDAP
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro?
- Related log if you're reporting an issue:
====

Hi,

I am installing a monitoring server. I installed Nagios and I'm trying to send emails through that server.  If I sent it to my gmail account I receive correctly but if I send to iredmail server I receive this:

Jan 16 12:37:12 squid postfix/smtp[2028]: DFD6B20018: to=<sistemas@XXX.com>, relay=mail.XXX.com[2.139.XX.XX]:25, delay=0.21, delays=0.04/0.01/0.13/0.03, dsn=5.7.1, status=bounced (host mail.xxx.com[2.139.XX.XX] said: 554 5.7.1 <localhost.localdomain>: Helo command rejected: ACCESS DENIED. Your email was rejected because the sending mail server does not identify itself correctly (localhost.localdomain) (in reply to RCPT TO command))

I changed on monitoring server hosts and hostname like this (I could use any name but I put that):
127.0.1.1    squid.com

squid@squid:~$ hostname
squid.com

Note: I tried that:
root@mail:/opt/iredapd/plugins# python amavisd_wblist.py --add --blacklist 192.168.88.XX nagios@squid.com
Traceback (most recent call last):
  File "amavisd_wblist.py", line 45, in <module>
    from libs.logger import logger
ImportError: No module named libs.logger

I would like to know how I could add a "white list" for that IP, domain, or email account.
I don't know why server is taking localhost.localdomain if I changed on hosts and hostname.

Any idea?

Thanks.

----

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

2

Re: Accept emails from tester server

aarango wrote:

Jan 16 12:37:12 squid postfix/smtp[2028]: DFD6B20018: to=<sistemas@XXX.com>, relay=mail.XXX.com[2.139.XX.XX]:25, delay=0.21, delays=0.04/0.01/0.13/0.03, dsn=5.7.1, status=bounced (host mail.aeorum.com[2.139.XX.XX] said: 554 5.7.1 <localhost.localdomain>: Helo command rejected: ACCESS DENIED. Your email was rejected because the sending mail server does not identify itself correctly (localhost.localdomain) (in reply to RCPT TO command))

It's clear in the error message, your server hostname should be changed, "localhost.localdomain" is not a valid domain.

Also, as this is just a testing server, you can try to add its IP to Postfix parameter "mynetworks =" (/etc/postfix/main.cf) on iRedMail server.

3 (edited by aarango 2017-01-20 14:14:20)

Re: Accept emails from tester server

ZhangHuangbin wrote:
aarango wrote:

Jan 16 12:37:12 squid postfix/smtp[2028]: DFD6B20018: to=<sistemas@XXX.com>, relay=mail.XXX.com[2.139.XX.XX]:25, delay=0.21, delays=0.04/0.01/0.13/0.03, dsn=5.7.1, status=bounced (host mail.xxx.com[2.139.XX.XX] said: 554 5.7.1 <localhost.localdomain>: Helo command rejected: ACCESS DENIED. Your email was rejected because the sending mail server does not identify itself correctly (localhost.localdomain) (in reply to RCPT TO command))

It's clear in the error message, your server hostname should be changed, "localhost.localdomain" is not a valid domain.

Also, as this is just a testing server, you can try to add its IP to Postfix parameter "mynetworks =" (/etc/postfix/main.cf) on iRedMail server.

Thanks Zhang, but I changed hostname on tester server

squid@squid:~$ hostname
squid.com

Why is it taking old name yet? I added my test IP to mynetwork but it is showing same fail on iRedmail logs.

Thanks.

4

Re: Accept emails from tester server

aarango wrote:

but I changed hostname on tester server
squid@squid:~$ hostname
squid.com

Maybe try rebooting test server?

If your test server is running Postfix as MTA, check its parameter "smtp_helo_name" in /etc/postfix/main.cf.

5

Re: Accept emails from tester server

ZhangHuangbin wrote:
aarango wrote:

but I changed hostname on tester server
squid@squid:~$ hostname
squid.com

Maybe try rebooting test server?

If your test server is running Postfix as MTA, check its parameter "smtp_helo_name" in /etc/postfix/main.cf.

No, I rebooted server and same, in any site nagios is taking old hostname (localhost.localdomain)

Jan 20 07:08:48 squid postfix/qmgr[1948]: 9B58A21052: from=<nagios@squid.com>, size=562, nrcpt=1 (queue active)
Jan 20 07:08:48 squid postfix/smtp[1951]: 9B58A21052: to=<sistemas@xxx.com>, relay=mail.xxx.com[2.139.xxx.xx]:25, delay=0.17, delays=0.01/0/0.16/0, dsn=5.7.1, status=bounced (host mail.xxx.com[2.139.xxx.xx] said: 554 5.7.1 <localhost.localdomain>: Helo command rejected: ACCESS DENIED. Your email was rejected because the sending mail server does not identify itself correctly (localhost.localdomain) (in reply to RCPT TO command))
Jan 20 07:08:48 squid postfix/cleanup[1949]: C56ED21053: message-id=<20170120060848.C56ED21053@localhost.localdomain>
Jan 20 07:08:48 squid postfix/qmgr[1948]: C56ED21053: from=<>, size=2830, nrcpt=1 (queue active)
Jan 20 07:08:48 squid postfix/bounce[2227]: 9B58A21052: sender non-delivery notification: C56ED21053
Jan 20 07:08:48 squid postfix/qmgr[1948]: 9B58A21052: removed
Jan 20 07:08:50 squid postfix/smtp[1951]: C56ED21053: to=<nagios@squid.com>, relay=squid.com[173.236.190.97]:25, delay=1.4, delays=0/0/1.3/0.13, dsn=5.7.1, status=bounced (host squid.com[173.236.190.97] said: 554 5.7.1 <nagios@squid.com>: Recipient address rejected: Access denied (in reply to RCPT TO command))

6

Re: Accept emails from tester server

If your test server is running Postfix as MTA, check its parameter "smtp_helo_name" in /etc/postfix/main.cf.

Also, check this tutorial if you missed some config files to change server hostname:
http://www.iredmail.org/docs/change.ser … tname.html

7

Re: Accept emails from tester server

ZhangHuangbin wrote:

If your test server is running Postfix as MTA, check its parameter "smtp_helo_name" in /etc/postfix/main.cf.

Also, check this tutorial if you missed some config files to change server hostname:
http://www.iredmail.org/docs/change.ser … tname.html

Fixed! in main.cf I had a line with localdomain. Thanks!