procmail
[Top] [All Lists]

Re: procmail fails

1996-07-10 13:48:30
Daniel Stenberg <Daniel(_dot_)Stenberg(_at_)sth(_dot_)frontec(_dot_)se> writes:
It is supposed to find 'dastmail' in the To: field and then execute the
commands I want. It does, and when I try it on a shell command line it
works OK, but procmail (or rather some other subprocess) fails with the
message 'Error: can't find file to!'

What's the problem?

It would help to be able to see the recipes involved here.

I will note you probably should be using formail instead of sed to
extract into the FROM variable, ala:

FROM=`formail -rtx To:`

That's straight off of the procmailex(5) manpage, and correctly handles
From: vs. Sender: vs. Reply-To:, etc.

Since you don't even use the TO variable (or it appears so from the
logfile entries you showed) you should probably just remove the
assignment.  What if the message doesn't even _have_ a To: header?
What are you going to use it for?

Philip Guenther

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