Ok since my explanation of the problem is poor at best I'll give an example

Incoming mail comes in like this (actual headers):
Aug 15 09:30:34 servername postfix/cleanup[11616]: BD48811882027: warning:
header Received: from mail-pa0-f66.google.com
(mail-pa0-f66.google.com[209.85.220.66])??by otherserver.mydomain.tld
(8.13.8/8.13.1) with ESMTP id
r7FDTetH020869??(version=TLSv1/SSLv3 cipher=RC4-SHA bi from
otherserver.mydomain.tld[123.123.123.123]; from=<carlosat...@gmail.com> to=<
xd...@abc.com> proto=ESMTP helo=<otherserver.mydomain.tld>
Aug 15 09:30:34 servername postfix/cleanup[11616]: BD48811882027: warning:
header Received: by mail-pa0-f66.google.com with SMTP id fz6so413272pac.5?
       for <u...@efg.com>;

so what Im after is it possible to have postfix accept this message, with
just abc.com set as a local domain.


On Fri, Aug 16, 2013 at 8:58 AM, /dev/rob0 <r...@gmx.co.uk> wrote:

> 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:
>

Reply via email to