procmail
[Top] [All Lists]

Modifying subject

2001-02-28 10:47:32

    Okay, I'm still lost.  I've been following a few threads on here,
and reading suggestions and documentation on the net, however I still
can't make it work properly.  That said, here's what I'm trying to do:

    I receive email from several mailing lists (this one included) and
while a few of them will have a list tag on them, others don't.  With
'list tag' I'm referring to the following:

    [PHP] this doesn't work
    Re: [imp] i can't log in
    Antwort: Re: [phorum] Re: my database locks me out
    etc.

    This works great when you're reading mail because you can sort by
subjects and be able to see all the messages pertaining to one list in
one fell swoop.

    However, a few of my mailing lists don't have that list tag and I
would like to add a tag to them through procmail, based on which list
that email is from.  Note, I *DON'T* want to automatically drop incoming
mail into different folders, I just want to add that tag to them.

    I think I need to do some matching on the From: line to determine
which list it's from and then insert the tag accordingly.  But in my
last attempt, I noticed it was only checking for one list, then quit.
Consequently, some emails will have a tag, others won't (it just skips
it).  One other attempt just failed all together and my email was never
delivered.  Tags were added to those that already had one, and the list
goes on.  So after fighting with it for several hours, I just deleted
the thing and quit trying.

    Is checking for the From: line the right way to go?  And how do I
check for emails that already have that tag on them, or a variation of
it ( like Re: [PHP] .. , [PHP] Re: .. , Antw [PHP] .. , etc. ) ?  I
guess I can just try some regexp matching on the [ and ] characters, but
then how do I determine whether it is a valid one, and not one that
someone had just put in the line ( like [OT] blah blah - where [OT] is
not the name of the list, but the words 'off topic')

    AMK4

--
H | Hi, I'm currently out of my mind.  Please leave a message.  BEEEEP!
  |____________________________________________________________________
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  Ashley M. Kirchner <mailto:ashley(_at_)pcraft(_dot_)com>   .   303.442.6410 
x130
  Director of Internet Operations / SysAdmin    .     800.441.3873 x130
  Photo Craft Laboratories, Inc.             .        eFax 248.671.0909
  http://www.pcraft.com                  .        3550 Arapahoe Ave, #6
  .................. .  .  .     .            Boulder, CO 80303, U.S.A.


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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