From cbfa940f04cb889bb17809e4fe5543eaa22d9abe Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Tue, 1 Dec 2009 09:48:50 -0800 Subject: [PATCH] Support HTML autoreplies --- postfix/CHANGELOG | 2 ++ qmailadmin/CHANGELOG | 3 +++ sendmail/CHANGELOG | 1 + sendmail/autoreply.pl | 6 +++--- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/postfix/CHANGELOG b/postfix/CHANGELOG index 305c45ebd..0a98657d2 100644 --- a/postfix/CHANGELOG +++ b/postfix/CHANGELOG @@ -68,3 +68,5 @@ Changed the mail queue date format to yyyy/mm/dd, for easier sorting. Added support for the Postfix 2.3 smtpd_tls_security_level option. Improved Postfix main.cf file parser to skip indented blank lines. Changed map deletion function to not remove expected line, which can otherwise cause file corruption. +Autoreply messages starting with or will now be sent using the tex +t/html MIME type. diff --git a/qmailadmin/CHANGELOG b/qmailadmin/CHANGELOG index 6eb68dab2..c773dee5c 100644 --- a/qmailadmin/CHANGELOG +++ b/qmailadmin/CHANGELOG @@ -9,3 +9,6 @@ When creating an autoreply alias, you can enter regexps that the headers will be ---- Changes since 1.250 ---- Added a Module Config option to display aliases and other tables in one column instead of two, to increase readability when long aliases or domain names exist. Added checkboxes and Delete Selected buttons on the aliases, virtual mappings, domain routing and mail users pages for deleting multiple entries at once. +---- Changes since 1.490 ---- +Autoreply messages starting with or will now be sent using the tex +t/html MIME type. diff --git a/sendmail/CHANGELOG b/sendmail/CHANGELOG index 64bfa38be..60081e2f8 100644 --- a/sendmail/CHANGELOG +++ b/sendmail/CHANGELOG @@ -46,3 +46,4 @@ Changed the mail queue date format to yyyy/mm/dd, for easier sorting. When flushing selected queued quarantined messages, the -qQ flag is added so that it actually works. ---- Changes since 1.490 ---- If multiple alias files are defined, one can be selected when adding a new alias. +Autoreply messages starting with or will now be sent using the text/html MIME type. diff --git a/sendmail/autoreply.pl b/sendmail/autoreply.pl index 88cefa64a..17b6f1dec 100755 --- a/sendmail/autoreply.pl +++ b/sendmail/autoreply.pl @@ -203,17 +203,17 @@ foreach $f (@files) { 'data' => $data }); } -# Work out the encoding +# Work out the content type and encoding +$type = $rbody =~ /]*>|]*>/i ? "text/html" : "text/plain"; if ($rbody =~ /[\177-\377]/) { # High-ascii $enc = "quoted-printable"; $encrbody = "ed_encode($rbody); - $type = "text/plain; charset=iso-8859-1"; + $type .= "; charset=iso-8859-1"; } else { $enc = undef; $encrbody = $rbody; - $type = "text/plain"; } # run sendmail and feed it the reply