Set the e-mail headers Mailer-X and MessageID by Koha,
to gain a better positive score from the spam filter.
To test:
1) Let Koha send an e-mail message.
2) Check the header of this e-mail message with your e-mail client.
There should be no X-Mailer header with value 'Koha'. If there
is an MessageID header, it is probably set by the MSA, e.g. Exim.
Example:
Message-Id: <E1iyZRY-0006XT-0t@FQDN>
3) Apply patch.
4) Repeat step 1.
5) Check the header of the new e-mail message with your e-mail client.
There should be a X-Mailer header with value 'Koha' and a MessageID
header with a value set by Koha.
Example:
X-Mailer: Koha
Message-Id: <
15807387030.B731e.18490@FQDN>
6) Sign off.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
use Modern::Perl;
use Email::Valid;
+use Email::MessageID;
use base qw(Class::Accessor);
use C4::Context;
$mail{'Message'} = $params->{message} if $params->{message};
$mail{'Subject'} = $params->{subject} if $params->{subject};
$mail{'Content-Type'} = $params->{contenttype} if $params->{contenttype};
+ $mail{'X-Mailer'} = "Koha";
+ $mail{'Message-ID'} = Email::MessageID->new->in_brackets;
return %mail;
}
1;
requires 'Digest::MD5', '2.36';
requires 'Digest::SHA', '5.43';
requires 'Email::Date', '1.103';
+requires 'Email::MessageID', '1.406';
requires 'Email::Valid', '0.190';
requires 'Exception::Class', '1.38';
requires 'File::Slurp', '9999.13';