0

I have 3 domains hosted on a remote server, but I am using other postfix server for SMTP only. So, I have two servers:

  • mail.domain1.com - remote mail server, storing mailboxes and used for IMAP
  • smtp.domain1.com - local postfix server, used only for SMTP

External email appears to be good, but internal e-mail is not working (e.g. [email protected] to [email protected]). I have an excerpt of my logs and my main.cnf. ANY help or advice would be greatly appreciated.

IP/domains redacted for obvious reasons, but can be provided if necessary.

Working example of external email:

Jul 20 17:16:35 smtp postfix/smtpd[12808]: warning: hostname mail.domain1.com does not resolve to address REMOTE IP (NO IDEA why this appears, yet the email sends fine)
Jul 20 17:16:35 smtp postfix/smtpd[12808]: connect from unknown[REMOTE IP]
Jul 20 17:16:35 smtp postfix/smtpd[12808]: A42EDD4323: client=unknown[REMOTE IP]
Jul 20 17:16:35 smtp postfix/cleanup[12811]: A42EDD4323: message-id=<[email protected]>
Jul 20 17:16:35 smtp postfix/qmgr[12792]: A42EDD4323: from=<[email protected]>, size=579, nrcpt=1 (queue active)
Jul 20 17:16:35 smtp postfix/smtpd[12808]: disconnect from unknown[REMOTE IP]
Jul 20 17:16:36 smtp postfix/smtp[12812]: A42EDD4323: to=<[email protected]>, relay=mta7.am0.yahoodns.net[63.250.192.46]:25, delay=1.2, delays=0.04/0/0.21/0.98, dsn=2.0.0, status=sent (250 ok dirdel)
Jul 20 17:16:36 smtp postfix/qmgr[12792]: A42EDD4323: removed

What doesn't work, internal email:

Jul 20 17:15:32 smtp postfix/master[12787]: daemon started -- version 2.9.6, configuration /etc/postfix
Jul 20 17:15:55 smtp postfix/smtpd[12808]: connect from mail.domain1.com[REMOTE IP]
Jul 20 17:15:55 smtp postfix/smtpd[12808]: A61FAD4323: client=mail.domain1.com[REMOTE IP]
Jul 20 17:15:55 smtp postfix/cleanup[12811]: A61FAD4323: message-id=<[email protected]>
Jul 20 17:15:55 smtp postfix/qmgr[12792]: A61FAD4323: from=<[email protected]>, size=1232, nrcpt=1 (queue active)
Jul 20 17:15:55 smtp postfix/smtpd[12808]: disconnect from mail.domain1.com[REMOTE IP]
Jul 20 17:15:55 smtp postfix/smtp[12812]: A61FAD4323: to=<[email protected]>, relay=mail.domain1.com[REMOTE IP]:25, delay=0.08, delays=0.05/0/0.01/0.02, dsn=5.0.0, status=bounced (host mail.domain1.com[REMOTE IP] said: 530 SMTP authentication is required. (in reply to RCPT TO command))
Jul 20 17:15:55 smtp postfix/cleanup[12811]: B8757D4327: message-id=<[email protected]>
Jul 20 17:15:55 smtp postfix/qmgr[12792]: B8757D4327: from=<>, size=3274, nrcpt=1 (queue active)
Jul 20 17:15:55 smtp postfix/bounce[12813]: A61FAD4323: sender non-delivery notification: B8757D4327
Jul 20 17:15:55 smtp postfix/qmgr[12792]: A61FAD4323: removed
Jul 20 17:15:55 smtp postfix/local[12814]: B8757D4327: to=<[email protected]>, relay=local, delay=0.01, delays=0/0/0/0, dsn=5.1.1, status=bounced (unknown user: "ez-proposal")
Jul 20 17:15:55 smtp postfix/qmgr[12792]: B8757D4327: removed

My main.cf

myhostname = smtp.domain1.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = smtp.domain1.com, localhost.domain1.com, domain2.com, localhost
relayhost =
mynetworks = 127.0.0.0/8 [REMOTE IP]/32 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
smtp_host_lookup = native
6
  • You cut off some of your log entries on the right Jul 20, 2015 at 17:34
  • Just fixed that! Jul 20, 2015 at 17:57
  • 1
    Do you have SASL enabled and configured? It looks like you haven't done that. Or don't you want use it?
    – sebix
    Jul 20, 2015 at 20:01
  • No I do not... and i'm not certain how to do that either. Jul 20, 2015 at 22:23
  • Did you have admin access in mail.domain1.com? Perhaps the problem lies in the remote server, not in your postfix server.
    – masegaloeh
    Jul 21, 2015 at 9:07

2 Answers 2

1

From the error message

Jul 20 17:15:55 smtp postfix/smtp[12812]: A61FAD4323: to=<[email protected]>, relay=mail.domain1.com[REMOTE IP]:25, delay=0.08, delays=0.05/0/0.01/0.02, dsn=5.0.0, status=bounced (host mail.domain1.com[REMOTE IP] said: 530 SMTP authentication is required. (in reply to RCPT TO command))

looks like your remote server use hMailServer.

Digging into its documentation, here the explanation of the error and its solution.

530 SMTP authentication is required.

You have enabled SMTP authentication for the IP range that the user is connecting from, but the user has not configured his client to use SMTP authentication. There's two ways to solve this problem. Either configure your email client to use SMTP authentication. This setting is normally found in the account settings in your email client. Or, disable SMTP authentication for the IP range. The first solution is recommended since it reduces the risk that anyone will send spam through your server.

By default, hMailServer does not require SMTP authentication for connections coming from localhost / 127.0.0.1. For connections coming from other hosts, SMTP authentication is required for deliveries to external recipients. By default, hMailServer never requires SMTP authentication for deliveries to local accounts, since that would prevent other e-mail servers to deliver email to your installation. For information on how to enable SMTP authentication, check the HOWTO.

If you are using a Cisco router, you may need to disable SMTP Fixup protocol. If this is enabled, the router will sometimes intercept SMTP traffic and replace data in it before it reaches hMailServer which will cause problems.

2
  • Yes, however the SMTP is not being handled by hmail - it is being handled by postfix. Hmail is configured to relay mail to the remote postfix server... mail to external domains work fine, but fails for the internal domains (domain1, domain2, domain3, etc). Jul 21, 2015 at 11:48
  • From the log, postfix already ACCEPTED the email from mail.domain1.com. Because the recipient was [email protected], postfix relay it back to mail.domain1.com. Unfortunately, hMailServer in mail.domain1.com rejected it with above error.
    – masegaloeh
    Jul 21, 2015 at 13:02
-1
host mail.domain1.com[REMOTE IP] said: 530 SMTP authentication is required. (in reply to RCPT TO command)

It looks like you're not authorizing local users to send mail.

Do you have any setting for "smtpd_relay_restrictions" in main.cf? I use

smtpd_relay_restrictions = permit_sasl_authenticated, reject_unauth_destination

Postfix SMTPd Relay Restrictions Documentation

Also, have you tried increasing log verbosity in master.cf? Adding the -v flag like this would help:

submission  inet  n       -       n       -       -       smtpd -v

And of course :

#postfix reload
3
  • I added that smtpd_relay_restrictions line in and got this on reload: " Reloading Postfix configuration.../usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: smtpd_relay_restrictions=permit_sasl_authenticated, reject_unauth_destination done." Jul 20, 2015 at 18:28
  • For my setup I'm using sasl authentication but it doesn't sound like you are. I think you should set the -v flag and send a message then check the logs in /var/maillog or wherever you have it setup for the bounce. Try grepping for the message identifier ( like A61FAD4323 in your example) and watch the whole transaction.
    – red_shift
    Jul 20, 2015 at 18:52
  • Does it matter that this only occurs with the domains i've chose to relay outgoing mail for? I added a "relay_domains" parameter to my cf file with those three domains listed and the same problem exists Jul 21, 2015 at 11:49

You must log in to answer this question.

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