LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Postfix virtual alias for second domain not mapping correctly (http://www.linuxquestions.org/questions/linux-software-2/postfix-virtual-alias-for-second-domain-not-mapping-correctly-816146/)

gr33d 06-24-2010 11:35 AM

Postfix virtual alias for second domain not mapping correctly
 
EDIT I moved the catch-all mapping to the bottom of the virtual_alias_maps hash, and I realized my problem description wasn't accurate. All mail is going to user1. The header tells me it's going to user2 or user3, but everything is delivered to user1. Any ideas what's going on? Let me know if I've omitted relative parts of the config files.

postfix 2.5.5 fc8

/etc/postfix/virtual:

Code:

me@domain2.com      user2
another@domain2.com  user3
@domain1.net      user1

/etc/postfix/main.cf

Code:

mydestination = $myhostname, localhost.$mydomain
virtual_alias_domains = domain1.net domain2.com
virtual_alias_maps = hash:/etc/postfix/virtual
myhostname = domain1.net
mydomain = domain1.net

my catch-all for domain.net is working ok. however, everything sent to domain2.com is delivered to user2 (local). i am expecting another@domain2.com mail to be delivered to user3 (also local)

what am i missing? thanks in advance!

gr33d 06-29-2010 07:47 AM

bump?

pingu 06-29-2010 09:08 AM

Very strange really.
Only thing I've found is from Postfix manual:
Code:

/etc/postfix/virtual:
          virtual-alias.domain    anything (right-hand content does not matter)
          postmaster@virtual-alias.domain  postmaster
          user1@virtual-alias.domain      address1
          user2@virtual-alias.domain      address2, address3

      The  virtual-alias.domain anything entry is required for a
      virtual alias domain. Without this entry, mail is rejected
      with  "relay  access  denied", or bounces with "mail loops
      back to myself".

Maybe try adding that "virtual-alias.domain anything".
You could also try separating "virtual_alias_domains = domain1.net domain2.com" with a comma - although whitespace should be ok.
Edit: How does the dns entry for your domains look?

pingu 06-29-2010 09:19 AM

And you haven't forgotten to execute the command "postmap /etc/postfix/virtual"

gr33d 06-29-2010 09:20 AM

pingability.com tells me DNS/MX records are ok.

i have not forgot postmap /etc/postfix/virtual. i normally try restarting postfix after the postmap command and sending failed emails.

ill try your other suggestions, thanks.


All times are GMT -5. The time now is 02:35 PM.