procmail
[Top] [All Lists]

Re: Modified forwarding

1996-05-22 00:53:11
-----BEGIN PGP SIGNED MESSAGE-----

On Tue, 21 May 1996, Das Devaraj wrote:

Date: Tue, 21 May 1996 17:35:36 -0700 (PDT)
From: Das Devaraj <das(_at_)netcom(_dot_)com>
To: procmail list <procmail(_at_)informatik(_dot_)rwth-aachen(_dot_)de>
Subject: Modified forwarding

:0 w
* ( check whether forwarding conditions exist )
{
    MAILDIR = $HOME/fileserver
    FROM = `formail -xFrom:`
    TO = `formail -rt -xTo:`
    DATE = `formail -xDate:`
    SUBJECT = `formail -xSUBJECT:`
I suppose you want: formail -xSubject: (typo?)

This works, but seems to be a lot of code and I am tentative about
the file (tmpFile1) created.  Here are my questions

1) Is there a simpler way to do the same thing?

Let's give it a try: change the second recipe to:
:0 b
| { cat ./$HEADERFILE ;                               \
echo "User $FROM\nOn $DATE\nsent a message to me.\n"\
"Please process and reply to $TO\n"                 \
"The message received is given below\n"             \
"-------------------------------------\n" ;         \
cat - } | formail ... | $SENDMAIL -oi -t

2) Will the wait at the top level (:0 w) and 
   the lock at the recipe level (:0 b: User1Lck) 
   insure that if two messages simultaneously get to my id,
     they will not clobber each other 
          by writing to the same file (tmpFile1)?

I think you need a w on the inside level. Anyway, if my recipe works, you 
don't need a lockfile anyway.

- --
Guy Geens <guy(_dot_)geens(_at_)elis(_dot_)rug(_dot_)ac(_dot_)be>: Ph.D. 
student at ELIS -- TFCG / IMEC 
Home Page: http://www.elis.rug.ac.be/ELISgroups/tfcg/staff/gg.html 
finger ggeens(_at_)elis(_dot_)rug(_dot_)ac(_dot_)be for PGP public keys (or use 
keyserver) 

"I asked Dr Hoffman (inventor of LSD) about the dangers of LSD.  Without
hesitation Hoffman replied 'There was no evidence that LSD damaged
the brain.'  Then the dangers are pychological then?  Hoffman nodded.
Then if the pyschological conditions are supportive, these dangers
can be eliminated?  'Thats what evidence suggests' he said."



-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv
Comment: pgp fingerprints in message headers

iQBVAwUBMaLHjXwHoCha5QR1AQFlIAH9E1tCyMJeA3hHQvSFzjmO725biQ6o9Uo4
0W0bLYaWeXe6XNQgO3ztnRmg7FOPz5mzIo8lsh0Pa+10BHz1q+AI/g==
=OH2d
-----END PGP SIGNATURE-----

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