1

Topic: notify_quarantined_recipients.py syntax error

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.6.1
- Deployed with iRedMail Easy or the downloadable installer? No
- Linux/BSD distribution name and version: Cent7
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): PGSQL
- 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.
====

Hi there,

I'm seeing an issue with running the notify_quarantined_recipients.py script via cron after a recent yum update of my system and doing some iredmail updates.

Every invocation by cron is sending the postmaster account a warning about a syntax error.  Here's a snip from one of the emails:

/usr/bin/python /var/www/iredadmin/tools/notify_quarantined_recipients.py --force-all >/dev/null

Traceback (most recent call last):
  File "/var/www/iredadmin/tools/notify_quarantined_recipients.py", line 107, in <module>
    from libs import iredutils
  File "/var/www/iredadmin/tools/../libs/iredutils.py", line 92
    def is_auth_email(s) -> bool:
                         ^
SyntaxError: invalid syntax


Anyone else run into this recently?

----

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

2

Re: notify_quarantined_recipients.py syntax error

This might just have been me being dumb.  It seems like the cron job entry was setup to run with /usr/bin/python and not /usr/bin/python3.  I hope this helps others if they run into this issue!