I've installed postfix and opendkim on my ubuntu server, intending to use this server as a private relay for an application to send "activation" emails to new users. I configured SASL authentication with dovecot-commons to protect it.
I did a test using the following method:
echo "Email Body" | mail -s "Subject" em@il.com
and used mail-tester.com to verify my configuration and SPF/DMARC records are working correctly. I also used telnet to test, connecting to the SMTP socket and filling in my own username in the MAIL FROM
field. This was also successful.
I then set up a new user account on the server and tested sending as that new user. This was when nothing worked. Both the mail command and telnet methods will report success without errors, but the email will never reach the recipient. I tested using an identical set of subject and message body, sent to the same external email address. The logs do not indicate any errors and look equally successful.
Are there any pre-requisites for a user account to be able to use postfix + dovecot?
Log Entry for Attempt using Old User Account
Nov 24 21:09:42 host postfix/pickup[21809]: D816C20CC7: uid=1000 from=<old_user_account@domain>
Nov 24 21:09:42 host postfix/cleanup[21918]: D816C20CC7: message-id=<20151124130942.D816C20CC7@mail.domain>
Nov 24 21:09:42 host opendkim[21821]: D816C20CC7: DKIM-Signature field added (s=mail, d=domain)
Nov 24 21:09:42 host postfix/qmgr[21810]: D816C20CC7: from=<old_user_account@domain>, size=368, nrcpt=1 (queue active)
Nov 24 21:09:45 host postfix/smtp[21929]: D816C20CC7: to=<external.em@il.com>, relay=mx2.hotmail.com[65.54.188.72]:25, delay=2.6, delays=0.05/0.01/1.6/0.92, dsn=2.0.0, status=sent (250 <20151124130942.D816C20CC7@mail.domain> Queued mail for delivery)
Nov 24 21:09:45 host postfix/qmgr[21810]: D816C20CC7: removed
Log Entry for Attempt using New User Account
Nov 24 21:10:36 host postfix/pickup[21809]: 72A4C20CC7: uid=1002 from=<new_user_account@domain>
Nov 24 21:10:36 host postfix/cleanup[21918]: 72A4C20CC7: message-id=<20151124131036.72A4C20CC7@mail.domain>
Nov 24 21:10:36 host opendkim[21821]: 72A4C20CC7: DKIM-Signature field added (s=mail, d=domain)
Nov 24 21:10:36 host postfix/qmgr[21810]: 72A4C20CC7: from=<new_user_account@domain>, size=371, nrcpt=1 (queue active)
Nov 24 21:10:39 host postfix/smtp[21929]: 72A4C20CC7: to=<external.em@il.com>, relay=mx2.hotmail.com[65.55.33.135]:25, delay=3.3, delays=0.06/0/1.7/1.5, dsn=2.0.0, status=sent (250 <20151124131036.72A4C20CC7@mail.domain> Queued mail for delivery)
Nov 24 21:10:39 host postfix/qmgr[21810]: 72A4C20CC7: removed