From 4c6a38ccde387e8f28ee62ea382c2ca7b4dbb968 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Fri, 12 Oct 2012 16:10:55 +0200 Subject: [PATCH] =?UTF-8?q?D=C3=A9code=20le=20sujet=20des=20mails?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- root/usr/share/qpsmtpd/plugins/logging/log2sql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/root/usr/share/qpsmtpd/plugins/logging/log2sql b/root/usr/share/qpsmtpd/plugins/logging/log2sql index 5ab9f10..a9daf54 100644 --- a/root/usr/share/qpsmtpd/plugins/logging/log2sql +++ b/root/usr/share/qpsmtpd/plugins/logging/log2sql @@ -10,6 +10,7 @@ ##################################################### use DBI; +use Encode qw(decode); use strict; #plugin level variables are here since version 0.02 @@ -132,7 +133,7 @@ sub data_post_handler{ #'touch' this message :-)) $header->add("X-Sql-Log-ID",$mail_id); - my $subject = scalar $header->get("Subject"); + my $subject = decode('MIME-Header', scalar $header->get("Subject")); chomp($subject); # Only keep the first 255 chars to be sure it can be inserted in the table $subject= substr $subject, 0, 254 if (length($subject) > 254);