In der Hoffnung dass ich das nie wieder brauche:
(Dieses Setup setzt auf die gesplittete Konfiguration von Exim4)
Exim stoppen:
# /etc/init.d/exim4 stop
Datei /etc/exim4/exim4.conf.localmacros erstellen und füllen mit:
MAIN_LOCAL_DOMAINS = @:localhost:dsearch;/etc/exim4/virtualhosts
Datei /etc/exim4/conf.d/router/250_local_vdom_aliases erstellen und füllen mit:
vdom_aliases:
debug_print = "R: vdom_aliases for $local_part@$domain"
driver = redirect
allow_defer
allow_fail
domains = dsearch;/etc/exim4/virtualhosts
data = ${expand:${lookup{$local_part}lsearch*@{/etc/exim4/virtualhosts/$domain}}}
retry_use_local_part
pipe_transport = address_pipe
file_transport = address_file
# not no_more - we try again without the suffix
vdom_aliases_suffix:
debug_print = "R: vdom_aliases_suffix for $local_part@$domain"
driver = redirect
local_part_suffix = -*
local_part_suffix_optional
allow_defer
allow_fail
domains = dsearch;/etc/exim4/virtualhosts
data = ${expand:${lookup{$local_part}lsearch*@{/etc/exim4/virtualhosts/$domain}}}
retry_use_local_part
pipe_transport = address_pipe
file_transport = address_file
no_more
Um auf Maildir umzustellen, die Datei /etc/exim4/update-exim4.conf.conf öffnen:
dc_localdelivery='maildir_home'
Exim Konfiguration generieren lassen:
# update-exim4.conf
Exim4 starten:
# /etc/init.d/exim4 start
Verzeichnis erstellen:
# mkdir /etc/exim4/virtualhosts
Datei für die virtuelle Domain erstellen …:
vi /etc/exim4/virtualhosts/foobar.local
… und füllen mit z.B.
*: postmaster@foobar.local luke: luke@foobar.local vater: vader@foobar.local
Für jede Weitere virtuelle Domain gilt das selbe Prinzip.
Die User erstellen:
# useradd -m luke ; useradd -m vater
Mailadresse testen:
# exim4 -bt luke@foobar.local
Echte Mail testen:
# swaks -f foo@bla.local -t luke@foobar.local
Deine IP ist:
38.107.191.81
