Re: [exim] Hold Emails

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Phil Pennock
Ημερομηνία:  
Προς: Sébastien CARRE
Υ/ο: exim-users
Αντικείμενο: Re: [exim] Hold Emails
On 2008-07-24 at 23:35 +0200, Sébastien CARRE wrote:
> I'm just writting a new script to check the status of the Exim queue
> status on our server.
>
> In order to test it, I want to be able to hold some emails in the queue
> (from a specific adresse for example). Is this possible ?


First, temporarily disable the queue-runners (restart Exim without -qXXX
or disable the crontab) or face a race-condition as the queue-runners
try to deliver held mail. For my testing, on a box with queue-runners
every 30 minutes, I choose to just deal with the race-condition. :)

Submit the test emails with -odq on the command-line for exim (or the
sendmail alias). That disables immediate delivery and leaves the mail
for queue-runners to deal with.

You can make a mail that's on the queue be ignored by queue-runners by
freezing it. This has the added bonus of testing that your script
handles frozen messages (typically things like non-delivery reports to
undeliverable addresses, which typically means you accepted mail that
you shouldn't have). "exim -Mf msgid" where msgid is the Exim
message-id shown in the exim -bpru/-bp/whatever output. -Mt to thaw.

Exim's command-line flags have a bunch of other useful capabilities for
queue management and controlling message submission. The Exim
Specification (spec.txt, www.exim.org, etc) or the man-page which is
generated from the relevant sections of the Spec.

-Phil