Results 1 to 2 of 2

Thread: procmail pipe doesn't work

  1. #1
    Join Date
    Sep 2013
    Posts
    2
    Rep Power
    2

    Default procmail pipe doesn't work

    Hi everyone,

    This is my first post and the english isn't my native language. So, my excuses in advance if break some rule or ask something stupid.

    I just installed and set up ZCS 8.0 on Ubuntu 12.04 LTS (amd-64). Everything is working fine, except one thing.

    I need to filter attachments on incoming messages per group/user basis. So, as ZCS don't do this nativelly, I'm trying workaround using a procmail pipe.

    I followed the steps of this "how to": How to use Procmail with ZCS | asingh, doing exactly what it told to do (not a big deal).

    However, the pipe didn't work. The messages still coming fine, but without passing through procmail, thus bypassing the filtering.

    The problem aren't the filter settings, but the pipe calling: it simple don't run. The major evidence of this is the log file indicated in procmailrc, that never ever is created.

    If we try to call the procmail directly by linux shell (using the same username indicated on /opt/zimbra/postfix/conf/transport, in this case, "zimbra") the filtering works fine (e.g: "cat any_message.msg | procmail /opt/zimbra/procmail/procmailrc"). In this case, the log file is created and the message is correctly filtered.

    But through the postfix, nothing happens. I already checked the paths, the directories owners and files permissions. I also double checked the steps of the "how to" and everything was done perfectly.

    The most annoying thing is that the first test appeared to have worked. At least, the log file was created and the procmail recipe was applied (although the regex didn't match, even apparently being correct). But, for the next message (between the 1st and the 2I just changed the regex on procmailrc, trying to match it), nothing work anymore (no more new entries beyond the first).

    No new log entry was created after 1st message. So I tried start again, reviewing all steps (including deleting /opt/zimbra/procmail directoru) and did all config again, and again, and again (including uninstalling and re-installing zimbra from scratch) and nothing works again.

    Can anyone help us with some tip about where/what we need to do to make this feature to work? There is anything else that need to be changed to this?

    Alternatively, can anyone tell me another way to filter de attachments by user or group criteria?

    Best regards.


    Cristiano Ferrari
    Maringá/PR - Brazil

  2. #2
    Join Date
    Sep 2013
    Posts
    2
    Rep Power
    2

    Default

    Just a relevant update. About this comment:

    Quote Originally Posted by boxmga View Post
    (...)

    The most annoying thing is that the first test appeared to have worked. At least, the log file was created and the procmail recipe was applied (although the regex didn't match, even apparently being correct). But, for the next message (between the 1st and the 2I just changed the regex on procmailrc, trying to match it), nothing work anymore (no more new entries beyond the first).

    (...)
    Searching the /var/log for the "procmail" word I understood why the log file was created but never changed more.

    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:

    Code:
    Sep  2 16:36:54 mga0-srvmail postfix/pipe[10298]: 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)
    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:

    Code:
    procmail: [25619] 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"
     Subject: testex1
      Folder: /tmp_procmail/new/1378208422.25619_1.mga0-srvmail.XXXX.     1692
    procmail: Unlocking "/tmp_procmail/procmaillock"
    At same time, /var/log/mail.log shows:

    Code:
    Sep  3 08:40:22 mga0-srvmail postfix/pipe[25618]: 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)
    But, in opposite direction (from outside to the zimbra), it simply doesn't run.

    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.

Similar Threads

  1. TLS-Connection - Broken Pipe network_biopair_interop
    By martinmuc in forum Administrators
    Replies: 5
    Last Post: 08-04-2009, 06:36 AM
  2. Forwarding to a mail pipe
    By gfdos.sys in forum Administrators
    Replies: 4
    Last Post: 01-05-2009, 06:31 AM
  3. Pipe in password
    By chrisinajar in forum Installation
    Replies: 1
    Last Post: 03-10-2008, 09:19 PM
  4. imapsslserver: broken pipe
    By BillyB in forum Administrators
    Replies: 8
    Last Post: 11-09-2007, 01:41 PM
  5. How to pipe into a script
    By nexus in forum Administrators
    Replies: 0
    Last Post: 02-20-2007, 12:04 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •