I've recently setup postfix, dovecot, amavis and a suite of other tools using iRedMail, and I'm having difficultly authenticating to my outgoing mail server.
The issue is this:
firstname.lastname@example.org is an alias to email@example.com. I authenticate using firstname.lastname@example.org as that is the mailbox, but I'm actually sending from the alias.
Here's an example of the session:
EHLO mydomain.com 250-mx1.mymailserver.net 250-PIPELINING 250-SIZE 45728640 250-ETRN 250-STARTTLS 250-AUTH PLAIN LOGIN 250-AUTH=PLAIN LOGIN 250-ENHANCEDSTATUSCODES 250-8BITMIME 250 DSN auth plain amlta0BhbHRlcm5hdGl2ZXJlYWxpdHkuY29tAGppbWtAY= 235 2.7.0 Authentication successful MAIL FROM: email@example.com 250 2.1.0 Ok RCPT TO: firstname.lastname@example.org 553 5.7.1 <email@example.com>: Sender address rejected: not owned by user firstname.lastname@example.org QUIT
Here's the relevant section of postfix's main.cf:
smtpd_sender_restrictions = permit_mynetworks, reject_sender_login_mismatch, permit_sasl_authenticated
reject_sender_login_mismatch is the issue. I would actually prefer to keep this functionality but support aliases.
Can this be done, and/or is there a way to authenticate as the alias?
Thanks in advance!