Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We're using virtual_alias_domains to tell postfix we handle the domain and virtual_alias_maps to rewrite the address we want to forward to.

But in some cases, the rewritten address has the same domain, but we don't handle it (and we're not the mx for that domain, the mail gets forwarded to us in the first place via a hardcoded method that doesn't do mx lookups).

So basically I want postfix to accept the mail for the domain example.com do a virtual_alias_maps lookup, which returns (for example) test@example.com and then forward the mail to the real mx for example.com.

I've tried a bunch of things, but it seems as long as example.com is in our virtual_alias_domains list (which it has to be or postfix won't accept the mail in the first place) I can't get it to try and send the email out via the real mx.

Any suggestions?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

One possible approach, which does work, is to create "Transport Mappings" for those domains to forward off to either:

  • One of the identified MX host for the destination domain
  • Another SMTP host to complete the actual delivery

The first approach is basically "hardwiring" based on a point-in-time MX configuration for the actual destination domain (which may change over time).

The second approach will facilitate the "regular" SMTP delivery via live DNS lookups, but will require an additional SMTP host/relay partner.

share|improve this answer
    
Good idea. Thanks. Unfortunately I can't test it without setting up another smtp server which is out of scope at the moment. –  Stu May 31 '11 at 21:07
    
You can try option 1 to get things off the ground and then consider option 2 for the long run... –  user48838 May 31 '11 at 21:38
    
well, I tried. numerous times. I can't put in any transport map setting that in any way seems to affect the outcome. It does the virtual alias map lookup, gets the forwarding address, then tries to look that up in the virtual alias map, and fails, and doesn't make any attempt to use any transportmap I specify. It just gives up. I don't get it. –  Stu Jun 9 '11 at 14:35
    
Is it in the format of "domain.name smtp:[destination]" within /etc/postfix/transport? –  user48838 Jun 9 '11 at 15:56
    
well, I thought it mattered what you put in main.cf as in... fallback_transport = dbm:/etc/postfix/transportmapfile –  Stu Jun 9 '11 at 18:46

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.