Extract text from attachments warning in logs

Know_new

New Member
May 24, 2023
18
4
3
Hello there

We enabled extract text from attachments option in spam detector menu

Time by time we can see some warnings in logs like this:

Aug gateway pmg-smtp-filter[2895792]: WARNING: Can't exec "/usr/bin/pdftotext": No such file or directory at /usr/share/perl5/Mail/SpamAssassin/Util.pm line 2080.
Aug gateway pmg-smtp-filter[2895792]: WARNING: util: failed to spawn a process "/usr/bin/pdftotext, -nopgbrk, -layout, -enc, UTF-8, /tmp/.spamassassin28956075nAqcntmp, -": exec failed: at /usr/share/perl5/Mail/SpamAssassin/Util.pm line 2081. at /usr/share/perl5/Mail/SpamAssassin/Util.pm line 1972.
Aug gateway pmg-smtp-filter[2895607]: WARNING: extracttext: error (6) from /usr/bin/pdftotext:


All dependencies and libraries has installed.

Max spam size options is 2Mb.

Regards
 
We performed this step as I mentioned above
ah - sorry thought you meant that apt is not unhappy about broken dependencies ...

did you restart pmg-smtp-filter after installing the dependencies?
and is /usr/bin/pdftotext indeed an exectutable?
 
Hello, Stoiko
Thank you for answer
did you restart pmg-smtp-filter after installing the dependencies?
and is /usr/bin/pdftotext indeed an exectutable?
Yes, service pmg-smtp-filter has been restarted and we rechecked twice /usr/bin/pdftotext – it is executable.

Here some new logs:
Sep pmg-smtp-filter[3005023]: 1813D264F1A2C13F166: found archive '%41F%438%441%44C%43C%43E %41D%41C%420%41F %441%43C-1.doc' (application/zip)
Sep pmg-smtp-filter[3005023]: 1813D264F1A2C13F166: unpack archive '%41F%438%441%44C%43C%43E %41D%41C%420%41F %441%43C-1.doc' done (88 ms)
Sep pmg-smtp-filter[3009225]: WARNING: Can't exec "/usr/bin/docx2txt": No such file or directory at /usr/share/perl5/Mail/SpamAssassin/Util.pm line 2080.
Sep pmg-smtp-filter[3009225]: WARNING: util: failed to spawn a process "/usr/bin/docx2txt, /tmp/.spamassassin3005023A3Yti2tmp, -": exec failed: at /usr/share/perl5/Mail/SpamAssassin/Util.pm line 2081. at /usr/share/perl5/Mail/SpamAssassin/Util.pm line 1972.
Sep pmg-smtp-filter[3005023]: WARNING: extracttext: error (6) from /usr/bin/docx2txt:
Sep pmg-smtp-filter[3009226]: WARNING: Can't exec "/usr/bin/antiword": No such file or directory at /usr/share/perl5/Mail/SpamAssassin/Util.pm line 2080.
Sep pmg-smtp-filter[3009226]: WARNING: util: failed to spawn a process "/usr/bin/antiword, -t, -w, 0, -m, UTF-8.txt, /tmp/.spamassassin3005023vqXPCptmp": exec failed: at /usr/share/perl5/Mail/SpamAssassin/Util.pm line 2081. at /usr/share/perl5/Mail/SpamAssassin/Util.pm line 1972.
Sep pmg-smtp-filter[3005023]: WARNING: extracttext: error (6) from /usr/bin/antiword:

May be we should increase max size limit for spam, should we?


P.S docx2txt executable too.

Regards
 
May be we should increase max size limit for spam, should we?
Try this in any case - however the error-messages point to the files not being executable/present ...

Do you have any modifications to a plain PMG? - maybe some changes to systemd-unit-files - some other "security" things installed?
could you also check the complete journal of the time the error happens?
 
Try this in any case - however the error-messages point to the files not being executable/present ...

Do you have any modifications to a plain PMG? - maybe some changes to systemd-unit-files - some other "security" things installed?
could you also check the complete journal of the time the error happens?
Hello, Stoiko
After max size has been increased warning messages disappeared.

And yes, we'd modified PMG in security case - we use custom script for running commercial AV solution.

Regards
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!