Startup Problem

Rick Chadderdon mailscanner at YETICOMPUTERS.COM
Fri Aug 19 17:57:31 IST 2005

    [ The following text is in the "ISO-8859-1" character set. ]
    [ Your display is set for the "US-ASCII" character set.  ]
    [ Some characters may be displayed incorrectly. ]

Drew Marshall wrote:

> On 18 Aug 2005, at 16:24, Rick Chadderdon wrote:
>> When I execute /opt/MailScanner/bin/check_mailscanner as root with:
>> Run As User = postfix
>> Run As Group = postfix
>> in MailScanner.conf, I get the error:
>> ---
>> Starting MailScanner...
>> Cannot open config file /opt/MailScanner/etc/MailScanner.conf,  
>> Permission
>> denied at /opt/MailScanner/lib/MailScanner/ line 592.
>> ---
>> Seems easy enough, but I'm stuck.  I've chowned
>> /opt/MailScanner/etc/MailScanner.conf to postfix:postfix.  I've  
>> chmodded the
>> file all the way to 777 and done the same for every file and  
>> directory in
>> the opt/MailScanner/ tree (including /opt/MailScanner).  None of this
>> helped, so I got more creative...
> My MailScanner.conf is owned by root and sits with 644 permissions  
> and MailScanner is started by root. As part of it's start up it moves  
> to the Postfix user.
> Drew
Thanks, Drew.  That's how mine installed by default.  My problem is that 
something that happens when the program switches UID/GID is keeping it 
from opening the MailScanner.conf file regardless of the ownership or 
permissions of the file.  I'm guessing that it's some kind of locking 
issue but I don't know where it is. 

Right now, the file is owned by root and is 644.  I'm giving the postfix 
user a bash shell, using su -c to launch check_mailscanner as the 
postfix user and then removing the user's shell.  It works this way, so 
I know that it's not a permission problem.  This is not the most 
convenient way to launch MailScanner, however, so I'd like to find a 
better solution than scripting this workaround.

I'm wondering whether is locking MailScanner.conf exclusively 
(as root, since UID hasn't changed yet) while it's doing its QuickPeek 
and then the postfix user can't get through the lock...  But, it doesn't 
seem as though if that were the case that it would be only affecting 
this machine.  In any case, since I have a workaround it's becoming 
harder to get myself motivated to figure it out.  It will slowly drive 
me insane, however.

If additional info will help anyone else come up with ideas, I'm running 
kernel 2.6.12-gentoo-r9 (it was -r6 when I started), perl version 5.8.6, 
spamassassin version 3.0.4 and this is a fresh install from the latest 
tar file.  I installed with the script and when that produced 
these problems I used emerge to replace the perl modules from the 
default Gentoo setup.  After that failed to help I removed perl and 
rebuilt it and then installed the modules with cpan.  Didn't help.  I'm 
running out of things to try.

------------------------ MailScanner list ------------------------
To unsubscribe, email jiscmail at with the words:
'leave mailscanner' in the body of the email.
Before posting, read the Wiki ( and
the archives (

Support MailScanner development - buy the book off the website!

More information about the MailScanner mailing list