Just a relevant update. About this comment:
Searching the /var/log for the "procmail" word I understood why the log file was created but never changed more.
Originally Posted by boxmga
At the same time that I've sent an e-mail message from my gmail account to the zimbra (to test the filter on incoming messages), another coworker tried (just for test) to send an e-mail *from* Zimbra *to* outside.
So, the mail.log shows me this:
Then I tested again sending an e-mail from zimbra to outside and, again, procmail pipe acted: the log file was created with this entry:
Sep 2 16:36:54 mga0-srvmail postfix/pipe: 46C1D25C003C: to=<fabricio.rigotti@XXXX.com.br>, relay=procmail-pipe, delay=5911, delays=5911/0.02/0/0.04, dsn=2.0.0, status=sent (delivered via procmail-pipe service)
At same time, /var/log/mail.log shows:
procmail:  Tue Sep 3 08:40:22 2013
procmail: No match on "^Subject.*LIXO.*"
procmail: Assigning "LASTFOLDER=/tmp_procmail/new/1378208422.25619_1.mga0-srvmail.XXXX.com.br"
Folder: /tmp_procmail/new/1378208422.25619_1.mga0-srvmail.XXXX. 1692
procmail: Unlocking "/tmp_procmail/procmaillock"
But, in opposite direction (from outside to the zimbra), it simply doesn't run.
Sep 3 08:40:22 mga0-srvmail postfix/pipe: 8FDF225C0092: to=<XXXX@gmail.com>, relay=procmail-pipe, delay=0.13, delays=0.04/0.02/0/0.08, dsn=2.0.0, status=sent (delivered via procmail-pipe service)
Only then I realized that the "how-to" that I've used teach to filter outgoing traffic, not specifically incoming messages.
This way, can anyone help me, telling if its possible (and how) to use procmail to filter incoming messages via pipe?
I just want to modify the content of message - in this case, selectively removing attachments, without interfering with the delivery.