At 00:33 2009-11-06 +0100, Michelle Konzack wrote:
So, what I want is, if "wget" can not download anything do to a network
error and the output is empty, the message should stay in the
courier-mta queue and ist try to re-deliver 10 minutes later again.
Ah, are you getting messages with URLs, and then from within procmail,
trying to _retrieve_ the URL? Do these need to be processed in conjunction
with the individual messages? If not, I'd seriously consider extracting
the necessary URL data and pumping it into a separate queue, which is
processed (and cleared on success) by an external script. As far as
procmail is concerned, it's job done when it extracts the URL and passes it
along to the external script, which can manage retries.
So, how can I make procmail to stop processing the RSS-Mail and instead
sending an Error/ExitStatus to the MTA, that there is a temporary error.
EX_TEMPFAIL (defined in the system include file sysexits.h), is the code to
return - IF your MTA is going to retry. This is the '75' magic number Mr.
Peeler offered up.
If that doesn't work for you, and you really need to use the mail system to
manage your retry logic, you could deliver the messages to a different
local user, and have (gawd) a local fetchmail operation in place to grab
from that mailbox. By the same token, a single-user approach would be to
store failing messages (with a proper lockfile strategy) to a mailbox or
mailfolder, and have a cron job that checks for presence of messages AND
connectivity - if both test true, start calling procmail with each
message. I'd consider moving the messages to a different directory during
processing, and checking for network failure between each message. Of
course, chances are the network failure is a REMOTE failure, not your own
connection - else you can expect to have a single message at a time in the
queue because the net went down right after you managed to receive a
message. Can't imagine you'd have a stack of such messages, though perhaps
your email ends up being more persistent than your wget...
Sean B. Straw / Professional Software Engineering
Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
Please DO NOT carbon me on list replies. I'll get my copy from the list.
procmail mailing list Procmail homepage: http://www.procmail.org/