Process Email Queue by Waving Mouse
Today I had a problem with a development server. A little, low-traffic thing that I was testing some PHP-sends-email pages on. The emails wouldn’t send although I could see them sat in the queue.
The story gets better but there’s a techie bit between here and the punchline – sorry
Exim commands
mailq – show the emails currently in the queue
sendmail -v -q – send the emails in the queue and give plenty of output with it.
The symptoms
Sending email just caused the screen to hang, I’d get something like this:
LOG: queue_run MAIN
Start queue run: pid=12282
delivering 1HeAZY-0002YQ-J0 (queue run pid 12282)
R: dnslookup for ****************
T: remote_smtp for **********************
Connecting to **************** [000.000.000.000]:25 … connected
SMTP<< 220 ********************** ESMTP
SMTP>> EHLO ****
SMTP<< 250-***********************
250-AUTH=LOGIN CRAM-MD5
250-AUTH LOGIN CRAM-MD5
250-STARTTLS
250-PIPELINING
250 8BITMIME
SMTP>> STARTTLS
SMTP<< 220 ready for tls
Randomness!!
The problem was that we didn’t have enough entropy1 to generate the security for the connection … and getting one of my colleagues to rummage in the rack for the server and wave its mouse continuously solved the problem. It was quite a scene :)
1 For diagnosing randomness, I used: cat /proc/sys/kernel/random/entropy_avail
You could have put a butterfly in the server room. Lots of randomness and chaos then… ?
“Server Room”, what’s that? The rack stands about 10 feet from my desk in the open plan office :)