User Tools

Site Tools


wiki:mail_troubleshooting

Mail troubleshooting

Error: 554 Service unavailble, No IP queries

Apr  9 11:09:08 myhostname postfix/smtpd[11535]: disconnect from unknown[92.118.38.82]
Apr  9 11:09:10 myhostname postfix/smtpd[12679]: connect from mail2.protonmail.ch[185.70.40.22]
Apr  9 11:09:10 myhostname postfix/smtpd[12679]: NOQUEUE: reject: RCPT from mail2.protonmail.ch[185.70.40.22]: 554 5.7.1 Service unavai
lable; Client host [185.70.40.22] blocked using dbl.spamhaus.org; No IP queries, see https://www.spamhaus.org/faq/section/Spamhaus%20
DBL#279; from=<user@protonmail.com> to=<test@example.com> proto=ESMTP helo=<mail2.protonmail.ch>
Apr  9 11:09:10 myhostname postfix/smtpd[12679]: disconnect from mail2.protonmail.ch[185.70.40.22]
Apr  9 11:09:12 myhostname postfix/smtpd[10216]: connect from unknown[45.142.195.2]

/etc/postfix.conf

...
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, check_recipient_access mysql:/etc/postfix/mysql-virtual_recipient.cf, reject_rbl_client zen.spamhaus.org, reject_rbl_client dbl.spamhaus.org
...

remove “reject_rbl_client dbl.spamhaus.org” from above

postfix check
postfix reload

Error: Invalid HELO name

If you get an error like this:

  This message was created automatically by mail delivery software.
  A message that you sent could not be delivered to one or more of its
  recipients. This is a permanent error. The following address(es) failed:
    user.name@example.org
      SMTP error from remote mail server after MAIL FROM:<root@hostname.example.com> SIZE=3627:
      host example.org [<someip>]: 550 Access denied - Invalid HELO name (See RFC2821 4.1.1.1)

A python script was sending an email via exim.

Some SMTP servers require you to send a valid host name with the HELO command that also is the same as the reverse DNS of the IP address the request originates from.

To resolve this add FQDN and hostname in /etc/hosts:

  root@hostname:~# cat /etc/hosts
  <ipaddress>   subdomain.example.com subdomain # add this line
  127.0.0.1	localhost
  ::1		localhost ip6-localhost ip6-loopback
  fe00::0		ip6-localnet
  ff00::0		ip6-mcastprefix
  ff02::1		ip6-allnodes
  ff02::2		ip6-allrouters

hostname -f should now return FQDN correctly

  root@subdomain:~# hostname -f
  subdomain.example.com

Tested on

  • Debian 7 Wheezy
  • Exim version 4.80 #3 built 10-Feb-2018 15:37:27

See also

References

wiki/mail_troubleshooting.txt · Last modified: 2021/04/10 23:15 by antisa

Except where otherwise noted, content on this wiki is licensed under the following license: CC0 1.0 Universal
CC0 1.0 Universal Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki