Hey All,
        I'm in the porcess of trying to get spamassassin filtering working on a 
per user basis and I have something that works but I'm having a small 
issue. with qmailDotMode and deliveryProgramPath.

If I create a .qmail file and set qmailDotMode to dotonly this works 
fine with the .qmail contents as:
# cat .qmail
|/bin/spam-check blahz.ab.ca [EMAIL PROTECTED]

where spam-check is:
# cat /bin/spam-check
#!/bin/sh
/usr/bin/spamc -f | maildir /var/qmail/maildirs/$1/$2/Maildir

And the user test is
qldap_lookup:   searching with ([EMAIL PROTECTED])
qldap_lookup:   succeeded, found:
                 uid: [EMAIL PROTECTED]
                 qmailUID: 1002
                 qmailGID: 2110
                 accountStatus: active
                 mailMessageStore: 
[EMAIL PROTECTED]
                 homeDirectory: (null pointer)
                 mailHost: mail2.blahz.ab.ca
                 mail: [EMAIL PROTECTED]
                 mailAlternateAddress: no entry in the database
                 mailQuota: no entry in the database
                 mailForwardingAddress: no entry in the database
                 qmailDotMode: dotonly
                 deliveryMode: localdelivery
                 mailReplyText: no entry in the database

With it set this way I get only one copy of the message.  The one that 
has been processed by spamc then delivered via maildir.

But if I change it to using the deliveryProgramPath ie:
qldap_lookup:   searching with ([EMAIL PROTECTED])
qldap_lookup:   succeeded, found:
                 uid: [EMAIL PROTECTED]
                 qmailUID: 1002
                 qmailGID: 2110
                 accountStatus: active
                 mailMessageStore: 
[EMAIL PROTECTED]
                 homeDirectory: (null pointer)
                 mailHost: mail2.blahz.ab.ca
                 mail: [EMAIL PROTECTED]
                 mailAlternateAddress: no entry in the database
                 mailQuota: no entry in the database
                 mailForwardingAddress: no entry in the database
                 deliveryProgramPath: /bin/spam-check blahz.ab.ca 
[EMAIL PROTECTED]
                 qmailDotMode: ldapwithprog
                 deliveryMode: localdelivery
                 mailReplyText: no entry in the database

When I send a message to the account, I still get the message that has 
been processed by the spamc but I also get a untouched copy delivered 
from ldap.  The delivery log from qmail-send is as follows:

@400000003d87806121cc84ec new msg 983085
@400000003d87806121cca42c info msg 983085: bytes 1019 from 
<[EMAIL PROTECTED]> qp 21377 uid 204
@400000003d878061232713ac starting delivery 5985: msg 983085 to local 
[EMAIL PROTECTED]
@400000003d878061232736d4 status: local 1/10 remote 0/40
@400000003d8780612c882b5c delivery 5985: success: 
1032290401.7031021382.medusa.blahz.ab.ca/did_1+0+1/
@400000003d8780612cab2864 status: local 0/10 remote 0/40
@400000003d8780612cab3804 end msg 983085

Is there anyway to us deliveryProgramPath without getting 2 copies of 
every message?  I tried using a qmailDotMode of progonly but from 
examining the source it's not a valid option. I'd like to be able to 
easily set this up without having to write out a .qmail file to each 
user account directory that needs the spamassassin filtering.

--Mike



Reply via email to