How can I introduce a delay in the filter?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

How can I introduce a delay in the filter?

Alejandro
I'm using this filter to save emails I get using getmail to a local
maildir, and to forward them to an external gmail address using msmtp

My problem is that from time to time the server fails in forwarding them
with the following message:

550-Requested action not taken: mailbox unavailable
550 Failure sending mail. Try again later

I'm not sure why is this happening, but I usually see this when several
emails go out in a short period.
I suspect either the SMTP server or the recipient gmail account might be
temporarily blacklisting me.

So, I was thinking in introducing a short delay after or before sending
the email to msmtp, though I'm not sure how to do it.

I have now: to "| /usr/bin/msmtp [hidden email]"


Could you suggest how to introduce a small delay? 1 second would be OK

Can I do for example: to "| sleep 1 & /usr/bin/msmtp [hidden email]"

or should I do a loop to waste time? how could I control the timing of
that loop?


Thanks in advance


------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Courier-maildrop mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/courier-maildrop
Reply | Threaded
Open this post in threaded view
|

Re: How can I introduce a delay in the filter?

Sam Varshavchik
Alejandro writes:

> Could you suggest how to introduce a small delay? 1 second would be OK
>
> Can I do for example: to "| sleep 1 & /usr/bin/msmtp [hidden email]"
>

to "| sleep 1; /usr/bin/msmtp [hidden email]" should work.


------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Courier-maildrop mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/courier-maildrop

attachment0 (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: How can I introduce a delay in the filter?

Alejandro
Sam Varshavchik <mrsam <at> courier-mta.com> writes:
> to "| sleep 1; /usr/bin/msmtp address <at> gmail.com" should work.
> ----------------------------------------------------------------------



Thanks Sam, will try later and let you know the results



------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Courier-maildrop mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/courier-maildrop
Reply | Threaded
Open this post in threaded view
|

Re: How can I introduce a delay in the filter?

Alejandro
In reply to this post by Sam Varshavchik
Sam Varshavchik <mrsam <at> courier-mta.com> writes:


> to "| sleep 1; /usr/bin/msmtp address <at> gmail.com" should work.


-----------------------------------------

It works like a charm, thanks!





------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Courier-maildrop mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/courier-maildrop