2

My server is using Centos 6.5 I updated from Plesk 11.5 to 12 last week and postfix to 2.8.17. Since then, all mails sent using the sendmail binary (notifications, mail forwards...) are being rejected with a wrong HELO hostname: localhost. It seems that sendmail is using locahost as a HELO tag which is not accepted.

Thank you in advance for your help

Here is the following error:

Jun 23 14:23:20 ns395167 plesk sendmail[29817]: handlers_stderr: SKIP
Jun 23 14:23:20 ns395167 plesk sendmail[29817]: SKIP during call 'check-quota' handler
Jun 23 14:23:20 ns395167 postfix/pickup[29480]: B94BC6AA20A6: uid=0 from=<[email protected]>
Jun 23 14:23:20 ns395167 postfix/cleanup[29507]: B94BC6AA20A6: message-id=<[email protected]>
Jun 23 14:23:20 ns395167 greylisting filter[29824]: Starting greylisting filter...
Jun 23 14:23:20 ns395167 greylisting filter[29824]: Wrong HELO hostname: localhost
Jun 23 14:23:20 ns395167 /usr/lib64/plesk-9.0/psa-pc-remote[29457]: handlers_stderr: REJECT
Jun 23 14:23:20 ns395167 /usr/lib64/plesk-9.0/psa-pc-remote[29457]: REJECT during call 'grey' handler
Jun 23 14:23:20 ns395167 /usr/lib64/plesk-9.0/psa-pc-remote[29457]: Message aborted.
Jun 23 14:23:20 ns395167 postfix/cleanup[29507]: B94BC6AA20A6: milter-reject: DATA from localhost[127.0.0.1]: 5.7.1 Command rejected; from=<[email protected]> to=<[email protected]>
Jun 23 14:23:20 ns395167 postfix/cleanup[29507]: B94BC6AA20A6: to=<[email protected]>, orig_to=<[email protected]>, relay=none, delay=0.12, delays=0.12/0/0/0, dsn=5.7.1, status=bounced (Command rejected)
Jun 23 14:23:20 ns395167 postfix/cleanup[29502]: C594B6AA20A8: message-id=<[email protected]>
Jun 23 14:23:20 ns395167 postfix/bounce[29506]: B94BC6AA20A6: sender non-delivery notification: C594B6AA20A8
Jun 23 14:23:20 ns395167 postfix/qmgr[29481]: C594B6AA20A8: from=<>, size=2211, nrcpt=1 (queue active)
Jun 23 14:23:20 ns395167 postfix/cleanup[29502]: CFFE56AA2094: message-id=<[email protected]>
Jun 23 14:23:20 ns395167 postfix/local[29721]: C594B6AA20A8: to=<[email protected]>, orig_to=<[email protected]>, relay=local, delay=0.08, delays=0.04/0/0/0.04, dsn=2.0.0, status=sent (forwarded as CFFE56AA2094)
Jun 23 14:23:20 ns395167 postfix/qmgr[29481]: CFFE56AA2094: from=<>, size=2361, nrcpt=1 (queue active)
Jun 23 14:23:20 ns395167 postfix/qmgr[29481]: C594B6AA20A8: removed
Jun 23 14:23:20 ns395167 postfix-local[29825]: postfix-local: from=MAILER-DAEMON, [email protected], dirname=/var/qmail/mailnames
Jun 23 14:23:20 ns395167 postfix-local[29825]: Unable to get sender domain by sender mailname
Jun 23 14:23:20 ns395167 dk_check[29826]: DK_STAT_NOSIG: No signature available in message
Jun 23 14:23:20 ns395167 postfix-local[29825]: handlers_stderr: PASS
Jun 23 14:23:20 ns395167 postfix-local[29825]: PASS during call 'dd52-domainkeys' handler
Jun 23 14:23:20 ns395167 postfix/pipe[29508]: CFFE56AA2094: to=<[email protected]>, orig_to=<[email protected]>, relay=plesk_virtual, delay=0.1, delays=0.04/0/0/0.06, dsn=2.0.0, status=sent (delivered via plesk_virtual service)
Jun 23 14:23:20 ns395167 postfix/qmgr[29481]: CFFE56AA2094: removed

