Menu

#2 Problem with mails and mail_id with underscore.

open
nobody
None
5
2013-05-02
2013-05-02
No

Hi,

when receiving a email in quarantine and the mail_id has an UNDERSCORE, emails could not deleted inside the quarantine dialog.

Following lines in lib/Quarantine.lib.php will NOT work in that constellation: (LINE 260 an following...)
...
// Get mail_id and recipient email address
$temp = preg_split('/_/', $mail_id_recip, 2);
$mail_id = $temp[0];
$recip_email = $temp[1];
...

I rewrite these lines to following code (I'm NOT a PHP programmer, sorry - maybe the code could be better :-) ) - AND WITH THIS CHANGES IT WORK'S:
...
// Get mail_id and recipient email address
// Tachtler
// default: $temp = preg_split('/_/', $mail_id_recip, 2);
// default: $mail_id = $temp[0];
// default: $recip_email = $temp[1];
$help_recip_email = array_reverse(explode('_', $mail_id_recip));
$recip_email = $help_recip_email[0];
$help_mail_id = explode('_' . $recip_email, $mail_id_recip);
$mail_id = "$help_mail_id[0]";
...

See also (but only in german) --> http://www.dokuwiki.tachtler.net/doku.php?id=tachtler:postfix_amavis_mailzu_installieren#mail_id_mit

Hope this helps!
Klaus.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB