mailwatch / MailWatch

MailWatch for MailScanner is a web-based front-end to MailScanner
http://mailwatch.org/
GNU General Public License v2.0
117 stars 66 forks source link

improve quarantine_report #1270

Closed dneuhaeuser closed 1 year ago

dneuhaeuser commented 1 year ago

Having administrator users defined with one or more filter addresses (e.g. automatically imported from LDAP with mailwatch_ldap_sync.sh) led to quarantine reports with duplicate lines.

So when the user type is 'A' we must NOT iterate through the filters because administrators get a report for every single recipient anyway.

Also the administrator's report had an incomplete headline because a suitable string was missing ($list_for was set empty). I suggest using the system's hostname in this case.

For normal users, when sending combined reports the headline should only list the addresses which are contained in the current report. Otherwise this gets very messy when you have a lot of address filters defined for a user.

shawniverson commented 1 year ago

Another great PR, thanks! I'll have some time this coming weekend to go over things.

shawniverson commented 1 year ago

This one looks good, tested good as well.