From 0453ccb04481b29fd2ae89108501ad5bc4b4c8c0 Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Wed, 18 Dec 2013 14:44:47 -0800 Subject: [PATCH] Allow HELO name to be specified https://sourceforge.net/p/webadmin/discussion/600155/thread/4a465885/ --- mailboxes/boxes-lib.pl | 5 +++-- mailboxes/config.info | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/mailboxes/boxes-lib.pl b/mailboxes/boxes-lib.pl index dd4f6215b..9fe2e1d2b 100755 --- a/mailboxes/boxes-lib.pl +++ b/mailboxes/boxes-lib.pl @@ -878,11 +878,12 @@ elsif ($sm) { # Connect to SMTP server &open_socket($sm, $port, MAIL); &smtp_command(MAIL); + my $helo = $config{'helo_name'} || &get_system_hostname(); if ($esmtp) { - &smtp_command(MAIL, "ehlo ".&get_system_hostname()."\r\n"); + &smtp_command(MAIL, "ehlo $helo\r\n"); } else { - &smtp_command(MAIL, "helo ".&get_system_hostname()."\r\n"); + &smtp_command(MAIL, "helo $helo\r\n"); } # Get username and password from parameters, or from module config diff --git a/mailboxes/config.info b/mailboxes/config.info index 6ec7c9050..217b932ff 100644 --- a/mailboxes/config.info +++ b/mailboxes/config.info @@ -53,6 +53,7 @@ from_virtualmin=Get From: address from Virtualmin?,1,1-Yes,0-No from_dom=Domain to use in From: address,3,System hostname no_orig_ip=Include browser IP in X-Originating-IP header?,1,0-Yes,1-No no_mailer=Include Webmin version in X-Mailer header?,1,0-Yes,1-No +helo_name=Hostname to use in SMTP HELO line,3,Same as system hostname line1=System configuration,11 mail_system=Mail server installed,4,1-Sendmail,0-Postfix,2-Qmail,4-Qmail+LDAP,5-Qmail+VPopMail,6-Exim,3-Detect automatically