On Fri, Aug 16, 2013 at 08:36:25AM -0400, Carlos L wrote: > I'm looking for a bit of help on a complicated scenario that I > can't seem to get to work. > > I have mail that comes into a server a server with both a to and > 'original to' address > > What i would like to achieve is that mail going to the to addresses > to go through a smarthost instead of local maildir delivery > > Things I've tried removing the 'original to' domains from the > domains database. > Failed because it still checks against the table even though the > "to" domain is there the "original to" fails. > > I've tried header checks but I can't quite get the false regex to > work correctly because it evaluates every line of the header of so.
I'm not exactly sure what you are not understanding, but perhaps at the core of it, you are thinking that headers are used to control routing of mail. This is not so. > Ive tried the sender_based stuff and neither worked. > Ive tried the transport address based rules but that affects both > the internet and local since the original to address still gets > picked up for routing instead of the to "Picked up for routing"? > So the questions are: > Any way to have postfix accept mail for a domain from the internet > but when local mailboxes relay to those same domains have it route > through a smarthost or mx record. I can't parse that one, but it sounds like you might find relay_domains of interest: http://www.postfix.org/ADDRESS_CLASS_README.html#relay_domain_class http://www.postfix.org/postconf.5.html#relay_domains > Or > > Any way to limit header_checks to checking just one line? No, but again, that is entirely unrelated to the given subject of "Custom routing". -- http://rob0.nodns4.us/ -- system administration and consulting Offlist GMX mail is seen only if "/dev/rob0" is in the Subject: