Mailinglist Archive: opensuse (3901 mails)

< Previous Next >
Re: [SLE] Relaying.
  • From: Danny Sauer <suse-linux-e.suselists@xxxxxxxxxxxxxxxxxxxx>
  • Date: Tue, 25 Jan 2005 11:31:23 -0600
  • Message-id: <20050125173123.GC27380@xxxxxxxxxxxxxx>
Carlos wrote regarding 'Re: [SLE] Relaying.' on Mon, Jan 24 at 21:20:
>
> The Tuesday 2005-01-25 at 02:57 +0100, I wrote:
>
> > The Monday 2005-01-24 at 11:33 -0600, Danny Sauer wrote:
> >
> > > What *I* would do in that situation, presuming Carlos wants to be just
> > > like me, is to make a transport map for each ISP I connect though, and
> > > another transport map that has things that are common to both ISPs.
> > > So, I've now got transport, transport_ISP1, and transport_ISP2 in
> > > /etc/postfix. Then, in my post-connect script for ISP1, I'd run
> > > postconf -e "transport_maps=hash:/etc/postfix/transport,\
> > > hash:/etc/postfix/transport_ISP1"
> > > postfix reload
> > > and similarly for ISP2. That way, my global transport settings are
> > > preserved for both ISPs (/etc/postfix/transport), and the map for
> > > per-ISP settings are added depending on who I'm connected through.
> >
> > Ah, that is in the line of what I was thinking about. I was thinking of
> > having two maps, and symlink the right one to "transport" at connect time,
> > and run postmap and reload. This could be done from the
> > /etc/ppp/ip-up.local script, which is run with root privileges.
>
> Question, before I go to sleep :-)
>
> suppose I have:
>
> destination1 smtp:ServerOfTheDay
> destination2 smtp:ServerOfTheDay
> destination3 smtp:ServerOfTheDay
>
> My idea is if it is possible to define "ServerOfTheDay" somewhere else,
> and only change that definition each time. Then, my map would be defined
> once, I would only have to say which relay has to be used each time.

Do you mean by defining in /etc/hosts? Name lookups are cached, so
a change would not take effect immediately. You can not define
arbitrary variables in postfix, either. So, AFAIK, no, not really.

> I have looked at "man transport", and it talks about mydestination,
> virtual_mailbox_domains, and relay_domains. Then it talks about
> domain, transport, and nexthop. I wonder if "transport" can be used for
> what I say, or that word has to be "smtp", uucp or some other token.

The word has to be smtp or another defined transport mechanism (such
as filter).

--Danny
< Previous Next >