Here is my postconf -n content:

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases, hash:/var/spool/postfix/plesk/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
disable_vrfy_command = yes
html_directory = no
inet_interfaces = all
inet_protocols = all
mail_owner = postfix
mailbox_size_limit = 0
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
message_size_limit = 10240000
mydestination = localhost.$mydomain, localhost, localhost.localdomain
myhostname = ns395167.ip-176-31-117.eu
mynetworks = 127.0.0.0/8 [::1]/128 176.31.117.106/32 [2001:41d0:8:3c6a::1]/128, 50.57.69.12/32
newaliases_path = /usr/bin/newaliases.postfix
non_smtpd_milters = inet:127.0.0.1:12768 unix:/var/spool/postfix/ctmilter/ctmilter.sock
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.8.17/README_FILES
sample_directory = /usr/share/doc/postfix-2.8.17/samples
sender_dependent_default_transport_maps = hash:/var/spool/postfix/plesk/sdd_transport_maps
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtp_send_xforward_command = yes
smtp_tls_security_level = may
smtp_use_tls = no
smtpd_authorized_xforward_hosts = 127.0.0.0/8 [::1]/128
smtpd_client_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_rbl_client xbl.spamhaus.org, reject_rbl_client b.barracudacentral.org
smtpd_milters = inet:127.0.0.1:12768 unix:/var/spool/postfix/ctmilter/ctmilter.sock
smtpd_proxy_timeout = 3600s
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sender_restrictions = check_sender_access hash:/var/spool/postfix/plesk/blacklists, permit_sasl_authenticated
smtpd_timeout = 3600s
smtpd_tls_cert_file = /etc/postfix/postfix_default.pem
smtpd_tls_key_file = $smtpd_tls_cert_file
smtpd_tls_security_level = may
smtpd_use_tls = yes
transport_maps = , hash:/var/spool/postfix/plesk/transport
unknown_local_recipient_reject_code = 550
virtual_alias_maps = $virtual_maps, hash:/var/spool/postfix/plesk/virtual
virtual_gid_maps = static:31
virtual_mailbox_base = /var/qmail/mailnames
virtual_mailbox_domains = $virtual_mailbox_maps, hash:/var/spool/postfix/plesk/virtual_domains
virtual_mailbox_limit = 0
virtual_mailbox_maps = , hash:/var/spool/postfix/plesk/vmailbox
virtual_transport = plesk_virtual
virtual_uid_maps = static:30

My system hostname seems correct: hostname -f ns395167.ip-176-31-117.eu hostname ns395167.ip-176-31-117.eu

3 Answers 3

1

Those action are expected behavior of postfix. Here the snippet from this page from official documentation.

There's one small complication when using Milter applications for non-SMTP mail: there is no SMTP session. To keep Milter applications happy, the Postfix cleanup(8) server actually has to simulate the SMTP client CONNECT and DISCONNECT events, and the SMTP client EHLO, MAIL FROM, RCPT TO and DATA commands.

When new mail arrives via the sendmail(1) command line, the Postfix cleanup(8) server pretends that the mail arrives with ESMTP from "localhost" with IP address "127.0.0.1". The result is very similar to what happens with command line submissions in Sendmail version 8.12 and later, although Sendmail uses a different mechanism to achieve this result.

Looking in the logs and output of postconf -n, its clear that the process who reject it was milter application running via inet:127.0.0.1:12768. It's psa-pc-remote milter provided by Plesk.

While I don't have any experience with Plesk, some workaround is turn off that milter for non_smtpd only. Well, I don't know this is bad or good advice because I don't know what psa-pc-remote do to your email. Another way, you can look some setting in Plesk to turn off this kind of rejection.

4
  • I better understand why all my attempts to adjust postfix config failed. Now I will post a request on Plesk forum and at the same time try to investigate your two advises.
    – curuba
    Jun 23, 2014 at 15:06
  • I have commented the line in main.cf and now mails sent from sendmail are working fine again. I don't know what will be the side effects, but anyway not having sendmail functionality when hosting sites is not acceptable. I have posted a question on Plesk forum here goo.gl/7CH5l1 Thank you again for your quick and efficient reply. I highly appreciate your expertise and your help.
    – curuba
    Jun 23, 2014 at 15:32
  • In the future, if you get better answer from Plesk forum, please (1) edit my answer for alternative solution or (2) you can post that with your own answer.
    – masegaloeh
    Jun 24, 2014 at 1:58
  • Sure I will. For now, Plesk team is not providing any satisfying answer.
    – curuba
    Jun 25, 2014 at 17:08
1

For me it was a solution to comment out the following line in /etc/postfix/main.cf:

non_smtpd_milters
1
  • masegaloeh answer has explicitly said the same solution as yours :) ---> While I don't have any experience with Plesk, some workaround is turn off that milter for non_smtpd only.
    – tpml7
    Jan 15, 2015 at 14:56
-4

Try setting milter_protocol=2 in postfix/main.cf.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .