Problem with permissions

Drew Marshall drew.marshall at trunknetworks.com
Fri Jul 17 08:43:45 IST 2009


On 17 Jul 2009, at 00:07, <serejk at febras.net> <serejk at febras.net> wrote:

> 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.

What does mailscanner --lint give you?

Drew

-- 
In line with our policy, this message has been scanned for viruses and dangerous content.
Our email policy can be found at www.trunknetworks.com/policy

Trunk Networks Limited is registered in Scotland with registration number: SC351063
Registered Office 55-57 West High Street Inverurie AB51 3QQ



More information about the MailScanner mailing list