Problem with permissions

serejk at febras.net serejk at febras.net
Fri Jul 17 00:07:28 IST 2009


Hi! 
I`m having a problem with MailScanner installation. My environment: 
 - FreeBSD 7.2-RELEASE
 - postfix-2.6.2_1,1 
 - clamav-0.95.2 
 - p5-Mail-SpamAssassin-3.2.5_4
 - perl 5.8.9
 - MailScanner-4.75.11

During installation I have tunning configuration files as it described in
http://www.mailscanner.info/postfix.html
But starting the MailScanner I have got following logs in
/var/log/maillog:

%date% %hostname% MailScanner[35039]: Could not use Custom Function code
/usr/local/lib/MailScanner/MailScanner/CustomFunctions/LastSpam.pm, it
could not be "require"d. Make sure the last line is "1;" and the module is
correct with perl -wc (Error: Insecure dependency in require while running
with -T switch at /usr/local/lib/MailScanner/MailScanner/Config.pm line
623. 
%date% %hostname% MailScanner[35039]: ) 
%date% %hostname% MailScanner[35039]: Could not use Custom Function code
/usr/local/lib/MailScanner/MailScanner/CustomFunctions/GenericSpamScanner.pm,
it could not be "require"d. Make sure the last line is "1;" and the module
is correct with perl -wc (Error: Insecure dependency in require while
running with -T switch at /usr/local/lib/MailScanner/MailScanner/Config.pm
line 623. 
%date% %hostname% MailScanner[35039]: ) 
%date% %hostname% MailScanner[35039]: Could not use Custom Function code
/usr/local/lib/MailScanner/MailScanner/CustomFunctions/CustomAction.pm, it
could not be "require"d. Make sure the last line is "1;" and the module is
correct with perl -wc (Error: Insecure dependency in require while running
with -T switch at /usr/local/lib/MailScanner/MailScanner/Config.pm line
623. 


.... and the same for all files in
/usr/local/lib/MailScanner/MailScanner/CustomFunctions/ directory.
Searching through Google, I have found an answer:
if perl script starts with different real and effective user (root and
postfix in my case), perl enables taint mode automatically. Hmm.. I have
set options "Run As User" and "Run As Group" to root - this made
MailScanner to start without any errors in log. But when Mailscanner
returns checked letter in postfix incoming directory with root uid,
postfix/qmgr cannot work with it because of "Permission denied". Afterall,
starting MailScanner with root privileges is not good idea, I think.

Any advices? What I have do wrong?

P.S. Starting perl with -U key provides more ugly messages in log. I think
its wrong idea.


More information about the MailScanner mailing list