1 (edited by jauert 2024-06-24 20:37:12)

Topic: email notifications with notify_quarantined_recipients.py

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.6.8
- Deployed with iRedMail Easy or the downloadable installer? Download
- Linux/BSD distribution name and version: Centos 9
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? yes 5.6
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====
Hello,
I have a problem with the script to execute email notifications. It seems that the settings made are not being applied.
As soon as I run notify_quarantined_recipients.py the sender appears as no-reply@... instead of the address I specified noreply@...
I don't know where else I can look because there is no information in the logs.

I would be very grateful for a little tip.

----

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

2

Re: email notifications with notify_quarantined_recipients.py

FYI https://docs.iredmail.org/quarantining. … ined-mails

3

Re: email notifications with notify_quarantined_recipients.py

Dear Zhang, sorry, I expressed myself a bit too briefly. I know the very good documentation.
I modified the file in the path "/opt/www/iredadmin/notify_quarantined_recipients.py" like this:

NOTIFICATION_SMTP_SERVER = 'localhost'
NOTIFICATION_SMTP_PORT = 587
NOTIFICATION_SMTP_STARTTLS = True
NOTIFICATION_SMTP_USER = 'noreply@xxx.xx'
NOTIFICATION_SMTP_PASSWORD = 'xxx'
NOTIFICATION_SMTP_DEBUG_LEVEL = 0

The script also seems to work. However, the settings made there are not adopted.

The notifications sent are blocked because the sender address does not exist:

Content type: Spam
Internal reference code for the message is 01666-04/5LLeJbPACw6p

First upstream SMTP client IP address: [127.0.0.1]

Received trace: x

Return-Path: <no-reply@localhost.local>
From: No Reply <no-reply@localhost.local>
Message-ID: <4W7MMP3TmWz1dyS@xxx.xx>
Subject: [Attention] You have 5 emails quarantined and not delivered to
  mailbox
The message has been quarantined as: 5LLeJbPACw6p

The message WAS NOT relayed to:
<info@xxx.xx>:
   250 2.7.0 ok, discarded, id=01666-04 - spam

Spam scanner report:
Software zur Erkennung von "Spam" auf dem Rechner


The sender address set does not match the message.
Where else can I look to check the settings?

4

Re: email notifications with notify_quarantined_recipients.py

jauert wrote:

I modified the file in the path "/opt/www/iredadmin/notify_quarantined_recipients.py" like this:

WRONG file.
These NOTIFICATION_SMTP_* parameters should be added to /opt/www/iredadmin/settings.py.

5

Re: email notifications with notify_quarantined_recipients.py

Thank you. I did not get that correctly. I guess I haven't had enough sleep yet.