procmail
[Top] [All Lists]

Re: PLEASE HELP! - Procmail Recipies

1997-05-29 13:12:00
On Wed, 28 May 1997 17:49:48 +0100,
Ian Chilton <mailinglist(_at_)chiltons(_dot_)u-net(_dot_)com> wrote:
I have a procmail recipe file set up like:
:0:
* ^TO_ian
/var/spool/mail/ianmail

:0:
* ^TO_dennis
/var/spool/mail/denmail

Looks like the classic case of what you ought to be handling with
Sendmail aliases.

This filters mail for different people into different mailboxes.
However, i've found the TO field contains the text the sender has
in their address book, not the recievers email address. This is

If by "address book" you mean the stuff in parens in an address like
this: 
  To: fvz(_at_)zoot(_dot_)allures(_dot_)com (Frank Zappa)
or:
  To: Frank Zappa <fvz(_at_)zoot(_dot_)allures(_dot_)com>

then yes, this might match on your recipe if you have a user named
"fvz". The first line of defense is to use a tighter regexp, such as
"fvz(@yourdomain\.com)?\>". But the fundamental problem is that
Procmail is regexp-based and regular expressions cannot adequately
parse an RFC822 address with all the permitted bells and whistles.
(This is ordinarily not an issue, though.)

in the mail box, and i've found that all the messages seem to have
a field "X-ApparentlyTo:" which contains the actual email address
(like ian(_at_)chiltons(_dot_)u-net(_dot_)com) not Ian Chilton or whatever 
is in the
senders address book.

Then why don't you match on that? 

Also.. I am subscribed to the IP Masqurading list. This puts [masq]

As several people pointed out already, [ and ] are special and need to
be quoted. (Some people prefer the alternatives [[] and []] but I
don't think they're exactly more readable than \[ and \] -- of course
if your expression already has a severe case of backslashitis, the
brackets are probably preferrable.)

/* era */

-- 
Defin-i-t-e-ly. Sep-a-r-a-te. Gram-m-a-r.  <http://www.iki.fi/~era/>
 * Enjoy receiving spam? Register at <http://www.iki.fi/~era/spam.html>

<Prev in Thread] Current Thread [Next in Thread>