MailScanner --lint - was: watermark error?

Mark Sapiro mark at msapiro.net
Wed Apr 30 03:24:47 IST 2008


On Tue, Apr 29, 2008 at 10:54:16PM +0100, Julian Field wrote:
> 
> 
> Mark Sapiro wrote:
> >On Tue, Apr 29, 2008 at 09:01:17AM +0200, John Wilcock wrote:
> >  
> >>On a probably unrelated note, MailScanner --lint tells me
> >>Cannot create temporary Work Dir /8103. Are the permissions and 
> >>ownership of  correct? at /usr/lib/MailScanner/MailScanner/WorkArea.pm 
> >>line 152
> >>    
> I can't re-create this at all. What you have set as "Run As User" and 
> group, and incoming work dir owner and permissions? It must be failing 
> to set the $parentdir in WorkArea.pm. But that's set like this:
> my $parentdir = MailScanner::Config::Value('incomingworkdir');
> so it must be failing to read the config file by the time it runs this. 
> So why does it work for me?
> 
> >
> >
> >
> >I have seen this many times. I just checked again (version 4.68.8) and
> >I see the above error preceded immediately by
> >
> >Your "Incoming Work Directory" should be specified as an absolute path, 
> >not including any links. But I will work okay anyway. at 
> >/usr/lib/MailScanner/MailScanner/WorkArea.pm line 139
> >
> >This occurs even though I have
> >
> >Incoming Work Dir = /var/spool/MailScanner/incoming
> >
> >in MailScanner.conf and there are no links in that path.
> >
> >The interesting thing is I always get errors like this if I run
> >
> > MailScanner --lint
> >
> >as root from my home directory, but if I cd to /etc/MailScanner before
> >running the command, it produces the expected output without either of
> >the above errors.
> >  
> Again, can you give me the same info I have asked for above?
> I cannot re-create this at all. It calls new MailScanner::WorkArea after 
> it reads the conf file, so it will be able to read the Incoming Work Dir 
> by then, but for some reason it can't. You haven't got any odd 
> permissions on /etc or / or /etc/MailScanner have you?
> 


I have attached a console log including all the information you ask
for plus the output from MailScanner --lint that fails and one that
succeeds after 'cd /etc/MailScanner'.

-- 
Mark Sapiro mark at msapiro net       The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan
-------------- next part --------------
[root at sbh16 ~]# ls -ld /etc
drwxr-xr-x 84 root root 12288 Apr 24 04:04 /etc

[root at sbh16 ~]# ls -ld /etc/MailScanner/
drwxr-xr-x 5 root root 4096 Apr 29 19:09 /etc/MailScanner/

[root at sbh16 ~]# ls -ld /etc/MailScanner/MailScanner.conf
-rw-r--r-- 1 root root 120848 Apr  4 11:41 /etc/MailScanner/MailScanner.conf

[root at sbh16 ~]# grep ^Run\ As /etc/MailScanner/MailScanner.conf
Run As User = postfix
Run As Group = postfix

[root at sbh16 ~]# grep ^Incoming\ Work /etc/MailScanner/MailScanner.conf
Incoming Work Dir = /var/spool/MailScanner/incoming
Incoming Work User =
Incoming Work Group =
Incoming Work Permissions = 0600

[root at sbh16 ~]# ls -ld /var
drwxr-xr-x 27 root root 4096 Nov 19 14:26 /var

[root at sbh16 ~]# ls -ld /var/spool/
drwxr-xr-x 15 root root 4096 Dec 22 14:54 /var/spool/

[root at sbh16 ~]# ls -ld /var/spool/MailScanner/
drwxr-xr-x 5 root root 4096 Nov 19 13:30 /var/spool/MailScanner/

[root at sbh16 ~]# ls -ld /var/spool/MailScanner/incoming/
drwxr-xr-x 5 postfix postfix 4096 Apr 29 19:04 /var/spool/MailScanner/incoming/

[root at sbh16 ~]# MailScanner --lint
Trying to setlogsock(unix)
Read 821 hostnames from the phishing whitelist
Read 3765 hostnames from the phishing blacklist
Checking version numbers...
Version number in MailScanner.conf (4.68.8) is correct.

Your envelope_sender_header in spam.assassin.prefs.conf is correct.
MailScanner setting GID to  (89)
MailScanner setting UID to  (89)

Checking for SpamAssassin errors (if you use it)...
SpamAssassin temporary working directory is /var/spool/MailScanner/incoming/SpamAssassin-Temp
SpamAssassin temp dir = /var/spool/MailScanner/incoming/SpamAssassin-Temp
Using SpamAssassin results cache
Connected to SpamAssassin cache database
SpamAssassin reported no errors.
Your "Incoming Work Directory" should be specified as an absolute path, not including any links. But I will work okay anyway. at /usr/lib/MailScanner/MailScanner/WorkArea.pm line 139
Cannot create temporary Work Dir /30293. Are the permissions and ownership of  correct? at /usr/lib/MailScanner/MailScanner/WorkArea.pm line 152

                                                                              ^ note null name


[root at sbh16 ~]# cd /etc/MailScanner/
[root at sbh16 MailScanner]# MailScanner --lint
Trying to setlogsock(unix)
Read 821 hostnames from the phishing whitelist
Read 3765 hostnames from the phishing blacklist
Checking version numbers...
Version number in MailScanner.conf (4.68.8) is correct.

Your envelope_sender_header in spam.assassin.prefs.conf is correct.
MailScanner setting GID to  (89)
MailScanner setting UID to  (89)

Checking for SpamAssassin errors (if you use it)...
SpamAssassin temporary working directory is /var/spool/MailScanner/incoming/SpamAssassin-Temp
SpamAssassin temp dir = /var/spool/MailScanner/incoming/SpamAssassin-Temp
Using SpamAssassin results cache
Connected to SpamAssassin cache database
SpamAssassin reported no errors.
Using locktype = posix
MailScanner.conf says "Virus Scanners = clamd"
Found these virus scanners installed: clamd
===========================================================================
Virus and Content Scanning: Starting
ProcessClamAVModOutput Clamd
ClamAVModule::INFECTED:: Eicar-Test-Signature :: ./1/eicar.com
ProcessClamAVModOutput Clamd
ClamAVModule::INFECTED:: Eicar-Test-Signature FOUND :: ./1/
Virus Scanning: Clamd found 2 infections
Infected message 1 came from 10.1.1.1
Virus Scanning: Found 2 viruses
Filename Checks:  (1 eicar.com)
Other Checks: Found 1 problems
===========================================================================
Virus Scanner test reports:
Clamd said "eicar.com was infected: Eicar-Test-Signature"

If any of your virus scanners (clamd)
are not listed there, you should check that they are installed correctly
and that MailScanner is finding them correctly via its virus.scanners.conf.
[root at sbh16 MailScanner]#


More information about the MailScanner mailing list