Include Emails with Multiple Recipients in Quarantine Summary

Report bugs and workarounds
Post Reply
j_k
Posts: 3
Joined: 27 Jan 2016 15:55

Include Emails with Multiple Recipients in Quarantine Summary

Post by j_k » 20 May 2016 16:05

One of my users pointed out that the quarantine summaries don't list messages where there are multiple recipients. I looked into this, and the mailwatch database's maillog table lists the addresses separated by commas in the 'to_address' field.
I've modified the SQL queries within the quarantine_report.php file to now include these messages (using a LIKE statement with wildcards as opposed to an "=" statement). This file is part of MailWatch, and located (on the EFA system) at '/usr/local/bin/mailwatch/tools/Cron_jobs/'. I'm not familiar with how to contribute this to the MailWatch project, so if someone else does that would be great. If I've invited any problems on my system please let me know too.

Modifications in quarantine_report.php:
Line 200:
Original:

Code: Select all

 ((to_address=%s) OR (to_domain=%s))
Modified:

Code: Select all

 ((to_address LIKE %s) OR (to_domain=%s))
Line 299:
Original:

Code: Select all

    global $sql;
    $result = dbquery(sprintf($sql, quote_smart($to_address), quote_smart($to_domain)));
    $rows = mysql_num_rows($result);
Modified:

Code: Select all

    global $sql;
    $to_address = '%' . $to_address . '%';
    $result = dbquery(sprintf($sql, quote_smart($to_address), quote_smart($to_domain)));
    $rows = mysql_num_rows($result);

User avatar
shawniverson
Posts: 2754
Joined: 13 Jan 2014 23:30
Location: Rushville, Indiana, USA
Contact:

Re: Include Emails with Multiple Recipients in Quarantine Summary

Post by shawniverson » 21 May 2016 08:55

Version eFa 4.0.0 RC3 now available in testing repo. Come join us in advancing eFa!

cdburgess75
Posts: 46
Joined: 11 Jun 2014 21:43

Re: Include Emails with Multiple Recipients in Quarantine Summary

Post by cdburgess75 » 05 Aug 2016 15:56

Works Great! thank you.

cdburgess75
Posts: 46
Joined: 11 Jun 2014 21:43

Re: Include Emails with Multiple Recipients in Quarantine Summary

Post by cdburgess75 » 15 Mar 2019 15:09

Can't find a way to do this with the new version of EFA.

Post Reply