max(_at_)texmicro(_dot_)com (Max Heffler) writes:
I get errors in my procmail log. I am trying to set up a recipe to deal
with the errors, which come from the mail2news perl script posted.
The problem seems to be having the perl script return the error status.
If I manually execute "echo fish|/usr/local/news/inews", I get a return
status of 1. If I use the following loop in my mail2news script:
...
the :e recipe is not taken. I am assuming that the mail2news script is
not returning the error status. My recipe is:
-
:0
* !^X-Loop: max
* ^Subject:.*xyzzy
| /usr/local/share/mail2news texmicro.test
:0 e:
/home/max/.procmail/errors
...
yet no "/home/max/.procmail/errors" file.
From the procmailrc(5) manpage:
Flags can be any of the following:
...
w Wait for the filter or program to finish and check its
exitcode (normally ignored); if the filter is unsuc-
cessful, then the text will not have been filtered.
W Has the same meaning as the `w' flag, but will suppress
any `Program failure' message.
You need to place one of those on the mail2news recipe. Otherwise,
procmail ignores the return code of the mail2news action.
Philip Guenther
----------------------------------------------------------------
Philip Guenther UNIX Systems and Network Administrator
Internet: guenther(_at_)gac(_dot_)edu Phonenet: (507) 933-7596
Gustavus Adolphus College St. Peter, MN 56082-1498
Source code never lies (it just misleads). (Programming by Purloined Letter?)