procmail
[Top] [All Lists]

complicated problem for procmail, nmh, exmh

2002-01-19 10:38:03
Guys,

I have a really complicated (or make that convoluted :-)-O) problem.

Besides being much better at delivering babies than at programming
(one being more time consuming than the other :-)-O) I also happen to
be the Senior Partner of the .NA country code Top Level Domain Manager

I receive significant traffic relating to the .NA Registry which
should have been sent or cced to one or more of several variants of
*(_at_)na-nic(_dot_)com(_dot_)na AND carry a reference to the domain concerned 
in the
subject line, in other words, a string ending with ".NA".

At the moment I filter on strings line MODIFY DOMAIN or NEW DOMAIN and
the ones that fall through this rudimentary filter pitch up in the
unseen sequence of (n)mh which exmh displays in a rather nice blue
colour accessible to the NEXT button (which moves to the next UNSEEN,
(blue) message). I then move them manually to the appropriate folders.

Now this is getting to be a nuisance, since delivering seems to be
taking up more of my time than ever and there seem to be more and more
messages and inquries coming in.

So, I would like to have procmail grab all messages containing the
".NA", figure out what the complete domain name is (ie, lisse.NA or
nws.com.na, or rotary.org.na and so on), and pass it to recvstore
depending on the domain name, where

          nws.com.na would result in |rcvstore +na/com/n/nws
          oasys.com.na would result in |rcvstore +na/com/o/oasys

          rotary.org.na would result |rcvstore +na/org/nws

          windhoek.edu.na would result |rcvstore +na/edu/windhoek

and

          lisse.na would result in |rcvstore +na/lisse

rcvstore creates all the folders necessary, by the way, so this is not
a worry.

One way out would be to generate an include file with static commands
for all domains from the database every night with a lock file and
only replace the previous file if the sucker is unlocked. (How do I do
this in perl properly? I.e. what do I do if the lock file has been
left by a program not running any more?)

However this will not work very efficiently if .NA were to become
wildly popular suddenly:-)-O

Is there a clever way of doing this at run time?

el
-- 
Dr. Eberhard W. Lisse  \        /  Obstetrician & Gynaecologist (Saar)
<el(_at_)lisse(_dot_)NA> el108    *       |             Swakopmund State 
Hospital
Private Bag 5004        \     /     Telephone: +49 177 214 3196 (cell)
Swakopmund, Namibia     ;____/  Currently on Post Graduate Study Leave
_______________________________________________
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>
  • complicated problem for procmail, nmh, exmh, Eberhard Lisse <=