I have a perfectly working postfix+mysql+courier-imap setup with two virtual domains. I would like to add maildrop to add mail filtering, but am having no luck.
I'm running:
Code: Select all
postfix-2.0.19
mysql-4.0.18-r2
courier-imap-3.0.2
maildrop-1.5.3-r1
spamassassin-2.63
Code: Select all
DEFAULT="${HOME}/Maildir/"
xfilter "/usr/bin/spamc"
if (/^X-Spam-Flag: YES/)
{
to $DEFAULT/.Spam/
}
Code: Select all
Tcp port: 3306 Unix socket: /var/run/mysqld/mysqld.sock
Time Id Command Argument
040625 15:07:47 1 Connect mailsys@localhost on
1 Init DB maildb
1 Query SELECT id, uid, gid, home, maildir, quota, smtpok FROM users WHERE id = "user@domain.com"
1 Quit
Code: Select all
thorin root # cat spamtxt | maildrop -d user@domain.com -V 5
maildrop: Changing to /var/export/home/domain.com/user
Message start at 0 bytes, envelope sender=user@domain.com
/etc/maildroprc(2): DEFAULT="/var/export/home/domain.com/user/Maildir/"
/etc/maildroprc(3): LOGDIR="/var/log"
/etc/maildroprc(5): Opening logfile /var/log/maildrop.log
maildrop: Filtering through xfilter /usr/bin/spamc
/etc/maildroprc(8): Evaluating IF condition.
Matching /^X-Spam-Flag: YES/ against Received: from localhost by mail.domain.com with SpamAssassin (2.63 2004-01-11); Fri, 25 Jun 2004 15:36:35 +0200
Not matched.
Matching /^X-Spam-Flag: YES/ against From: Sender <sender@example.net>
Not matched.
Matching /^X-Spam-Flag: YES/ against To: Recipient <user@domain.com>
Not matched.
Matching /^X-Spam-Flag: YES/ against Subject: Test spam mail (GTUBE)
Not matched.
Matching /^X-Spam-Flag: YES/ against Date: Fri, 25 Jun 2004 11:00:00 +0200
Not matched.
Matching /^X-Spam-Flag: YES/ against Message-Id: <GTUBE1.1010101@example.net>
Not matched.
Matching /^X-Spam-Flag: YES/ against X-Spam-Flag: YES
/etc/maildroprc(8): Search of ^X-Spam-Flag: YES = 1
/etc/maildroprc(8): IF evaluated, result=1
maildrop: Attempting .mailfilter
maildrop: Delivery complete.
maildrop: signal 0x0B
Code: Select all
maildrop: Changing to /var/export/home/domain.com/user
Message start at 0 bytes, envelope sender=user@domain.com
/etc/maildroprc(2): DEFAULT="/var/export/home/domain.com/user/Maildir/"
/etc/maildroprc(3): LOGDIR="/var/log"
/etc/maildroprc(5): Opening logfile /var/log/maildrop.log
maildrop: Filtering through xfilter /usr/bin/spamc
/etc/maildroprc(8): Evaluating IF condition.
Matching /^X-Spam-Flag: YES/ against Received: from localhost by mail.domain.com with SpamAssassin (2.63 2004-01-11); Fri, 25 Jun 2004 15:36:35 +0200
Not matched.
Matching /^X-Spam-Flag: YES/ against From: Sender <sender@example.net>
Not matched.
Matching /^X-Spam-Flag: YES/ against To: Recipient <user@domain.com>
Not matched.
Matching /^X-Spam-Flag: YES/ against Subject: Test spam mail (GTUBE)
Not matched.
Matching /^X-Spam-Flag: YES/ against Date: Fri, 25 Jun 2004 11:00:00 +0200
Not matched.
Matching /^X-Spam-Flag: YES/ against Message-Id: <GTUBE1.1010101@example.net>
Not matched.
Matching /^X-Spam-Flag: YES/ against X-Spam-Flag: YES
/etc/maildroprc(8): Search of ^X-Spam-Flag: YES = 1
/etc/maildroprc(8): IF evaluated, result=1
maildrop: Attempting .mailfilter
maildrop: Delivery complete.
I googled for the 0x0B in connection to maildrop and found some references to people re-emerging with CFLAGS and CXXFLAGS empty, so I tried this also but it didn't change anything. So long as I don't want to re-direct spam-flagged email all is well, but the point behind maildrop for me is not just running the xfilter but also delivering to a different maildir...
There were other suggestions on the net to adjust suid and permissions on /usr/bin/maildrop but this made no difference either.
Does anyone have any idea of what might be wrong?
Kailee.
PS: Could this be perl related?



