Coldfusion 9, How do you Empty an "Undelivered Mail Queue"
Asked Answered
G

6

7

I have roughly 9,000 undelivered messages in my mail spool in Coldfusion 9. As far as I can tell the only way to manage these messages is to manipulate them 10 at a time through the CF Admin GUI.

I'm looking for a way to expedite this process. I'd like to just clear the queue, or batch send them all.

Does anyone know how to do this?

Thank you,

-Dave

Galegalea answered 22/7, 2011 at 16:0 Comment(0)
M
12

Go into the filesystem and move the files from cfusion/mail/undelivr to cfusion/mail/spool. Simple!

Meuser answered 22/7, 2011 at 16:9 Comment(1)
I routinely use this method but I always first look to see how old some of the emails are. If I have some that I decide are just too old to get re-spooled then I simply delete those and the rest I move to the spool. I simply sort the directory off the file dates to determine the age.Inoue
R
3

Take a look at Ray Camden's SpoolMail (http://spoolmail.riaforge.org/). This is a very handy plug-in that you can add to all your servers and at bulk move your emails to spool and resend them.

Rollet answered 23/7, 2011 at 4:19 Comment(0)
H
0

Someone sent me a snippet at some point that would try to reprocess the queue periodically at some point, but for the life of me, I can;t find it or see it on google. - sorry.

HOWEVER: the undeliverable queue is just a bunch of files, you can write yourself a little application that will try to reprocess the queue periodically and prune out the ones that have been in the undeliverable too long.

  • I am pretty sure that the spool only tries to deliver mail once

  • just move the files back into the spool directory to have the spooler "retry"

  • you would have to keep a file or DB to track what has been tried & how many times.

  • I would also send a notification on what has been deleted - or at least log it.

-sean

PS> 9000? what is your traffic like? I would suspect there is a problem if you have that many undeliverables....

Hamlani answered 22/7, 2011 at 16:24 Comment(1)
I have a ton of traffic. Several thousand messages a day. We just moved the mail server though, and the inter server routing had some issues and backed us up.Galegalea
B
0

You should write simple CF program for tracking and deleting for undelivered mails.

Use cfdirectory tag.

Badmouth answered 25/7, 2011 at 1:53 Comment(0)
S
0

If you moved your mail server and the spool doesn't seem to ever empty out, you need to open up each .cfmail file and change the IP number. I moved my mail server as well, and when I brought it back up I had forgotten to change the IP setting for mail in CF Admin, and wound up with 21,000 emails in my spool by the next day. Ugh. I could have run a cf script on it to open up each one, change the IP number, and then move the file into the spool dir, but opted instead of downloading a free search and replace utility from download dot com. Worked like a charm. It took about twenty minutes to do the full s&r and then a few seconds to move them all over.

Sophocles answered 24/3, 2013 at 13:41 Comment(0)
A
0

The file system is the simplest way.

To attempt to resend the emails, move the files in ~\ColdFusion2016\cfusion\Mail\Undelivr to ~\ColdFusion2016\cfusion\Mail\Spool.

If you just don't care about those email files then simply delete them.

I point my development mail server to point to nowhere (smtp.gmail.com.dontSend) so no mail goes out and they all just stack up in undelivered. That way the rest of my development team does not get all the errors I generate and catch through email. More importantly, no test emails accidentally go out to real accounts.

I go into the CF-Administrator to look at and manage my undelivered mail when testing but if/when it gets huge I just delete them from the file system.

Afterdeck answered 2/11, 2018 at 14:36 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.