procmail
[Top] [All Lists]

"alias workaround" recipe

1996-04-01 17:40:28
 
There must be a bunch of people running aliases (I cannot be the only
one) so I'll send this to the procmail mailing list *just in case*
someone could grab some inspiration from this. This recipe made mine
and other list members life a bit easier :)

 
-----
Background:
 
Originally there were an alias with 40+ addresses.
Now this alias contains only my address <koski(_at_)rieska(_dot_)oulu(_dot_)fi> 
and
procmail/formail + systems sendmail takes care of the rest.
 

-----
Why procmail/formail instead of that good 'ole alias?
 
Well, Mr(_dot_)A(_at_)site(_dot_)com writes an article to an alias at 
xx(_at_)somewhere(_dot_)edu(_dot_)
His address is on that alias too.
Some minutes later (Mr|Mrs|Ms) B replies to this article with Pine (for
example) and is lazy (like we all are) answering the questions Pine
asks, giving "Y" (=hitting Enter) to everything.
 
The result is that Mr(_dot_)A(_at_)site(_dot_)com receives the reply twice, 1st 
"straight"
via email from the replicant and 2nd time when the alias sends it out
(it was Cc:'d to the alias).
 
Workaround is easy, add "Reply-To:" -address to the messages and tell
everyone to use that for replies.
The way to do this is use procmail and formail.
 
I lost my nerves with doubles msg's and started to experiment with hints
from this mailinglist.
 
Formatting headers is a *good thing* IMHO :-)
 
 
----------------------cut here--------------------------------
 
# A "mailinglist" recipe, practically an alias upgrade...
# Inspiration to this stolen from the original idea by B.Rozen
#
# rieska(_at_)oulu(_dot_)fi is running running SunOS 5.4
# "procmail -v" done here here gives "2.92pre7" as an answer
#
:0hw
* !^X-List: -=FAF=-
* !^X-Loop: FAF mailinglist
* ^(To|Cc):(_dot_)*faf(_at_)rieska(_dot_)oulu(_dot_)fi
{
:0f
|/opt/gnu/bin/formail -A "X-List: -=FAF=-"\
 -A "X-Loop: FAF mailinglist"\
 -A "Precedence: bulk"\
 -I "Cc: "\                               #Cc-line blanking
 -I "Resent-From: rieska.oulu.fi"\
 -I "Resent-Sender: koski(_at_)rieska(_dot_)oulu(_dot_)fi"\
 -I "Reply-To: -=FAF=- <faf(_at_)rieska(_dot_)oulu(_dot_)fi>"\
 -I "To: FAF mailinglist recipients <faf(_at_)rieska(_dot_)oulu(_dot_)fi>"\
 -I "Errors-To: koski(_at_)rieska(_dot_)oulu(_dot_)fi"\
 -A "Organization: Finnish (well, mainly :) Multiplayer-Flightsim Geeks"
 
:0c
$MAILDIR/FAF      #backup copy of every list msg saved to this folder
 
:0ac
! <lots of addresses here>    #format: a(_at_)b,c(_at_)d,e(_at_)f,g(_at_)h etc.
 
:0a
! <lots of addresses here> 
}
---------------------cut here--------------------------
 
 

 
 .........................................................................
      Pekka Koski <koski(_at_)rieska(_dot_)oulu(_dot_)fi>  -  CRIS  #2351 TNeck 
-=FAF=-  
       (finger for PGP public key or email me with Subject: send PGP)
               ICBM's with my name on 'em to 65.02N 25.27E
           ..................................................

                        Speed kills. Use Windows. 

<Prev in Thread] Current Thread [Next in Thread>
  • "alias workaround" recipe, Pekka Koski <=