Hello
I have a problem with maildrop. I have read dozens of webs/howto/emails but couldnt solve it.
My objective is moving automatically spam messages to a spam folder. My email server is working perfectly. It marks spam in subject and headers using spamassasin.
My box has:
Ubuntu 9.04
Web: Apache2 + Php5 + MySQL
MTA: Postfix 2.5.5 + SpamAssasin + virtual users using mysql
IMAP: Courier 0.61.2 + Courier AuthLib
WebMail: SquirrelMail
I have read that I could use Squirrelmail directly (not a good idea), procmail or maildrop. As I already have maildrop in the box (from courier)
I have configured the server to use maildrop (added an entry in transport table for a virtual domain).
I found this error in email:
This is the mail system at host foo.net
I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.
For further assistance, please send mail to postmaster.
If you do so, please include this problem report. You can
delete your own text from the attached returned message.
The mail system
<
[email protected]>: user unknown. Command output: Invalid user specified.
Final-Recipient: rfc822;
[email protected]
Action: failed
Status: 5.1.1
Diagnostic-Code: x-unix; Invalid user specified.
---------- Forwarded message ----------
From: test <
[email protected]>
To:
[email protected]
Date: Sat, 1 May 2010 19:49:57 +0100
Subject: fail
fail
An this in the logs
May 1 18:50:18 foo.net postfix/smtpd[14638]: connect from mail-bw0-f212.google.com[209.85.218.212]
May 1 18:50:19 foo.net postfix/smtpd[14638]: 8A9E9DC23F: client=mail-bw0-f212.google.com[209.85.218.212]
May 1 18:50:19 foo.net postfix/cleanup[14643]: 8A9E9DC23F: message-id=<
[email protected]>
May 1 18:50:19 foo.net postfix/qmgr[14628]: 8A9E9DC23F: from=<
[email protected]>, size=1858, nrcpt=1 (queue active)
May 1 18:50:23 foo.net postfix/pickup[14627]: 1D4B4DC2AA: uid=5002 from=<
[email protected]>
May 1 18:50:23 foo.net postfix/cleanup[14643]: 1D4B4DC2AA: message-id=<
[email protected]>
May 1 18:50:23 foo.net postfix/pipe[14644]: 8A9E9DC23F: to=<
[email protected]>, relay=spamassassin, delay=3.8, delays=0.55/0.02/0/3.2, dsn=2.0.0, status=sent (delivered via spamassassin service)
May 1 18:50:23 foo.net postfix/qmgr[14628]: 8A9E9DC23F: removed
May 1 18:50:23 foo.net postfix/qmgr[14628]: 1D4B4DC2AA: from=<
[email protected]>, size=2173, nrcpt=1 (queue active)
**May 1 18:50:23 foo.netpostfix/pipe[14648]: 1D4B4DC2AA: to=<
[email protected]>, relay=maildrop, delay=0.22, delays=0.06/0.01/0/0.15, dsn=5.1.1, status=bounced (user unknown. Command output: Invalid user specified. )**
May 1 18:50:23 foo.net postfix/cleanup[14643]: 4C2BFDC240: message-id=<
[email protected]>
May 1 18:50:23 foo.net postfix/qmgr[14628]: 4C2BFDC240: from=<>, size=3822, nrcpt=1 (queue active)
May 1 18:50:23 foo.net postfix/bounce[14651]: 1D4B4DC2AA:
sender non-delivery notification: 4C2BFDC240
May 1 18:50:23 foo.net postfix/qmgr[14628]: 1D4B4DC2AA: removed
May 1 18:50:24 foo.net postfix/smtp[14653]: 4C2BFDC240: to=<
[email protected]>, relay=gmail-smtp-in.l.google.com[209.85.211.97]:25, delay=0.91, delays=0.02/0.03/0.12/0.74, dsn=2.0.0, status=sent (250 2.0.0 OK 1272739824 37si5422420ywh.59)
May 1 18:50:24 foo.net postfix/qmgr[14628]: 4C2BFDC240: removed
My config files:
http://lar3d.net/main.cf (/etc/postfix)
http://lar3d.net/master.c (/etc/postfix)
http://lar3d.net/local.cf (/etc/spamassasin)
http://lar3d.net/maildroprc (maildroprc)
If I change master.cf line (as suggested here)
maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/lib/courier/bin/maildrop -d ${recipient}
with
maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/lib/courier/bin/maildrop -d vmail ${recipient}
I get the email in /home/vmail/MailDir instead of the correct dir (/home/vmail/foo.net/info/.SPAM )
After reading a lot I have some guess but not sure.
- Maybe I have to install userdb?
- Maybe is something related with mysql, but everything is working ok
- If I try with procmail I will face same problem...
- What are flags DRhu for? Couldnt find doc about them
- In some places I found maildrop line with more parameters
flags=DRhu user=vmail argv=/usr/lib/courier/bin/maildrop -d $
${recipient} ${extension} ${recipient} ${user} ${nexthop} ${sender}
I am really lost. Dont know how to continue. If you have any idea or
need another config file please let me know.
Thanks!!!