E-mails über mehrere smarthost versenden
Andreas Koch
A.Koch.de at web.de
Sat Nov 19 17:41:26 CET 2005
Hallo,
ich möchte gerne e-mails über verschiedene smtp-smarthosts verschicken. Z.B.
entwder über @web.de oder @bobadilla.de (1und1). Dafür habe ich in muttrc
folder-hooks angelegt:
[..]
folder-hook ~/mailbox/inbox-Web.de set from = a.koch.de at web.de
folder-hook ~/mailbox/inbox-Web.de set signature = "~/.mutt/sig-web.de"
folder-hook ~/mailbox/inbox-Web.de my_hdr From: a.koch.de at web.de
folder-hook ~/mailbox/inbox-Web.de my_hdr Reply-To: a.koch.de at web.de
[..]
Versendet werden die mails normal über exim4 welches ich mittels debconf für
einen smarthost (smtp.1und1) configuriert. Im Netz habe ich dann nach
Anleitungen gesucht um exim beizubringen das er e-mails von a.koch.de at web.de
auch über den smtp server von web.de versendet. Ich habe mich dabei nach:
http://www.tgunkel.de/docs/exim_smarthosts.en gerichtet und einen Datei mit
[smtp_to_user]
andreas at bobadilla.de: user=andreas smart_host=smtp.1und1.de auth_name=xxx auth_pass=yyyy
a.koch.de at web.de: user=andreas smart_host=smtp.web.de auth_name=xxx auth_pass=yyyy
angelegt. In exim4.conf.template habe ich dann folgende Änderungen gemacht:
#smarthost:
# debug_print = "R: smarthost for $local_part@$domain"
# driver = manualroute
# domains = ! +local_domains
# transport = remote_smtp_smarthost
# route_list = * DCsmarthost byname
# host_find_failed = defer
# same_domain_copy_routing = yes
# no_more
smarthost:
condition = ${extract{smart_host}{${lookup{$sender_address}lsearch{/etc/exim4/smtp_to_user}{$value}fail}}}
driver = manualroute
domains = ! +local_domains
route_list = "* ${extract{smart_host}{${lookup{$sender_address}lsearch{/etc/exim4/smtp_to_user}{$value}fail}}} bydns_a"
transport = remote_smtp_smarthorst
host_find_failed = defer
same_domain_copy_routing = yes
no_more
mtp_smarthost:
debug_print = "T: remote_smtp_smarthost for $local_part@$domain"
driver = smtp
# hosts_try_auth = ${if exists {CONFDIR/passwd.client}{DCsmarthost}{}}
hosts_try_auth = ${extract{smart_host}{${lookup{$sender_address}lsearch{/etc/exim4/smtp_to_user}{$value}fail}}}
tls_tempfail_tryclear = false
DEBCONFheaders_rewriteDEBCONF
DEBCONFreturn_pathDEBCONF
cram_md5:
driver = cram_md5
public_name = CRAM-MD5
# client_name = ${extract{1}{:}{${lookup{$host}lsearch*{CONFDIR/passwd.client}{$value}fail}}}
# client_secret = ${extract{2}{:}{${lookup{$host}lsearch*{CONFDIR/passwd.client}{$value}fail}}}
client_name = "${extract{auth_name}{${lookup{$sender_address}lsearch{/etc/exim4/smtp_to_users}{$value}fail}}}"
client_secret = "${extract{auth_pass}{${lookup{$sender_address}lsearch{/etc/exim4/smtp_to_users}{$value}fail}}}"
plain:
driver = plaintext
public_name = PLAIN
client_send = "${extract{auth_plain}{${lookup{$sender_address}lsearch{/etc/exim4/smtp_to_users}{$value}fail}}}"
[...]
login:
driver = plaintext
public_name = LOGIN
client_send = "${extract{auth_name}{${lookup{$sender_address}lsearch{/etc/exim4/smtp_to_users}{$value}fail}}}\
: ${extract{auth_pass}{${lookup{$sender_address}lsearch{/etc/exim4/smtp_to_users}{$value}fail}}}"
[...]
Wenn ich jetzt eine e-mail z.B. von andreas at bobadilla.de an a.koch.de at web.de
versenden will bekomme ich den Fehler:
1EdV7E-0006oV-QK <= andreas at gatekeeper.home U=andreas P=local S=453 id=20051119155900.GA26039 at gatekeeper.home
1EdV7E-0006oV-QK ** a.koch.de at web.de: Unrouteable address
1EdV7F-0006oX-2r <= <> R=1EdV7E-0006oV-QK U=Debian-exim P=local S=1273
1EdV7E-0006oV-QK Completed
1EdV7F-0006oX-2r => andreas <andreas at gatekeeper.home> R=procmail T=procmail_pipe
1EdV7F-0006oX-2r Completed
Ich habe noch ein wenig mit den relay domains herumgespielt aber ohne Erfolg.
Leider ist das ganze etwas undurchsichtig und die Howtos nicht wirklich
hilfreich. Vielleicht bin ich auch auf dem totalen Holzweg ?
Hat wer eine Idee woran es liegen könnte oder einen besseren Lösungsvorschlag ?
MFG,
andreas
--
computers are like air-conditiones, both stop working if you open windows
______________________________________________________________
Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193
More information about the Linux
mailing list