OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Re: Address rewriting combined with transport table

From: Alexander Pertsch (alexander.pertschblue-elephant-systems.com)
Date: Wed Dec 14 2005 - 11:13:11 CST


Thanks for your reply,

Am Mittwoch, den 14.12.2005, 11:30 -0500 schrieb Wietse Venema:
> Alexander Pertsch:
> > This works but unfortunately then the mails are delivered locally,
> > though I have an entry in my transport table:
> >
> > .extdomain.com smtp:externalmail.domain.com
>
> That is not supported by Postfix documentation. There is no
> search for .extdomain.com.

I've now changed this using a regular expression table for the
transport, so that emails sent to ".extdomain.com" should be sent via
the externalmail.domain.com (the correct transport entry is print out
when queried via "postmap -q ... regexp:...").

Unfortunately the mailserver first rewrites the recipient address to
"foodomain.com" (skipping the .ext) and afterwards delivers it locally
(as correct for "foodomain.com"). So my question is if it's possible to
"mark" a message when the recipient address is rewritten so that I
afterwards can determine whether to sent it locally or to forward it to
my external mail gateway?

Any solutions for the described scenario?

Thanks.

Best regards
Alexander
>
> Wietse
>
> TABLE SEARCH ORDER
> With lookups from indexed files such as DB or DBM, or from networked
> tables such as NIS, LDAP or SQL, patterns are tried in the order as
> listed below:
>
> user+extensiondomain transport:nexthop
> Deliver mail for user+extensiondomain through transport to nex-
> thop.
>
> userdomain transport:nexthop
> Deliver mail for userdomain through transport to nexthop.
>
> domain transport:nexthop
> Deliver mail for domain through transport to nexthop.
>
> .domain transport:nexthop
> Deliver mail for any subdomain of domain through transport to
> nexthop. This applies only when the string transport_maps is not
> listed in the parent_domain_matches_subdomains configuration
> setting. Otherwise, a domain name matches itself and its subdo-
> mains.
>
--
Alexander Pertsch
blue elephant systems GmbH

Wollgrasweg 49
D-70599 Stuttgart

Phone: (+49) 0 711 - 45 10 17 672
Fax: (+49) 0 711 - 45 10 17 573
E-mail: alexander.pertschblue-elephant-systems.com