1

I have an alias on my mail server, call it splitusers.

Based on which domain (a couple are run off one mail server) is used, I would like the mail forwarded to a different user account.

Eg:

splitusers@first.tld should forward to firstuser@first.tld
splitusers@second.tld should forward to seconduser@second.tld

How can I accomplish this? Is procmail the right approach? If so, what would the recipe look like?

  • 1
    Which mail server are you running? How is it configured? – derobert Apr 22 '14 at 22:08
  • @derobert - postfix .. not sure what you mean by "how is it configured" – warren Apr 23 '14 at 19:28
1

Procmail can be used to do this, but will need and Envelope-to header added by the MDA.

It may be simpler to setup virtual domain aliases in the mail server. Exim4 supports different aliases for different domains, but needs some setup to do so. I would expect this capability from Postfix and Sendmail as well, although I haven't multiple domains with them.

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.