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 thought I understood "Alias domains" as that it's simply an alias for another domain! So when I set up a mailbox like "info@main.com", and add "alias.com" as a domain alias for "main.com" the address "info@alias.com" would also work... But no!

So, I've added these domains:

  • main.com
  • alias.com

I've created this mailbox:

  • info@main.com

Then I mapped these alias domains:

  • alias.com => main.com

And then when I send a mail to info@alias.com I receive this error:

Recipient address rejected: User unknown in virtual mailbox table (state 13).

I don't want to create an alias for every domain, as I have a few. I also don't want to use a wildcard (like info@*) because there are also other domains that aren't aliases of main.com

So... what are these exactly?

share|improve this question
    
I expected the same and still don't understand why that's not the case. –  Josh M. Jan 26 at 21:12

2 Answers 2

up vote 3 down vote accepted

The explanation is in the documentation: http://www.postfix.org/VIRTUAL_README.html#virtual_alias

You want "alias mailboxes" aka virtual_mailbox_alias and virtual_mailbox_maps but talk about "alias domains": http://www.postfix.org/ADDRESS_CLASS_README.html#virtual_alias_class

share|improve this answer
    
I can't seem to make sense of the docs - how do you have domain1.com alias any mailbox to <mailbox>@domain2.com? –  Josh M. Jan 26 at 21:16

@Josh M.

I have no idea whether this is the right way and/or good practice but I'm using something like this:

virtual_alias_maps = regexp:/etc/postfix/domain_rewriting pgsql:/etc/postfix/pgsql/     virtual_alias_maps.cf

$ cat /etc/postfix/domain_rewriting 
/^(.*)@domain1.com$/     ${1}@domain2.com
share|improve this answer

Your Answer

 
discard

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.