OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
RE: transports and wildcard

From: Hement Gopal (Hement.Gopalwits.ac.za)
Date: Wed Aug 02 2006 - 05:35:42 CDT


Hi Magnus

Many thanks for the tips.....we're new at postfix so :(

Currently we do not have a list of the domains as we are using wildcards in exim to cater for this need.

I will try the regex option.....and if anyone else has any other advice, I'm all ears.

Thanks for the help once again.

Hement Gopal
Computer & Network Services
University of the Witwatersrand
Johannesburg
+27 11 717 1652 (Tel)
+27 11 717 1614 (Fax)
hement.gopalwits.ac.za

> -----Original Message-----
> From: owner-postfix-userspostfix.org [mailto:owner-postfix-
> userspostfix.org] On Behalf Of Magnus Bäck
> Sent: 02 August 2006 12:32 PM
> To: postfix-userspostfix.org
> Subject: Re: transports and wildcard
>
> On Wednesday, August 02, 2006 at 12:20 CEST,
> Hement Gopal <Hement.Gopalwits.ac.za> wrote:
>
> > I am using a transport list to route mail for containers that exist on
> > downstream mail servers.
> >
> > Eg :-
> >
> > clm.pg smtp:nike:25
> > clm.ug smtp:nike:25
> > ebe.pg smtp:nike:25
> > ebe.ug smtp:nike:25
> > hse.pg smtp:nike:25
> > hse.ug smtp:nike:25
>
> Note that you should probably enclose the hostname in square brackets to
> avoid MX lookups.
>
> Also consider using the relay transport instead of smtp to decrease the
> risk of having your outbound messages starve your inbound messages.
>
> > where nike is the mail server and clm, etc are containers on the
> > server.
> >
> > I also have other downstream mail servers whose mail domains are the
> > same as the server name itself
> >
> > Eg. userDOMAIN-XYZ should be routed to smtp:DOMAIN-XYZ:25
> >
> > The number of servers that require these entries is high and I do not
> > want to insert individual entries for each of them.
>
> Generate the list. Let the computer do the work for you. I assume you
> have the domains listed somewhere in your Postfix configuration anyway,
> probably relay_domains.
>
> > Is there a wildcard option in the transport list I can use that will
> > satisfy this :-
> >
> > Eg
> >
> > *.my.domain smtp:*.my.domain:25
> >
> > Where the * matches on both sides?
>
> You can use a regexp/pcre map.
>
> /^(.*\.example\.com)$/ smtp:$1
>
> > Postconf -d follows
>
> Why are you posting the "postconf -d" output? That displays the default
> parameter values and it's of course completely useless in this context.
>
> --
> Magnus Bäck
> magnusdsek.lth.se

<html><body><font face = "verdana" size = "0.8" color = "navy">This communication is intended for the addressee only. It is confidential. If you have received this communication in error, please notify us immediately and destroy the original message. You may not copy or disseminate this communication without the permission of the University. Only authorized signatories are competent to enter into agreements on behalf of the University and recipients are thus advised that the content of this message may not be legally binding on the University and may contain the personal views and opinions of the author, which are not necessarily the views and opinions of The University of the Witwatersrand, Johannesburg. All agreements between the University and outsiders are subject to South African Law unless the University agrees in writing to the contrary.</font></body></html>