• Hi, Pleskians! We are running a UX testing of our upcoming product intended for server management and monitoring.
    We would like to invite you to have a call with us and have some fun checking our prototype. The agenda is pretty simple - we bring new design and some scenarios that you need to walk through and succeed. We will be watching and taking insights for further development of the design.
    If you would like to participate, please use this link to book a meeting. We will sent the link to the clickable prototype at the meeting.
  • (Plesk for Windows):
    MySQL Connector/ODBC 3.51, 5.1, and 5.3 are no longer shipped with Plesk because they have reached end of life. MariaDB Connector/ODBC 64-bit 3.2.4 is now used instead.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.

Resolved Plesk Email Security and Dovecot Problems

aschulzunna

New Pleskian
Server operating system version
Ubuntu 22.04.4 LTS
Plesk version and microupdate number
18.0.61 #4
Hello,
I've installed and licensed Plesk Email Security.
First what happens:
Everytime a mail was moved from spam folder and the same sender writes again, the new mail goes to spam again.
In Dashboard Amavis, ClamAV, Dovecot and Postfix are green.
Sended and received HAM counting.

In logfiles are two errors:

imap: Error: TxRep: cannot run when Auto-Whitelist is enabled. Please disable it!
imap: Error: Use of uninitialized value $ENV{"PATH"} in split at /usr/lib/x86_64-linux-gnu/perl-base/File/Spec/Unix.pm line 136.

What I've done:
In /etc/mail/spamassassin/local.cf changed from "loadplugin Mail::SpamAssassin::plugin::AWL" to "loadplugin Mail::SpamAssassin::plugin::TxRep" so the first error message no longer exist.

Like some posts explains, in /etc/dovecot/dovecot.conf I insert "import_environment = $import_environment PATH". The second error perists and problem that mails are in spam folder persists.

Thank's for any idea or solution to fix ist.
 
What the output of cat /usr/local/psa/admin/plib/modules/email-security/resources/dovecot/es-learn-ham.sh and cat /usr/local/psa/admin/plib/modules/email-security/resources/dovecot/es-learn-spam.sh?
 
Last edited:
Try to add to following lines on a new line below #!/bin/sh of both these files (es-learn-ham.sh and es-learn-spam.sh)
Code:
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
export PATH

After that restart Amavis systemctl restart amavis.
 
I've done in both files:
#!/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
export PATH
exec /usr/bin/sa-learn -u ${1} --spam
#!/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
export PATH
exec /usr/bin/sa-learn -u ${1} --ham
I've restarted amavis and dovecot. But the error persists.

May 29 22:17:34 mx dovecot: imap: Error: Use of uninitialized value $ENV{"PATH"} in split at /usr/lib/x86_64-linux-gnu/perl-base/File/Spec/Unix.pm line 136.
 
Do the files /var/qmail/popuser/es-learn-spam.sh and /var/qmail/popuser/es-learn-ham.sh exist too?
 
Both files exists. I'ved added the two PATH Lines and restart amavis.

The error message is gone. Seems the problem is solved.

Thank you very much.
 
Back
Top