0

I use Postfix with virtual mailbox and Maildrop for the transport agent. All my emails are delivered to the folder /home/vmail/domain.tld/user/. Today I noticed that emails sent to non-existent addresses are delivered to the file /home/vmail/domain.tld/user. I would rather have them rejected by the server with an error message to the sender.

I think it is responsible to the /etc/postfix/maildroprc file that contains the rules DEFAULT="/home/vmail/$1/$2"

The file /etc/postfix/main.cfg

virtual_mailbox_base = /home/vmail
virtual_mailbox_maps = hash:/etc/postfix/vmailbox
virtual_alias_maps = hash:/etc/postfix/virtual
virtual_transport = maildrop
maildrop_destination_recipient_limit = 1

The rule in /etc/postfix/master.cfg

maildrop  unix  -       n       n       -       -       pipe
   flags=ODRhu user=vmail argv=/usr/bin/maildrop /etc/postfix/maildroprc ${domain} ${user} ${extension} ${recipient} ${user} ${nexthop}

Any idea how I can specify a list of valid emails ? All the emails addresses (except redirections which are in virtual) are listed in the vmailbox database but it seems not use it.

1 Answer 1

1

http://www.postfix.org/LOCAL_RECIPIENT_README.html

You have to correctly set local_recipient_maps in main.cf. This depends on how you manage users (system users, mysql, etc).

It could be something like local_recipient_maps = mysql:/etc/postfix/sql-recipients.cf for mysql.

1
  • Thanks. It seems to work well. In my case, it was local_transport = virtual and local_recipient_maps = $virtual_mailbox_maps (I use virtual mailbox, not mysql) Nov 21, 2012 at 15:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .