procmail
[Top] [All Lists]

Re: Proposed ^TO extension

1996-07-24 12:03:12
On Wed, 24 Jul 1996, Stephen R. van den Berg wrote:

In order to help these people that try to use procmail to expand
POP3 mailboxes with complete domains behind them, it would probably
be nice to include something like the following in the regexp that
^TO and ^TO_ expand to:

      ^Received:.*[    ]for <?

Or do any of you see problems with this with regard to unexpected
matches or backward incompatibility?
-- 
Sincerely,                                                          
srb(_at_)cuci(_dot_)nl
           Stephen R. van den Berg (AKA BuGless).
"I hate spinach, and I'm glad that I hate it, because if I wouldn't hate it,
 I would have to eat it, and I hate it!"
 

I have the following in my  /var/spool/popmail/.procmailrc, used by
user popmail to deliver mail locally:

# envelope said Leif @lege.com
:0
* ^Received: from.*for <?(leif|Leif.Erlingsson).lege\.com
! -oi leif(_at_)elijah(_dot_)swipnet(_dot_)se

# envelope said Ylva @lege.com
:0
* ^Received: from.*for <?(m-17076|ylva|Ylva.Erlingsson).lege\.com
! -oi ylva(_at_)elijah(_dot_)swipnet(_dot_)se

# envelope said Ulf @lege.com
:0
* ^Received: from.*for <?(ulf|Ulf.Erlingsson).lege\.com
! -oi ulf(_at_)elijah(_dot_)swipnet(_dot_)se

# envelope said Demo @lege.com
:0
* ^Received: from.*for <?(demo|Demo.User).lege\.com
! -oi demo(_at_)elijah(_dot_)swipnet(_dot_)se

# envelope said Root @lege.com
:0
* ^Received: from.*for <?(root|Root.Account).lege\.com
! -oi root(_at_)elijah(_dot_)swipnet(_dot_)se

# envelope said leierl @lege.com
:0
* ^Received: from.*for <?leierl.lege\.com
! -oi leierl(_at_)elijah(_dot_)swipnet(_dot_)se


I also have other rules following these, BUT I WANT *ALL* OF THE
"envelope"-rules to be processed BEFORE I look at the headers proper!

I don't think this is a problem though, since I don't use the TO
macro above! I use the TO macro when processing the headers proper,
in case there was no hit above, but at the time I arrive there, I
don't care one way or another about the ``envelope-rules''.


I have one comment on the contens of the macro:

You suggested


      ^Received:.*[    ]for <?



I suggest

        ^Received: from.*for <?
                   ^^^^


Btw, what does the [    ] do? 
 

-- Leif Erlingsson http://www.geocities.com/RodeoDrive/1998 +46 8 604 0995
   Stockholm, Sweden, Tellus, Milky Way, Gods Universe.


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