From 6ccd335d2d7cea4f82a19b68f8c6965c773480b3 Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Tue, 10 Aug 2010 12:02:25 +0200 Subject: [PATCH] exim: Use the external DNS name in HELO commands. The hostname of the mail vserver is not in public DNS, so some smtp servers reject a HELO command that uses it. This change makes sure that the hostname of the vserver host is used in HELO command, which is the external hostname to use for reaching the mail vserver. --- etc/exim4/conf.d/main/main_config | 6 ++++-- etc/exim4/conf.d/transport/30_remote_smtp | 4 ++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/etc/exim4/conf.d/main/main_config b/etc/exim4/conf.d/main/main_config index 771d2b6..fd84263 100644 --- a/etc/exim4/conf.d/main/main_config +++ b/etc/exim4/conf.d/main/main_config @@ -31,8 +31,10 @@ hostlist dont_reject_spam_hosts = katherina.student.utwente.nl : kat.student.utw # can come from any vserver, just use our main hostname. qualify_domain = drsnuggles.stderr.nl -# Let exim know how the rest of the world will try to reach us. -hosts_treat_as_local = drsnuggles.stderr.nl +# Let exim know how the rest of the world will try to reach us. The +# stmp transport also uses this macro for its helo command. +EXTERNAL_HOSTNAME = drsnuggles.stderr.nl +hosts_treat_as_local = EXTERNAL_HOSTNAME # The gecos field in /etc/passwd holds not only the name. see passwd(5). gecos_pattern = ^([^,:]*) diff --git a/etc/exim4/conf.d/transport/30_remote_smtp b/etc/exim4/conf.d/transport/30_remote_smtp index 2b05dee..7896c30 100644 --- a/etc/exim4/conf.d/transport/30_remote_smtp +++ b/etc/exim4/conf.d/transport/30_remote_smtp @@ -6,5 +6,9 @@ remote_smtp: debug_print = "T: remote_smtp for $local_part@$domain" driver = smtp + # Use a different hostname in our helo command, since our + # primary_hostname is not in public DNS. EXTERNAL_HOSTNAME is a macro + # defined in the main config. + helo_data = EXTERNAL_HOSTNAME # vim: set sts=2 expandtab sw=2 ai: -- 2.30.2