Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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:

xyz@mydomain.com is an alias to abc@mydomain.com. I authenticate using abc@mydomain.com as that is the mailbox, but I'm actually sending from the alias.

Here's an example of the session:

EHLO mydomain.com
250-SIZE 45728640
250 DSN
auth plain amlta0BhbHRlcm5hdGl2ZXJlYWxpdHkuY29tAGppbWtAY=
235 2.7.0 Authentication successful
MAIL FROM: xyz@alternativereality.com
250 2.1.0 Ok
RCPT TO: joe@gmail.com
553 5.7.1 <xyz@mydomain.com>: Sender address rejected: not owned by user abc@mydomain.com

Here's the relevant section of postfix's main.cf:

smtpd_sender_restrictions = permit_mynetworks, reject_sender_login_mismatch, permit_sasl_authenticated

Obviously the 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!

share|improve this question

2 Answers 2

up vote 2 down vote accepted

I think you're looking for smtpd_sender_login_maps where you'll need to map the logins to aliases. See the official doxumentation on smtpd_sender_login_maps.

share|improve this answer
Yes, thanks! I'm using a MySQL database for all those maps, so I had to change the default query from using mailbox to using alias table. This appear to have worked so far. Thanks again. –  FilmJ Sep 1 '09 at 23:53

create a file called /etc/postfix/sender_login_maps

which contains mapped address

xyz@mydomain.com abc@mydomain.com

edit /etc/postfix/main.cf

add below line

smtpd_sender_login_maps = hash:/etc/postfix/sender_login_maps

run cmd postmap /etc/postfix/sender_login_maps

restart postfix services

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.