Similar to what kfunk suggested, I started by looking at twistd.log. It contained the following:
2013-02-09 04:26:18+0000 [-] sending mail (868 bytes) to ['addr@example.com']
2013-02-09 04:26:18+0000 [-] Starting factory <twisted.mail.smtp.ESMTPSenderFactory instance at 0x31dc488>
2013-02-09 04:26:18+0000 [Uninitialized] SMTP Client retrying server. Retry: 5
2013-02-09 04:26:18+0000 [Uninitialized] SMTP Client retrying server. Retry: 4
2013-02-09 04:26:18+0000 [Uninitialized] SMTP Client retrying server. Retry: 3
2013-02-09 04:26:18+0000 [Uninitialized] SMTP Client retrying server. Retry: 2
2013-02-09 04:26:18+0000 [Uninitialized] SMTP Client retrying server. Retry: 1
2013-02-09 04:26:18+0000 [Uninitialized] Unhandled error in Deferred:
2013-02-09 04:26:18+0000 [Uninitialized] Unhandled Error
Traceback (most recent call last):
Failure: twisted.internet.error.ConnectionRefusedError: Connection was refused by other side: 111: Connection refused.
I tried to manually send an email from the machine's command line (using sendmail
), but failed; it turned out that no SMTP server is up. The solution is to install and configure a mail transfer agent (for Ubuntu, the most common one seems to be Postfix so I installed that). There are many tutorials and manuals out there on how to install and configure Postfix so once I found that clue it was easy to go on.
There are many considerations on having your own SMTP server; for example finding a way to secure it against unauthorised access, otherwise it could be used by e.g. spammers. However, if you want to get e-mails from buildbot, you have to have an SMTP server so it's worth the effort to learn and configure it correctly.