procmail
[Top] [All Lists]

Re: Forward Info.txt File Problem

1996-11-15 01:24:45
At 10:43 PM 11/14/96 -0800, Ralph Freshour elucidated thus:
The following recipe doesn't work - can someone please help me out??? 
Thanks.  And why do I need the "Precedence: junk" line?

I can't find my reference on precedence (it isn't in the venerable RFC822),
but junk is what is usually used for simple acknowledgements.  Personally,
I think there aught to be a "confirmation" or "auto" precedence - junk is
too demeaning.

Try turning logging on, and examining the log file.  Or at least saying you
did.

The obvious needs to be asked -- is SENDMAIL (and for that matter, PROCMAIL
and CAT) in the PATH set by your .procmailrc?  Besides that, my comments on
the one line I suspect is fouling you up the most is preceeded by "***".
The other comments are merely suggestions, though I don't claim to be a
procmail guru by any means.


:0
* ^TO(_dot_)*info(_at_)idt(_dot_)com
*!^FROM_DAEMON

Depending on your setup, you might find it preferable to do your
from-daemon testing at the very top of your script (if it is all for your
own domain, versus a domain with multiple individual users).  This frees
you from dealing with daemon messages all over the place.

*!^X-Loop: info(_at_)idt(_dot_)com
|(formail -r -A "Precedence: junk"\
-I"From: Auto Reply from PrimeMail " \

I'd use an address in the From: field.  All you have is a name.  I'm sure
this is against some rule in RFC822.  Also, you might consider using "-rt"
instead of "-r" - this is probably mostly a case of preference - the -t
says something like "assume the user who sent you the message you're
autoreplying to insn't a bonehead, and they have their return address set
correctly", otherwise (according to the man page) formail favours
machine-generated addresses (something I never quite did fully grasp, but I
prefer using the human-generated ones myself).  -rt has yet to fail me.

-ISubject: Information Requested" \

*** I *REALLY* think this should be enclosed properly in quotes -- you're
missing the opening quote on this line.  The golden rule of computing:
GIGO.  Try changing this one line, and testing the script and see what
difference you get.

Also, out of habit (though I don't know if it is required by formail) - I
always have a space between the switches (such as "-I") and their values.
Try to make a habit of always using a consistent format, and then some
typos will jump out at you (such as the one above).

-A "X-Loop: info(_at_)idt(_dot_)com";\
cat /u2/home/rfresh/info.txt )|$SENDMAIL -t

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