2

I want to begin using Procmail in order to perform filtering on specific accounts in virtual domains as received by Postfix on my Centos 7 server. In various articles it seems that there are two common ways to direct the Postfix emails to Procmail:

Method 1):

/etc/postfix/main.cf:
mailbox_command = /usr/bin/procmail  -a "$EXTENSION"

Method 2):

/etc/postfix/main.cf: 
virtual_transport = virtualprocmail:dummy
virtualprocmail_destination_recipient_limit = 1

/etc/postfix/master.cf
virtualprocmail unix - n n - - pipe flags=DRXhuq user=virtualuser 
argv=/usr/bin/procmail -m E_SENDER=$sender E_RECIPIENT=$recipient ER_USER=$user    ER_DOMAIN=$domain ER_DETAIL=$extension NEXTHOP=$nexthop

I'm unsure of which method to use with my Postfix virtual domains. What are the Pros and Cons of each of these methods for sending the emails to Procmail?

EDIT: Thanks! Yes, the Postfix Maildrop page does clarify this matter.

In summary: Method 1) requires the use of system user accounts, while Method 2) allows the use of virtual domains and virtual aliases.

so... this problem is solved.

2
  • 1
    postfix.org/MAILDROP_README.html
    – masegaloeh
    Jan 24, 2015 at 4:48
  • Instead of updating the question, post an answer and mark it as accepted. That way, this question will no longer show up as unresolved. Thanks.
    – tripleee
    Jan 26, 2015 at 8:03

1 Answer 1

2

Page MAILDROP README from postfix documentation will you give some technical information about both of method. In this section I'll quote the snippet when you should use mailbox_command method or use virtual_transport.

Use mailbox_command if you have multiple user configured with local system account. Usually the domain would fall in mydestination parameter. Snippet from the page

Postfix can be configured to deliver mail to maildrop via the local delivery agent. This is slightly less efficient than the "direct" approach discussed above, but gives you the convenience of local aliases(5) expansion and $HOME/.forward file processing. You would typically use this for domains that are listed in mydestination and that have users with a UNIX system account.

Otherwise, you should use virtual_transport method.

Anyway, you should understand the concept of four domain classes in postfix. In fact, virtual_transport would fall in virtual address class and mailbox would serves local address class.

You must log in to answer this question.

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