0

I am trying leverage Postfix as an SMTP relayer on a Raspberry Pi to allow other systems on my network to email outbound system messages. It appears there are two problems, (1) it's not authenticating as the specified user and (2) it appears to be trying deliver the email message to a localmail box on the remote server as depicted here:

550-Verification failed for 550-The mail server could not deliver mail to root@unifipi

mail.log

Jan 10 21:43:47 UniFiPi postfix/master[28775]: reload -- version 2.11.3, configuration /etc/postfix
Jan 10 21:43:50 UniFiPi postfix/pickup[786]: 31D8C3F9F5: uid=0 from=<root@UniFiPi>
Jan 10 21:43:50 UniFiPi postfix/cleanup[793]: 31D8C3F9F5: message-id=<20170111024350.31D8C3F9F5@unifipi.home.lan>
Jan 10 21:43:50 UniFiPi postfix/qmgr[785]: 31D8C3F9F5: from=<root@UniFiPi>, size=383, nrcpt=1 (queue active)
Jan 10 21:43:51 UniFiPi postfix/smtp[795]: 31D8C3F9F5: to=<johndoe@outlook.com>, relay=mail.mydomain.com[170.75.252.58]:587, delay=1, delays=0.08/0.08/0.67/0.22, dsn=5.0.0, status=bounced (host mail.mydomain.com[170.75.252.58] said: 550-Verification failed for <root@UniFiPi> 550-The mail server could not deliver mail to root@unifipi.  The account or domain may not exist, they may be blacklisted, or missing the proper dns entries. 550 Sender verify failed (in reply to RCPT TO command))
Jan 10 21:43:51 UniFiPi postfix/cleanup[793]: 412C53F9F6: message-id=<20170111024351.412C53F9F6@unifipi.home.lan>
Jan 10 21:43:51 UniFiPi postfix/bounce[797]: 31D8C3F9F5: sender non-delivery notification: 412C53F9F6
Jan 10 21:43:51 UniFiPi postfix/qmgr[785]: 412C53F9F6: from=<>, size=2640, nrcpt=1 (queue active)
Jan 10 21:43:51 UniFiPi postfix/qmgr[785]: 31D8C3F9F5: removed
Jan 10 21:43:52 UniFiPi postfix/smtp[795]: 412C53F9F6: to=<root@UniFiPi>, relay=mail.mydomain.com[170.75.252.58]:587, delay=0.75, delays=0.02/0/0.51/0.22, dsn=2.0.0, status=sent (250 OK id=1cR8tC-003Asy-Tc)
Jan 10 21:43:52 UniFiPi postfix/qmgr[785]: 412C53F9F6: removed

main.cf

smtpd_banner = $myhostname ESMTP $mail_name (Raspbian)
biff = no
append_dot_mydomain = no
readme_directory = no
myhostname = unifipi.home.lan
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = static:user@mydomain.com:password
smtp_sasl_security_options = noanonymous
smtp_sasl_tls_security_options = noanonymous
smtp_tls_security_level = encrypt
smtp_use_tls = yes
header_size_limit = 4096000
relayhost = [mail.mydomain.com]:587
inet_interfaces = all
inet_protocols = all

Any help would be most appreciated! Thanks!

tkrn
  • 159
  • 1
  • 9

1 Answers1

1

You must rewrite your source to be the same as your sasl auth user.

From name can be whatever, if this isn't what you want or you are allowed to impersonate with that account then use a valid from address

See https://serverfault.com/a/674984/200560

Jacob Evans
  • 7,636
  • 3
  • 25
  • 55