diff --git a/etc/exim4/exim4.conf b/etc/exim4/exim4.conf index ea2f2d0..405cf21 100644 --- a/etc/exim4/exim4.conf +++ b/etc/exim4/exim4.conf @@ -952,7 +952,7 @@ virtual_alias_catchall: system_aliases: driver = redirect - domains = $primary_hostname:$qualify_domain + domains = $primary_hostname:$qualify_domain:$qualify_recipient allow_fail allow_defer data = ${lookup{$local_part}lsearch{/etc/aliases}} @@ -982,7 +982,7 @@ system_aliases: userforward: driver = redirect check_local_user - domains = $primary_hostname:$qualify_domain + domains = $primary_hostname:$qualify_domain:$qualify_recipient file = $home/.forward no_verify no_expn diff --git a/etc/exim4/exim_local.conf b/etc/exim4/exim_local.conf index 346cf60..39b9cc7 100644 --- a/etc/exim4/exim_local.conf +++ b/etc/exim4/exim_local.conf @@ -1,4 +1,5 @@ -qualify_domain = example.com +#qualify_domain = example.com +#qualify_recipient = fqdn.example.com hide mysql_servers = localhost/vmail/vmail/password diff --git a/install.sh b/install.sh index 85f2ccd..d90eb92 100755 --- a/install.sh +++ b/install.sh @@ -118,6 +118,7 @@ systemctl enable srsd systemctl start srsd # exim config +fqdn=`hostname -f` maildomain=`hostname -d` sed -i 's/size 10M/daily/g' /etc/logrotate.d/exim4-paniclog install --owner=Debian-exim --group=Debian-exim --mode=640 /dev/null /etc/exim4/relay_domains @@ -131,6 +132,7 @@ chown Debian-exim:Debian-exim /etc/exim4/skip_greylisting_hosts chmod 640 /etc/exim4/skip_greylisting_hosts sed -i "s|example.com|$maildomain|g" /etc/exim4/skip_greylisting_hosts sed -i "s|password|$VMAILPASS|g" /etc/exim4/exim_local.conf +sed -i "s|fqdn.example.com|$fqdn|g" /etc/exim4/exim_local.conf sed -i "s|example.com|$maildomain|g" /etc/exim4/exim_local.conf touch /etc/exim4/srsd.secret chmod 640 /etc/exim4/srsd.secret