Mailscanner UNOFFICIAL package for pfSense 2.3.x
-
Hi, i have postfix and mailscanner running on pfsense 2.4.4-p1, i got the following warnings:
MailScanner[64731]: Clamd::ERROR:: UNKNOWN CLAMD RETURN ./lstat() failed: Permission denied. ERROR :: /var/spool/MailScanner/incoming/64731
Permissions looks fine, i did chown -R postfix:postfix /var/spool/MailScanner/incoming/, also chmod -R 6666 to the same folder.
Runas user on MailScanner.conf and clamd.conf is postfix.
Also mailscanner logs display syntax errors:
Mar 6 16:09:51 pfsense2 MailScanner[56749]: Syntax error(s) in configuration file:
Mar 6 16:09:51 pfsense2 MailScanner[56749]: Unrecognised keyword "deliversuspiciouspdf" at line 93
Mar 6 16:09:51 pfsense2 MailScanner[56749]: Unrecognised keyword "pdfidcommand" at line 84
Mar 6 16:09:51 pfsense2 MailScanner[56749]: Unrecognised keyword "pdfidtimeout" at line 87
Mar 6 16:09:51 pfsense2 MailScanner[56749]: Unrecognised keyword "scanpdf" at line 90
Mar 6 16:09:51 pfsense2 MailScanner[56749]: Warning: syntax errors in /usr/local/etc/MailScanner/MailScanner.conf.Please Help.
-
Try
chown -R postfix:clamav /var/spool/MailScanner/
and
chmod -R 0770 /var/spool/MailScanner/
-
Thanks Bismarck, i just did it but i got the same errors.
-
Here is what i got grom "MailScanner --lint"
-
Only difference I see is "GID/UID" and "Virus Scanner = clamd"
? http://lists.mailscanner.info/pipermail/mailscanner/2018-March/105077.html
Here are all files I have running with pfSense 2.4.4-p2 and Postfix/MailScanner
https://github.com/spec1re/stuff/raw/spec1re-patch-1/Unofficial-pfSense-packages-master.rar
unpack it, execute
- ./install_mailscanner_24.sh
- ./install_cpan_modules_24.sh
and manually copy the other files, overwriting existing ones.
-
-
i must be doing something wrong, i did a clean install pfsense 2.4.4-p1, install unofficial repo, enable FreeBSD in all repos, ran script install_postfix_24.sh, fixed postwhite error fetching the postwhite.conf file from stevejenkins and changing paths in the file, installed mailscanner and cpan from your packet, override every files as suggested and i got the same error.
Postfix and MailScanner are running but got the same errors.
-
the MailScanner.conf errors are just cosmetic, to get rid of them just edit
/usr/local/pkg/mailscanner.conf.template
and comment out line 82 till 98, restart mailscanner via the web interface and they should go away.
For the clamd error, you need to check the permissions defined in the configs of mailscanner and clamd eg. add postfix to the clamav group and viceversa.
-
Thanks Bismarck, that fix the errors. at first i added clamav as group for Incoming Work Dir Settings only in MailScanner.conf, but adding clamav as a group in system settings was the trick.
-
Nice to hear, and now you can start tuning SA / ClamAV rules and signatures. ;)
-
Using pfSense 2.4.4-p3
When trying to install these ,i always end up with errorpHP errors
PHP ERROR: Type: 64, File: /root/check_mailscanner_service.php, Line: 6, Message: require_once(): Failed opening required 'xmlrpc.inc' (include_path='.:/etc/inc:/usr/local/www:/usr/local/captiveportal:/usr/local/pkg:/usr/local/www/classes:/usr/local/www/classes/Form:/usr/local/share/pear:/usr/local/share/openssl_x509_crl/') @ 2019-12-07 06:41:21 -