Hi, I am a comparative Linux newbie. I have a five-pc network which has a
Linux RH9 server providing file (SAMBA), printing, DNS and mail services to
the mixed Linux or Windows clients, all served by a DSL router & ADSL.

I collect mail from my ISP's POP3 server via fetchmail which delivers to
qmail which in turn delivers to the users Maildir's.

I installed qmail pretty much following Life with qmail. I have installed
qmail-scanner with clamav and spamassassin as per Michael Bowe's howto on
QMAIL-SCANNER + CLAM ANTIVIRUS +
SPAMASSASSIN.(http://www.pipeline.com.au/staff/mbowe/isp/webmail-server.htm)

It's all working but the problem is that qmail-scanner identifies all mail
received via fetchmail as being from 127.0.0.1, so the scanning rules in
/etc/tcp.smtp (see below, based on the recommendation on the qmail-scanner
homepage) can't distinguish between localhost (127.), local network
(192.168.0.) and external sources of mail.

Qmail-scanner identifies all mail as coming from 127.0.0.1 (so
RELAYCLIENT="" applies) and so sets RC:1 and then Spamassassin doesn't get
called (for an example, see extracts from
/var/spool/qmailscan/qmail-queue.log below).

In order to get all external mail scanned by Spamasssassin I have set the
QS_SPAMASSASSIN="" flag. So now the external mail is properly scanned but
all localhost and local network mail also gets scanned by Spamassassin and
Clamav, which is OK but is probably unnecessary and slows things down. If I
don't set the RELAYCLIENT="" flag (to make RC:0) then qmail won't send the
mail (correctly).

My question: Is there a way for qmail-scanner to identify the 'real' origin
of the email - i.e. from the first Received: header line - and use that to
set the RC:0/1 flag?

I have checked the qmail-scanner list archives and haven't found an answer
and I have also reviewed the fetchmail documentation to see if it can pass
the original sender IP to qmail, but it does not seem possible from that
side.

Thank you in advance for any help.

Ken

------------------------------
part of /etc/tcp.smtp:

# Putting QS_SPAMASSASSIN="on" forces SA scanning for all mail
#
# Should be: No Qmail-Scanner at all for mail from 127.0.0.1 but
qmail-scanner thinks all mail
# is from 127.0.0.1, so it all has to be dealt with in this line:
127.:allow,RELAYCLIENT="",QS_SPAMASSASSIN="",RBLSMTPD="",QMAILQUEUE="/var/qm
ail/bin/qmail-scanner-queue.pl"
# Should be: Use Qmail-Scanner without SpamAssassin on any mail from the
local network
# [it triggers SpamAssassin via the presence of the RELAYCLIENT var]
192.168.0.:allow,RELAYCLIENT="",QS_SPAMASSASSIN="",RBLSMTPD="",QMAILQUEUE="/
var/qmail/bin/qmail-scanner-queue.pl"
# Use Qmail-Scanner with SpamAssassin on any mail from the rest of the world
:allow,QMAILQUEUE="/var/qmail/bin/qmail-scanner-queue.pl"


------------------------------
extract from /var/spool/qmailscan/qmail-queue.log
(many (irrelevant...) lines deleted for space)

Tue, 20 Jan 2004 08:43:08 +0200:4598: +++ starting debugging for process
4598 by uid=514 at Tue, 20 Jan 2004 08:43:08 +0200
...
Tue, 20 Jan 2004 08:43:08 +0200:4598: program name is
qmail-scanner-queue.pl, version 1.20
Tue, 20 Jan 2004 08:43:08 +0200:4598: incoming SMTP connection from via SMTP
from 127.0.0.1
...
Tue, 20 Jan 2004 08:43:08 +0200:4598: unsetting QMAILQUEUE env var
Tue, 20 Jan 2004 08:43:08 +0200:4598: g_e_h: return-path is
"[EMAIL PROTECTED]", recips is "[EMAIL PROTECTED]"
Tue, 20 Jan 2004 08:43:08 +0200:4598: from="Milford Ryan"
<[EMAIL PROTECTED]>,subj=enunciable,
x-qmail-scanner-message-id=<[EMAIL PROTECTED]> via SMTP from
127.0.0.1
Tue, 20 Jan 2004 08:43:08 +0200:4598: ini_sc: start scanning
Tue, 20 Jan 2004 08:43:08 +0200:4598: ini_sc: recursively scan the directory
/var/spool/qmailscan/tmp/silverdesk.kenironside.co.za10745809884614598/
Tue, 20 Jan 2004 08:43:08 +0200:4598: scanloop: starting scan of directory
"/var/spool/qmailscan/tmp/silverdesk.kenironside.co.za10745809884614598"...
Tue, 20 Jan 2004 08:43:08 +0200:4598: scanloop:
scanner=clamscan_scanner,plain_text_msg=0
...
Tue, 20 Jan 2004 08:43:08 +0200:4598: --output of clamscan was:
/var/spool/qmailscan/tmp/silverdesk.kenironside.co.za10745809884614598/10745
80988.4600-0.silverdesk.kenironside.co.za: OK
/var/spool/qmailscan/tmp/silverdesk.kenironside.co.za10745809884614598/10745
80988.4600-1.silverdesk.kenironside.co.za: OK
--
Tue, 20 Jan 2004 08:43:08 +0200:4598: clamscan: finished scan of dir
"/var/spool/qmailscan/tmp/silverdesk.kenironside.co.za10745809884614598" in
1.365785 secs
Tue, 20 Jan 2004 08:43:08 +0200:4598: scanloop:
scanner=spamassassin,plain_text_msg=0
Tue, 20 Jan 2004 08:43:08 +0200:4598: scanloop: finished scan of
"/var/spool/qmailscan/tmp/silverdesk.kenironside.co.za10745809884614598"...
Tue, 20 Jan 2004 08:43:08 +0200:4598: p_s: starting scan of directory
"/var/spool/qmailscan/tmp/silverdesk.kenironside.co.za10745809884614598"...
Tue, 20 Jan 2004 08:43:08 +0200:4598: scanloop:
scanner=spamassassin,plain_text_msg=0
Tue, 20 Jan 2004 08:43:08 +0200:4598: scanloop: finished scan of
"/var/spool/qmailscan/tmp/silverdesk.kenironside.co.za10745809884614598"...
Tue, 20 Jan 2004 08:43:08 +0200:4598: p_s: starting scan of directory
"/var/spool/qmailscan/tmp/silverdesk.kenironside.co.za10745809884614598"...
...
Tue, 20 Jan 2004 08:43:08 +0200:4598: p_s:  finished scan of dir
"/var/spool/qmailscan/tmp/silverdesk.kenironside.co.za10745809884614598" in
0.088553 secs
Tue, 20 Jan 2004 08:43:08 +0200:4598: ini_sc: scanning message took 1.455098
seconds
Tue, 20 Jan 2004 08:43:08 +0200:4598: q_r: fork off child into
/var/qmail/bin/qmail-queue...
Tue, 20 Jan 2004 08:43:08 +0200:4604: q_r: xstatus=0
Tue, 20 Jan 2004 08:43:08 +0200:4598: qmail-scanner[4598]:
Clear:RC:1(127.0.0.1): 1.493806 5348 [EMAIL PROTECTED]
[EMAIL PROTECTED] enunciable <[EMAIL PROTECTED]>
1074580988.4600-0.silverdesk.kenironside.co.za:170
1074580988.4600-1.silverdesk.kenironside.co.za:3575
...
20/01/2004 08:43:09:4598: all finished. Total of 1.585604 secs






-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Qmail-scanner-general mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/qmail-scanner-general

Reply via email to