short version: I'm trying to send mail with Mutt. It fails and says "Alarm clock". What does that mean, how do I fix it?

long version: I have an ubuntu server running tiny tiny rss. It sends daily email digests using php's mail() function. I want that to work. I have a domain with google apps, so I want mail to be sent from vassago@adamrgrey.com. I tried postfix and sendmail, but I failed to configure them properly (and I think since they're MTAs they're overkill anyway). I hear (read: hope) that mutt can be used to replace sendmail for php's purposes. So to the end of sending mail from mutt, I made a .muttrc for my own gmail account, and sending worked fine. So I suspect mutt is installed correctly. However, when I change my configuration to work for my domain name, it doesn't work. here's my new .muttrc:

set from = "vassago@adamrgrey.com"
set realname = "vassago"
set imap_user = "vassago@adamrgrey.com"
set imap_pass = <password>
set smtp_url="smtp://vassago@mail.adamrgrey.com:587/"
set smtp_pass=<password>
set folder = "imaps://imap.gmail.com:993"
set spoolfile = "+INBOX"
set postponed ="+[Gmail]/Drafts"
set header_cache = ~/.mutt/cache/headers
set message_cachedir =~/.mutt/cache/bodies
set certificate_file =~/.mutt/certificates
set move = no
set imap_keepalive = 900

if I just run mutt, I can see the emails show up. I've tried deleting the lines with smtp_url and smtp_pass, but that didn't work either. With this configuration, I run

echo "hi again" | mutt -s "test03 from mutt" <my email address>

some time passes, "Alarm clock" prints, and the program returns, mail ostensibly not sent. What am I doing wrong?


The culprit was smtp_url. I changed the line:

set smtp_url="smtp://vassago@adamrgrey.com@smtp.gmail.com:587/"

now it works. I still have no idea what "Alarm clock" means.

  • I have my smtp_url exactly like that (smtp://user@domain.com@smtp.gmail.com:587/), smtp_pass has the correct password, and I still get the same message "Alarm clock". No explanations. Can anyone explain what it means?
    – JulioHM
    Dec 11 '16 at 14:29

Actually, "Alarm clock" is a mutt error message relating to timeout.

Lately, I have been plagued with that cutesey "Alarm clock" error indication while trying to debug my mutt ".muttrc" file. The main problem turned out to be a combination of the "set smtp_url" parameter and msmtp's connect_timeout parameter. Local internet service is spotty at best, and thus the timeout problems.

MAIN PROBLEM: When I sent a multi-line text file to mutt via the command line: cat report.out | mutt -s "Summary" "myemailacct@gmail.com" mutt repeatedly blew up with the cryptic message Alarm clock I wasted considerable time chasing the problem within mutt. There WAS one problem, but the main culprit was in .msmtprc instead. Fix it first.

MSMTP BACKGROUND: But first, some background. I'm running msmtp, and thought that it was working fine: for example, the cmd line cat report.out | msmtp -a default myemailacct@gmail.com did as expected, sending the last line of the file without a subject.

Here is a copy of .msmtprc. I have included the trick to enable secure smtps:


account gmail
host smtp.gmail.com          
port 465                  
from "myemailacct@gmail.com"   
tls on                       
#tls_starttls on              
# If you get a "server sent empty reply" error, add the following line:
    tls_starttls off
# This allows msmtp to use SSL/TLS (port 465) in place of STARTTLS (port 587)
tls_trust_file /etc/ssl/certs/ca-certificates.crt
auth on                     
user "myemailacct"       
password "mypassword"       
logfile ~/.msmtp.log

# Set a default account
account default : gmail


Typing in msmtp --serverinfo gives all sorts of information, such as (showing top two lines only): SMTP server at smtp.gmail.com (qo-in-f109.1e100.net []), port 465: smtp.gmail.com ESMTP w44sm25263807qta.4 - gsmtp which demonstrates that smtps is configured correctly (so far). If it were not configured correctly, you would get the following: msmtp: the server sent an empty reply msmtp: could not send mail (account default from /home/owner/.msmtprc)

After tinkering with msmtp.rc I resumed testing, jumping back and forth between msmtp and mutt. The program occasionally worked, but not reproduceably. In retrospect, this should have suggested a timeout problem. (I'll omit lots of grief here.) Let's cut to the chase and add the following line to .msmtprc (which fixed the problem): set connect_timeout = 300 Be sure to test any changes with msmtp --serverinfo before plowing ahead. The msmtp server MUST work before you can straighten out mutt.

MUTT PROBLEM/SOLUTION: Next, I made a correction to .muttrc by including the host name in the smtp_url argument. I commented out: # set hostname=gmail.com and inserted the hostname into the url: set smtp_url = "smtps://myemailacct@gmail.com@smtp.gmail.com:465

RESULTS: Once I added the .msmtprc timeout line and fixed the .muttrc host_name problem mentioned above, it all ran fine, consistently albeit slowly. The slowness is due to a lousy internet connection. There are two large hospitals which do major data dumps twice a day, tying up the trunk. Plus, due to lousy infrastructure out here in the suburbs, seems like every time a cloud goes over the connection goes down. Please write your senators and congressman in favor of internet neutrality.

  • "Actually, "Alarm clock" is a mutt error message relating to timeout." This helped me, thanks. I had a typo in my muttrc as well.
    – aderchox
    Nov 16 at 7:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.