Re: [exim] Relay to multiple servers depending on the From: …

Pàgina inicial
Delete this message
Reply to this message
Autor: Tony Finch
Data:  
A: Borrajudo en Zanderberd
CC: exim-users
Assumpte: Re: [exim] Relay to multiple servers depending on the From: in the header
On Wed, 5 Jan 2005, Borrajudo en Zanderberd wrote:
>
> The thing is that Postfix doesn't allow to make (autenticated) relay to
> different servers depending on the "From: " directive in the header.
> I've heard that Exim does, but I haven't been able to discover how.


Yes, it can, though it might be nicer to use the return path. This would
depend on you either submitting your email via SMTP (so that
your MUA sets the return path) or configuring Exim so that your username
is in the trusted_users list. If you really want to use the From: header
then the following will require some tricky fiddling.

What you can do is add a couple of routers at the start of the routers
section in the default configuration. The default dnslookup router will be
used if you aren't sending from your Yahoo! or Terra addresses.

from_yahoo:
  driver     = manualroute
  domains    = !+local_domains
  senders    = borrajax_listas@??? : borrajax@???
  route_data = smtp.correo.yahoo.es
  transport  = remote_smtp


from_terra:
  driver     = manualroute
  domains    = !+local_domains
  senders    = hector@???
  route_data = mailhost.terra.es
  transport  = remote_smtp


Then you need to set up authentication. In the main part of the
configuration file, set:

hosts_require_auth = smtp.correo.yahoo.es : mailhost.terra.es

Then you need to configure the authentication mechanism(s). This might
depend on what your ISPs support, but the following should be sufficient
if added to the authenticators section of the configuration file:

LOGIN:
  driver      = plaintext
  client_send = ${if eq{$sender_address}{borrajax_listas@???} \
                     {: borrajax_listas : PASSWORD} \
                     {${if eq{$sender_address}{borrajax@???} \
                           {: borrajax : PASSWORD} \
                           {${if eq{$sender_address}{hector@???} \
                                 {: hector : PASSWORD} \
                                 fail }} }} }


Tony.
--
<fanf@???> <dot@???> http://dotat.at/ ${sg{\N${sg{\
N\}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}}\
\N}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}}