diff --git a/mailboxes/CHANGELOG b/mailboxes/CHANGELOG index d95a32d22..486a30e7e 100644 --- a/mailboxes/CHANGELOG +++ b/mailboxes/CHANGELOG @@ -56,3 +56,5 @@ Added support for Exim, thanks to Emmanuel Florac. Re-wrote the entire user interface to use the new Webmin UI library, and to bring it into sync with the Usermin module for reading mail. ---- Changes since 1.440 ---- HTML messages now have a converted plain-text attachment automatically added, for mail clients that only support text. +---- Changes since 1.450 ---- +Added Module Config options to not include the X-Mailer and X-Originating-IP headers in sent mail. diff --git a/mailboxes/config b/mailboxes/config index b5b172e55..8759f6cc6 100644 --- a/mailboxes/config +++ b/mailboxes/config @@ -48,3 +48,5 @@ arrows=1 open_mode=0 show_unread=0 maildir_deleted=0 +no_orig_ip=0 +no_mailer=0 diff --git a/mailboxes/config.info b/mailboxes/config.info index 848b02a7f..014a3abe9 100644 --- a/mailboxes/config.info +++ b/mailboxes/config.info @@ -50,6 +50,8 @@ from_addr=From: address to use when sending email manually,3,From mailbox userna webmin_from=From: address to use when Webmin sends email,3,Default (webmin@yourhost) 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 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 diff --git a/mailboxes/send_mail.cgi b/mailboxes/send_mail.cgi index 8d47f57b4..b08540ab5 100755 --- a/mailboxes/send_mail.cgi +++ b/mailboxes/send_mail.cgi @@ -52,9 +52,15 @@ $mail->{'headers'} = [ [ 'From', $in{'from'} ], [ 'To', &encode_mimewords($in{'to'}) ], [ 'Cc', &encode_mimewords($in{'cc'}) ], [ 'Bcc', &encode_mimewords($in{'bcc'}) ], - [ 'X-Originating-IP', $ENV{'REMOTE_ADDR'} ], - [ 'X-Mailer', "Webmin ".&get_webmin_version() ], [ 'Message-Id', $newmid ] ]; +if (!$config{'no_orig_ip'}) { + push(@{$mail->{'headers'}}, + [ 'X-Originating-IP', $ENV{'REMOTE_ADDR'} ]); + } +if (!$config{'no_mailer'}) { + push(@{$mail->{'headers'}}, + [ 'X-Mailer', "Webmin ".&get_webmin_version() ]); + } push(@{$mail->{'headers'}}, [ 'X-Priority', $in{'pri'} ]) if ($in{'pri'}); $in{'body'} =~ s/\r//g; if ($in{'body'} =~ /\S/) {