Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 135636 - qmail-scanner 2.01 uses wrong scandir
Summary: qmail-scanner 2.01 uses wrong scandir
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Qmail Team (OBSOLETE)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-05 07:56 UTC by Peter Gantner (a.k.a. nephros)
Modified: 2008-01-04 22:48 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
qmail-scanner-2.0.1-fix (patch,1.63 KB, patch)
2007-02-28 14:20 UTC, MT
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Gantner (a.k.a. nephros) 2006-06-05 07:56:20 UTC
From mail.err:

  # tail /var/log/mail.err
  Jun  5 16:32:48 scourge X-Qmail-Scanner-2.01st: [] cannot create /var/spool/qscan/tmp - No such file or directory 
  Jun  5 16:32:54 scourge last message repeated 9 times


  # ls -l /var/spool/
  total 1
  drwxr-xr-x 4 at     at      96 Jan 27  2004 at
  drwxr-x--- 4 root   cron   120 Mar 10  2005 cron
  drwx--x--- 3 root   lp     216 May 22 18:49 cups
  drwxr-xr-x 3 root   root    72 Sep 25  2004 cups-pdf
  drwxr-xr-x 2 root   root    72 Jul 31  2003 locate
  drwxrwxr-x 2 root   mail   144 May  1  2005 mail
  drwxr-xr-x 7 qscand qscand 912 Jun  4 21:43 qmailscan
  drwxrwxrwt 2 root   root    72 May  7 20:17 samba

so there is no /var/spool/qscan.

If I read the setup correctly, this dir is set in qmail-scanner-queue.pl in the
$scandir, $configdir and $logdir variables which AFAIK are not overridden by any config file.

In previous versions this was set to /var/spool/qmailscan which is also provided and set up correctly by the ebuild.

My qmail-scanner ebuild is the modified ebuild according to Bug #134826 but I don't think the patch from there has anything to do with this.
Comment 1 Martin Mokrejš 2006-06-07 14:59:29 UTC
I have same problem since few hours, when I upgraded my ~x86 system from mail-filter/qmail-scanner-1.25-r1 to mail-filter/qmail-scanner-2.01.


Simple attempt to do:

# cd /var/spool/
# ln -s qmailscan qscan

doesn't help. as I get immediately yet another error:

@4000000044874bc41cd7145c X-Qmail-Scanner-2.01st:[vrapenec11497174347678228] cannot open /var/spool/qscan/quarantine-events.db - No such file or directory

Comment 2 Martin Mokrejš 2006-06-07 15:07:18 UTC
I unmerged the new qmail-scanner and emerged the previous version 1.25-r1. I am puzzled with this output from the emerge process. I guess the ebuild file has been partly updated to reflect new paths but it was not finished carefully. The 
/var/spool/qscan/ directory does not exist and qmail-scanner-queue.pl -z does not create it either!


[...]
Remember to copy quarantine-attachments.txt to /var/spool/qmailscan and then
run "qmail-scanner-queue.pl -g" to generate DB version.

X-Qmail-Scanner-2.01st:[] cannot open /var/spool/qscan/qmail-scanner-queue-version.txt - did you initialise the system by running "qmail-scanner-queue.pl -z"? - No such file or directory
[...]
Comment 3 Torsten Kurbad 2006-06-08 04:33:21 UTC
Same here.

I fixed this problem in a rather ugly way with an

# ln -s /var/spool/qmailscan /var/spool/qscan

for now, but there should be a more lasting solution. Obviously, the configure script ignores the --spooldir setting and in spite configures qmail-scanner-queue.pl for /var/spool/qscan

Weird!
Comment 4 pedro venda 2006-06-15 12:58:41 UTC
I confirm this issue.

I've installed qmail-scanner-2.01 to work with netqmail-1.05-r3 and it puked about 2 error lines upon installation. It didn't run because it expects to find /var/spool/qscan but the ebuild creates /var/spool/qmailscan.

After creating the missing files and giving proper permissions AND changing /var/qmail/bin/qmail-scanner-queue.pl to have:

my $scandir = '/var/spool/qmailscan';
my $configdir = '/var/spool/qmailscan';
my $logdir = '/var/spool/qmailscan';

I would suggest linking this bug to bug #82718 and to build a joint fix.
Comment 5 MT 2007-02-28 14:20:18 UTC
Created attachment 111547 [details, diff]
qmail-scanner-2.0.1-fix

this patch fix all problems reported in this bugreports.

to QMAIL TEAM: please apply the patch into the portage branch as soon as possible because qmail-scanner 1.25-r1 do not work any more with the last qmail/clamav stable version and people that use qmail/courier-imap email server have a totaly broken box.
Comment 6 Peter Gantner (a.k.a. nephros) 2007-03-15 09:16:46 UTC
Can someone please give this issue some loving?

I just got bitten by it AGAIN when I did the qmail --> netqmail thing.

IIRC the qmail removal is scheduled for mid-April - presumably more people will stumble over this at that point.
Comment 7 Tupone Alfredo gentoo-dev 2008-01-04 22:48:01 UTC
Should be fixed in 2.01-r1. Thanks