Postfix not delivering to Maildir

Filed Under (Mail, Red Hat) by jc on 27-07-2009

Tagged Under : , , ,

I came across this problem a few time and I keep forgetting the solution. Sometimes, even if you set in:

/etc/postfix/main.cf:

home_mailbox = Maildir/

postfix will still deliver to /var/spool/mail/user.

There are 2 ways to solve this problem:

1. you can disable procmail by removing the following line from /etc/postfix/main.cf:
mailbox_command = /usr/bin/procmail

2. If you need procmail, add the following lines to /etc/procmailrc:
MAILDIR=$HOME/Maildir
DEFAULT=${MAILDIR}/

That’s it!
–JC

Configure BCC Maps in Postfix

Filed Under (Mail) by jc on 29-04-2009

Tagged Under : ,

BCC maps are handled in postfix by the following tags:

always_bcc = address
Deliver a copy of all mail to the specified address. In Postfix versions before 2.1, this feature is implemented by smtpd(8), qmqpd(8), or pickup(8).

sender_bcc_maps = type:table
Search the specified “type:table” lookup table with the envelope sender address for an automatic BCC address. This feature is available in Postfix 2.1 and later.

recipient_bcc_maps = type:table
Search the specified “type:table” lookup table with the envelope recipient address for an automatic BCC address. This feature is available in Postfix 2.1 and later.

So this is how I did it:

Added the following lines to /etc/postfix/main.cf:

sender_bcc_maps = hash:/etc/postfix/bcc_maps
recipient_bcc_maps = hash:/etc/postfix/bcc_maps

Edited the file /etc/postfix/bcc_maps :

monitorme@linuxzone.org admin@linuxzone.org

This way for all messages sent and received by monitorme@linuxzone.org, a copy will be sent to admin@linuxzone.org

Ran postmap /etc/postfix/bcc_maps

restarted postfix.