[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: exim4 und mehrere Mailprovider



Am 07.12.2013 17:42, schrieb Dietmar Segbert:
Wie kann ich exim4 so konfigurieren, dass automatisch die ausgehende Mail
mit der Adresse von web.de über web.de versendet wird, die von Arcor über
Arcor usw.

Einen Transport anlegen:

echo '### transport/30_exim4-config_remote_smtp_smarthost_mati
#################################
# This transport is used for delivering messages over SMTP smarthosts

remote_smtp_list:
  debug_print = "T: remote_smtp_list for $local_part@$domain"
  driver = smtp
  hosts_try_auth = ${lookup{$sender_address}wildlsearch{CONFDIR/sender.smarthost}}
.ifdef REMOTE_SMTP_HOSTS_AVOID_TLS
  hosts_avoid_tls = REMOTE_SMTP_HOSTS_AVOID_TLS
.endif
.ifdef REMOTE_SMTP_HEADERS_REWRITE
  headers_rewrite = REMOTE_SMTP_HEADERS_REWRITE
.endif
.ifdef REMOTE_SMTP_RETURN_PATH
  return_path = REMOTE_SMTP_RETURN_PATH
.endif
.ifdef REMOTE_SMTP_HELO_DATA
  helo_data=REMOTE_SMTP_HELO_DATA
.endif
.ifdef DKIM_DOMAIN
dkim_domain = DKIM_DOMAIN
.endif
.ifdef DKIM_SELECTOR
dkim_selector = DKIM_SELECTOR
.endif
.ifdef DKIM_PRIVATE_KEY
dkim_private_key = DKIM_PRIVATE_KEY
.endif
.ifdef DKIM_CANON
dkim_canon = DKIM_CANON
.endif
.ifdef DKIM_STRICT
dkim_strict = DKIM_STRICT
.endif' >/etc/exim4/conf.d/transport/30_exim4-config_remote_smtp_smarthost_mati

Dann einen Router anlegen:

echo '### router/170_exim4-config_mati_smarthost
#################################
# This file holds the smarthost_list router,

smarthost_list:
debug_print = "R: smarthost list for $local_part@$domain"
  driver = manualroute
  domains = ! +local_domains
  senders = wildlsearch;CONFDIR/sender.smarthost
  transport = remote_smtp_list
  route_list = * ${lookup{$sender_address}wildlsearch{CONFDIR/sender.smarthost}}
  host_find_failed = defer
  same_domain_copy_routing = yes
  no_more
' > /etc/exim4/conf.d/router/170_exim4_config_mati_smarthost

Dann die Liste der Remote-Server anlegen

echo '# sender smarthost
*@gmx.de             mail.gmx.net
*@nurfuerspam.de     mail.gmx.net
' >/etc/exim4/sender.smarthost

Und zuletzt dann die Passwörter für die Konten setzten

echo '
# xxx@gmx.de
mail.gmx.net:login_id:login_password
' >>/etc/exim4/passwd.client

mfg
Matthias



Reply to: