We've expanded our news coverage and improved our search! Visit news.oreilly.com for the latest or search for all things across O'Reilly!
advertisement

Article:
  Sanitizing Mail on Panther Server
Subject:   procmail problems
Date:   2004-01-31 02:31:12
From:   raffaell
I have some questions about postfix-procmail-cyrus:
- why there is no entrance in email header about procmail pass? There is still only postfix and cyrus entrance:
Received: from xserve ([unix socket]) by xserve (Cyrus v2.1.13) with LMTP; Sat, 31 Jan 2004 10:15:09 +0100
Received: from vsmtp14.tin.it (vsmtp14.tin.it [xxx.xxx.xxx.xxx]) by xserve (Postfix) with ESMTP id 06D1A8B51E2; Sat, 31 Jan 2004 10:15:09 +0100 (CET)


- why postfix can deliver well emails to users (short users name) but not to other names (for example "p.pallino" is a second name of user "pinco"):
Jan 31 11:04:06 xserve postfix/pipe[16851]: 7EEDC8B5BE6: to=<pinco@domain.com>, relay=procmail, delay=1, status=sent (xserve)
Jan 31 11:05:04 xserve postfix/pipe[16851]: 6D6D18B5C15: to=<p.pallino@domain.com>, relay=procmail, delay=0, status=deferred (temporary failure. Command output: procmail: Program failure (65) of "/usr/bin/cyrus/bin/deliver" )

Full Threads Oldest First

Showing messages 1 through 3 of 3.

  • procmail problems
    2004-11-08 12:12:44  Criss_Ittermann [Reply | View]

    I haven't been able to fix the program failure (65) from deliver (cf. cyrus documentation on "deliver", or "man deliver") Nor can I find out exactly what a 65 means.

    However this will be useful for people who get this message and are missing emails:

    If you invoke procmail with the -t switch (add -t to the options to invoke procmail) [already done in this article] then the mail will be delivered -- probably to a plaintext file at /var/mail/cyrus

    When you fall back to going from postfix->cyrus and skip procmail, this is how to redeliver those "lost" emails:


    sudo mv /var/mail/cyrus /var/mail/cyrus.sent; sudo cat /var/mail/cyrus.sent | formail -s sendmail -t -bm -v


    This will move the spooled flat file to cyrus.sent (so that the next time you try this you don't just append to the cyrus mail file), and pipe the text of the file to formail, which will split it into individual messages and requeue it for delivery from the beginning of the entire mail chain (sendmail) so that it actually gets delivered. Once those mails are delivered, another round of server changes can be attempted.

    Criss
  • Jason Deraleau photo procmail problems
    2004-02-02 12:42:11  Jason Deraleau [Reply | View]

    I am not sure why procmail does not create an entry in the message's delivery path. It hasn't historically in any configuration I'm aware of. I imagine, however, that you could make a procmail recipe that would add a header of some sort to indicate it had passed through.

    As far as multiple short names not working, I'm not totally surprised. Sorry I had not considered it as a notice in the article somehow. The reason it does not work with multiple short names is because procmail attempts to deliver mail to a specific mailbox. When you create multiple shortnames for a user account, only a single mailbox is made, which has the name of the first shortname used. When procmail attempts to deliver to one of these alternate names, it can't resolve the name properly because its box doesn't exist.

    I'm not sure how you're using the shortnames. I haven't found a practical use for them in my organization's server. However, if you're just using them for aliases to the same mailbox, you should be able to modify Postfix's /etc/aliases file (and then run newaliases) to create aliases for the mailbox. The aliases should work properly with the above described config, since the resolution of the alias occurs prior to the pipe to Procmail.
    • procmail problems
      2004-02-08 07:14:19  raffaell [Reply | View]

      I am using others name for my users' email addresses. In my studio all email are first letter of the name dot surname (p.pallino). Since the user's short name cannot include a point character I have to use second, third name.
      Another thing: reading log file I saw that postfix has problems to transfer email (addressed to second user's name) to procmail, but email is not deleted. It arrives after I come back to original configuration.