4

My mailserver is known by 3 different domains, e.g. mail.local, mail.foo.example.com, mail.bar.example.com. I want delivery to be the same no matter which address was chosen. Ideally I want dovecot to put user@mail.any.of.those into the user mailbox, i.e. not into user@some.domain.

I'm not even sure, if this is to be solved by some alias maps in postfix, or by settings in dovecot.

What I do currently is:

# main.cf
virtual_transport = dovecot
virtual_mailbox_domains= mail.local, mail.foo.example.com, mail.bar.example.com
dovecot_destination_recipient_limit = 1 

# master.cf
dovecot   unix  -       n       n       -       -       pipe
  flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/dovecot-lda -f ${sender} -d ${user} -a ${recipient}

But this puts mail for user@mail.local into MAILDIR/user@mail.local/Maildir/new

1

As it seems dovecot-lda can do the trick using the -a argument:

dovecot   unix  -       n       n       -       -       pipe
  flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/dovecot-lda -f ${sender} -d ${user} -a ${user}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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