Discussion:
MailScanner 4.84.6-1 + postfix 2.6.6-6 on CentOS 6.6 not checking filename/filetype rules
Viorel Robu
2014-10-31 13:00:25 UTC
Permalink
Hi all,

MailScanner is configured to run as postfix:postfix.

Run As User = postfix
Run As Group = postfix

Checked after start:

[***@srv-smtp conf.d]# ps axu | grep MailScanner
postfix 10381 0.0 1.8 205784 35060 ? Ss 13:14 0:00 MailScanner: master waiting for children, sleeping
postfix 10382 0.1 4.8 305000 92380 ? S 13:14 0:04 MailScanner: waiting for messages
root 11635 0.0 0.0 103252 840 pts/6 S+ 14:10 0:00 grep MailScanner

I double-checked permission and ownership of every directory and file in /var/spool/postfix and /var/spool/MailScanner.
But I can't figure out why MailScanner is not executing file name & file type checking of attachments.
I found a strange behavior: if I stop it and then run it in this manner:
/etc/init.d/MailScanner startin
/etc/init.d/MailScanner startout

sudo -u postfix -g postfix /usr/sbin/MailScanner /etc/MailScanner/MailScanner.conf
it starts acting as is supposed to.
Jerry Benton
2014-10-31 18:40:30 UTC
Permalink
It could be the unix/fifo thing with postfix. Newer versions have it set to unix. The easiest fix is to set it back to fifo.

sed -i "s/pickup unix/pickup fifo/g" /etc/postfix/master.cf
sed -i "s/qmgr unix/qmgr fifo/g" /etc/postfix/master.cf


-
Jerry Benton
www.mailborder.com
Post by Viorel Robu
Hi all,
MailScanner is configured to run as postfix:postfix.
Run As User = postfix
Run As Group = postfix
postfix 10381 0.0 1.8 205784 35060 ? Ss 13:14 0:00 MailScanner: master waiting for children, sleeping
postfix 10382 0.1 4.8 305000 92380 ? S 13:14 0:04 MailScanner: waiting for messages
root 11635 0.0 0.0 103252 840 pts/6 S+ 14:10 0:00 grep MailScanner
I double-checked permission and ownership of every directory and file in /var/spool/postfix and /var/spool/MailScanner.
But I can't figure out why MailScanner is not executing file name & file type checking of attachments.
/etc/init.d/MailScanner startin
/etc/init.d/MailScanner startout
sudo -u postfix -g postfix /usr/sbin/MailScanner /etc/MailScanner/MailScanner.conf
it starts acting as is supposed to.
--
MailScanner mailing list
http://lists.mailscanner.info/mailman/listinfo/mailscanner
Before posting, read http://wiki.mailscanner.info/posting
Support MailScanner development - buy the book off the website!
Viorel Robu
2014-11-03 09:21:35 UTC
Permalink
Hi,

unfortunately this is not my case.
The settings in master.cf for pickup and qmgr already are "fifo".
Any other thoughts?

Viorel
--
MailScanner mailing list
***@lists.mailscanner.info
http://lists.mailscanner.info/mailman/listinfo/mailscanner

Before posting, read http://wiki.mailscanner.info/posting

Support MailScanner development - buy the book off the website!
Viorel Robu
2014-11-04 08:29:54 UTC
Permalink
I'm pretty sure that this is a perl issue and is related to
/usr/share/perl5/MIME/Parser.pm module.
I made a little debug (actually trace) and find that this code in
/usr/lib/MailScanner/MailScanner/Message.pm:

## Do the actual parsing
my $maxparts = MailScanner::Config::Value('maxparts', $this) || 200;
MIME::Entity::ResetMailScannerCounter($maxparts);

# Inform MIME::Parser about our maximum
$parser->max_parts($maxparts * 3);
$entity = eval { $parser->parse($handle) };

# close and delete tmpfile
close($handle);

does not extract any files.


Viorel
--
MailScanner mailing list
***@lists.mailscanner.info
http://lists.mailscanner.info/mailman/listinfo/mailscanner

Before posting, read http://wiki.mailscanner.info/posting

Support MailScanner development - buy the book off the website!
Viorel Robu
2014-11-15 08:35:43 UTC
Permalink
I found the solution. I updated all perl modules using: span upgrade.
--
MailScanner mailing list
***@lists.mailscanner.info
http://lists.mailscanner.info/mailman/listinfo/mailscanner

Before posting, read http://wiki.mailscanner.info/posting

Support MailScanner development - buy the book off the website!
Loading...