1

Topic: Notify single user about quarantined mails

Hi,

Is there a way to use or modify the notify_quarantined_recipients.py script so that quarantine email alerts are sent to a specific user rather than the recipient of the email.

Regards,

Robert


==== Required information ====
- iRedMail version (check /etc/iredmail-release): v0.9.6
- Linux/BSD distribution name and version: Ubuntu 16.04
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):  MySQL
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? Yes
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Notify single user about quarantined mails

iRedAdmin-Pro ships script you can use with cron to notify mail recipients:
http://www.iredmail.org/docs/quarantini … ined-mails

It's easy to modify it to use a given email address as recipient of notification email.

3

Re: Notify single user about quarantined mails

Hi Zhang,

Can I add list of email addresses in the notify_quarantined_recipients.py script here....?

# List of target users' email address.
target_users = []

Does this then override sending the quarantine email notification to individual recipients?

Or is the required mod a little bit more work?

Cheers,

Robert

4

Re: Notify single user about quarantined mails

Help me understand your purpose first: Do you want to send notification to ONLY given admin account? or both given admin and the recipient?

5

Re: Notify single user about quarantined mails

Thanks Zhang,

ONLY to given admin account (eg: postmaster@mydomain.com).

Regards,

Robert

6

Re: Notify single user about quarantined mails

Hi Zhang,

Ideally quarantine notifications would ONLY get sent to a nominated admin account (could be global admin account).

What would also work nicely for us if there was a way of cc'ing the domain or global admin account on each quarantine notification email sent out to a user.

However, I have had a think about this and also studied the code in notify_quarantined_recipients.py and believe that I have found a workaround.

1) Leave Self Service disabled for all users.
2) Modify the notify_quarantined_recipients.html so that the notification email is worded in a way that directs the user to their domain administrator.

Your thoughts please.

Robert

7

Re: Notify single user about quarantined mails

rschilt wrote:

Ideally quarantine notifications would ONLY get sent to a nominated admin account (could be global admin account).

Disagree. Let user manage his own quarantined email will reduce sysadmin's workload. And only the user can 100% sure which one is spam.

rschilt wrote:

What would also work nicely for us if there was a way of cc'ing the domain or global admin account on each quarantine notification email sent out to a user.

This is possible, technically.

rschilt wrote:

1) Leave Self Service disabled for all users.
2) Modify the notify_quarantined_recipients.html so that the notification email is worded in a way that directs the user to their domain administrator.

You can generate file "tools/notify_quarantined_recipients.html.custom" (which is a copy of notify_quarantined_recipients.html with your own modification), it's template used as email notification, you can hide the link to iRedAdmin-Pro self-service and add whatever you want.