Properly handle multiple reject_rbl_client DNS domains on the SMTP Client Restrictions page.
---- Changes since 1.430 ----
Converted all pages to use the new Webmin UI library, for a more consistent and themable look.
+Autoreply messages containing non-ASCII characters are now properly quoted-printable encoded.
+
Network ports and addresses used by Sendmail can now be more easily edited on the new Network Ports page, which updates both sendmail.cf and any .mc file.
---- Changes since 1.400 ----
Added an access control page option to prevent creation and editing of catchall address mappings.
+---- Changes since 1.430 ----
+Autoreply messages containing non-ASCII characters are now properly quoted-printable encoded.
'data' => $data });
}
+# Work out the encoding
+if ($rbody =~ /[\177-\377]/) {
+ # High-ascii
+ $enc = "quoted-printable";
+ $encrbody = "ed_encode($rbody);
+ }
+else {
+ $enc = undef;
+ $encrbody = $rbody;
+ }
+
# run sendmail and feed it the reply
($rfrom) = &split_addresses($rheader{'From'});
if ($rfrom->[0]) {
# Create the message body
if (!@attach) {
# Just text, so no encoding is needed
+ if ($enc) {
+ print MAIL "Content-Transfer-Encoding: $enc\n";
+ }
print MAIL "\n";
- print MAIL $rbody;
+ print MAIL $encrbody;
}
else {
# Need to send a multi-part MIME message
$ctype = "multipart/mixed";
print MAIL "Content-Type: $ctype; boundary=\"$bound\"\n";
print MAIL "\n";
- splice(@attach, 0, 0, { 'headers' => [ [ 'Content-Type', 'text/plain' ],
- ],
- 'data' => $rbody });
+ $bodyattach = { 'headers' => [ [ 'Content-Type', 'text/plain' ], ],
+ 'data' => $encrbody };
+ if ($enc) {
+ push(@{$bodyattach->{'headers'}},
+ [ 'Content-Transfer-Encoding', $enc ]);
+ }
+ splice(@attach, 0, 0, $bodyattach);
# Send attachments
print MAIL "This is a multi-part message in MIME format.","\n";
return %config;
}
+# quoted_encode(text)
+# Encodes text to quoted-printable format
+sub quoted_encode
+{
+local $t = $_[0];
+$t =~ s/([=\177-\377])/sprintf("=%2.2X",ord($1))/ge;
+return $t;
+}
+