mercredi 24 décembre 2014

postfix login with alias domains


I've set up a mail server with yosemite's server app which hosts my two domains, say myfirstdomain.com and myseconddomain.com where myfirstdomain.com is the canonical domain name of my server.


Assumed i have a user "peter" i can now login to IMAP with peter@myfirstdomain.com and peter@myseconddomain.com but only if i use "plain" as authentication method. It doesn't work if i use for example "MD5 Challenge Response" where i can only login with peter@myfirstdomain.com. And SMTP login doesn't accept peter@myseconddomain.com as user name at all, only peter@myfirstdomain.com.


Can somebody explain me this behaviour? And how can i achieve that i can login with both domains? (Sorry for the bad english)


UPDATE


I think i have figured out why it doesn't work: I thought that postfix will just look at the username in the login string when you authenticate what in the example above means that it will just look at "peter" and not "peter@whateverdomain.com". But that is wrong. Postfix also looks at the domain name because you could for example have two different mailboxes peter@myfirstdomain.com and peter@myseconddomain.com. If postfix wouldn't look at the domain name it wouldn't know which one of the two mailboxes you want to login to.


The graphical interface of yosemite's server app lets you create virtual aliases but not virtual mailboxes (see here for the difference). In my example above i created the virtual alias peter@myseconddomain.com of peter@myfirstdomain.com which means that all incoming mails to peter@myseconddomain.com will be forwarded to peter@myfirstdomain.com. That is what a virtual alias does. So i makes sense that i can't login with peter@myseconddomain.com because it is a virtual alias and not a virtual mailbox.


I've also made a wrong statement: I said that i can login with peter@myseconddomain.com if i use "plain" as authentication method. That was wrong. Seemed to be a mistake of my mail program.


Hope that helps ... If you have more questions on this topic you should look at postfix and dovecot authentication and how i works. You do could change the authentication system to let it work like you want it.





Aucun commentaire:

Enregistrer un commentaire