procmail
[Top] [All Lists]

Re: How to provoc an procmail error to force REQUEING?

2009-11-06 15:05:44
Good evening,

Am 2009-11-05 18:02:37, schrieb Professional Software Engineering:
Ah, are you getting messages with URLs, and then from within
procmail, trying to _retrieve_ the URL?

Right and in 95% of all cases it is working.

 Do these need to be
processed in conjunction with the individual messages?

Yes, since the return content of wget should immediately  included  into
the messages because some messages are important for me.

 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.

I have tried this, but I was runing into trouble, while  trying  to  get
the right message to attach the downloaded content.

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 have tried this too, but since courier-imap is moving messages arround
and changing its filename to have unique names in  the  Maildir,  I  had
already unexpected problems with it.

 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...

Hmmm...

Thanks, Greetings and nice Day/Evening
    Michelle Konzack

-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/
##################### Debian GNU/Linux Consultant #####################
<http://www.tamay-dogan.net/>                 Michelle Konzack
<http://www.can4linux.org/>                   Apt. 917
<http://www.flexray4linux.org/>               50, rue de Soultz
Jabber linux4michelle(_at_)jabber(_dot_)ccc(_dot_)de           67100 
Strabourg/France
IRC    #Debian (irc.icq.com)                  Tel. DE: +49 177 9351947
ICQ    #328449886                             Tel. FR: +33  6  61925193
____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)de
http://mailman.rwth-aachen.de/mailman/listinfo/procmail