[ start | index | login ]
start > maildrop notes

maildrop notes

Created by alex. Last edited by alex, one year and 23 days ago. Viewed 872 times. #4
[diff] [history] [edit] [rdf]
labels
attachments
This is about Postfix 2.2.10 and maildrop 2.0.4 on EL4.

Postfix is configured with no Unix users, just lots of virtual domains and virtual users, e.g. main.cf:

#/etc/postfix/main.cf
…
virtual_alias_maps = hash:/etc/postfix/virtual
virtrual_mailbox_domains = firstname_lastname.com firstname2_lastname2.com firstname3_lastname3.com
virtual_mailbox_base = /var/mail/vhosts
virtual_mailbox_maps = hash:/etc/postfix/vmailbox
...

#/etc/postfix/virtual
#there are some mail aliases here which forward to another MX
#because the users are not Unix users so they don't have a $HOME/.forward
user1@firstname_lastname.com foo@another.domain.tld
user2@firstname_lastname.com blah@yet.another.domain.tld
#this is also different from /etc/aliases which is only for local aliases

#/etc/postfix/vmailbox
firstname@firstname_lastname.com  name1/Maildir
firstname2@firstname2_lastname.com name2/Maildir
lastname@firstname_lastname.com name1/Maildir
…
#this maps the various e-mail addresses to a mailbox

Now we want to be able to use maildrop to do some filtering on the mails on this family server. This HOWTO claims to do it: >>http://www.postfix.org/MAILDROP_README.html

Simply install maildrop and add these two lines to main.cf:

maildrop_destination_recipient_limit = 1
virtual_transport = maildrop
This will use maildrop as the delivery agent for all virtual addresses, but not for any mail related to local Unix accounts, and it tells Postfix that maildrop only processes one message at a time. You also need to add the appropriate pipe command in master.cf as in the howto.

Too bad it doesn't work!

/etc/init.d/postfix reload
Aug  5 21:51:39 hostname postfix/pipe[3088]: 23066246EE: to=<postmaster@hostname>, relay=maildrop, delay=0, status=bounced (user unknown. Command output: Invalid user specified. )
What now? Google to the rescue: >>http://www.security-express.com/archives/postfix/2004-04/1411.html It seems we "merely" need to configure maildrop to understand the mappings in the virtual_mailbox_maps file, otherwise it doesn't know where to actually deliver the mail.

There's a bunch of references on the web to MySQL or LDAP based lookups, or "makeuserdb" all of which seem irrelevant for us.

Possibly useful links

Example maildroprc: >>http://gentoo-wiki.com/Maildrop_configuration Official latest docs: >>http://www.courier-mta.org/maildrop/maildrop.html Example maildroprc: >>http://www.vanadac.com/~dajhorn/projects/fsavp/maildroprc.txt

Some maildrop tricks

something about env vars: >>http://osdir.com/ml/mail.maildrop/2004-01/msg00038.html tips from 1998: >>http://www.courier-mta.org/maildrop/maildroptips.html

Here's a similar issue

>>http://sourceforge.net/mailarchive/forum.php?thread_name=468539B5.20004%40interfree.it&forum_name=courier-maildrop
no comments | post comment
Powered by snipsnap.org Found a mistake in a howto? Let us know via an email to p.blikibugs at rimuhosting com.