Options to not include X-Mailer and X-Originating-IP headers

This commit is contained in:
Jamie Cameron
2009-02-20 00:39:41 +00:00
parent 80801e3276
commit bc324454a3
4 changed files with 14 additions and 2 deletions

View File

@@ -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.

View File

@@ -48,3 +48,5 @@ arrows=1
open_mode=0
show_unread=0
maildir_deleted=0
no_orig_ip=0
no_mailer=0

View File

@@ -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@<i>yourhost</i>)
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

View File

@@ -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/) {