From: Josh Grebe [mailto:jo...@shortcutsolutions.net]
I've gone through the archives and I've seen a few threads where
people are asking for a 'maildrop' that uses authlib for local
delivery. Notably, I've seen responses from Sam saying this was not
the correct way to achieve the desired result. What I haven't
discovered is the correct way to do it.
For clarity, here is what I'm doing in my setup.
( All users are virtual, using mysql )
1. Courier recieves email via esmtpd.
2. Courierfilter runs through clamav and denies infected,
accepts clean
3. Courier accepts the message for delivery and disconnects
from remote host.
4. DEFAULTDELIVERY is set to "| /usr/local/bin/filter \$USER" to
send it to a script for SpamAssassin and other local processing
5. Now I'd like to hand it to maildrop to deliver to the virtual
user's maildir(via maildrop -d $user). However, maildrop does not
have authlib support, and cannot find the user.
What I'm doing currently is running a seperately-packaged maildrop
that does have authlib support, and this works perfectly. However,
I'd rather do it the Right Way and not have a one-off package that I
need to maintain seperately.
Can anyone shed some light for me?
I think what you are missing is the 'xfilter' command for maildrop.
Here is the correct way:
4. DEFAULTDELIVERY is set to "| /usr/lib/courier/bin/maildrop"
5. /etc/courier/maildroprc has the command:
"xfilter /usr/local/bin/filter"
6. The filter program is designed to accept the entire email on
standard input, make any changes, and output the entire changed email
to standard output.
7. Maildrop continues normal delivery with the changed email.
This will let you use the normal packaged maildrop, which will get the
user information directly from Courier. You could still pass the
$USER variable to the filter program if you want different filtering
for different people. Keep in mind that an xfilter cannot directly
change the delivery of the message, it can only modify it. If you
want different delivery options (to a sub-folder, for instance), you
would need to have maildrop make those decisions based on headers
added by the filter.
Bowie