2

Sending mail using Nullmailer to a Google (Apps) account results in "Unspecified temporary error"

I use Google Apps and have two account that I want to use:

  • systemmail@adomain.se: Will be the sender of all mail
  • john.doe@adomain.se: Will be the reciever of all mail

How I set it up:

  1. service nullmailer stop
  2. rm /var/log/syslog /var/log/mail.err /var/log/mail.log as I wanted to discard previous messages when debugging the nullmailer configuration.
  3. apt-get install nullmailer
  4. Edited /etc/nullmailer/adminaddr to contain: (one line with text and a line break)
    systemmail@adomain.se
     
  5. Edited '/etc/nullmailer/remotes' to contain (one line with text and a line break)
    smtp.gmail.com smtp --port=587 --auth-login --user=systemmail@adomain.se --pass=thepassword--starttls
     
  6. Restarted the computer.

After the set up I have tried:

Sending a few mails using:

echo "Test 1" | mailq -s "Test one" john.doe@adomain.se

And also using the sendmail front-end:

$ sendmail -v john.doe@adomain.se <<EOM
> Subject: Test mail four
> The message body
>
> EOM

After some attempts to send mail the relevant information in /var/log/syslog, /var/log/mail.err and /var/log/mail.log look like this:

$ cat /var/log/mail.err
Sep  3 14:42:52 cow nullmailer[1490]: Sending failed:  Unspecified temporary error
Sep  3 14:43:29 cow nullmailer[1490]: Sending failed:  Unspecified temporary error
Sep  3 14:44:37  nullmailer[1490]: last message repeated 3 times
Sep  3 14:45:37  nullmailer[1490]: last message repeated 2 times
Sep  3 14:46:37  nullmailer[1490]: last message repeated 2 times
$ cat /var/log/mail.log
Sep  3 14:28:17 cow nullmailer[1490]: Rescanning queue.
Sep  3 14:42:52 cow nullmailer[1490]: Trigger pulled.
Sep  3 14:42:52 cow nullmailer[1490]: Rescanning queue.
Sep  3 14:42:52 cow nullmailer[1490]: Starting delivery: protocol: smtp host: smtp.gmail.com file: 1378212171.2280
Sep  3 14:42:52 cow nullmailer[1490]: Sending failed:  Unspecified temporary error
Sep  3 14:42:52 cow nullmailer[1490]: Delivery complete, 1 message(s) remain.
Sep  3 14:43:29 cow nullmailer[1490]: Trigger pulled.
Sep  3 14:43:29 cow nullmailer[1490]: Rescanning queue.
Sep  3 14:43:29 cow nullmailer[1490]: Starting delivery: protocol: smtp host: smtp.gmail.com file: 1378212209.2284
Sep  3 14:43:29 cow nullmailer[1490]: Sending failed:  Unspecified temporary error
Sep  3 14:43:29 cow nullmailer[1490]: Starting delivery: protocol: smtp host: smtp.gmail.com file: 1378212171.2280
Sep  3 14:43:29 cow nullmailer[1490]: Sending failed:  Unspecified temporary error
Sep  3 14:43:29 cow nullmailer[1490]: Delivery complete, 2 message(s) remain.
Sep  3 14:44:29 cow nullmailer[1490]: Rescanning queue.
Sep  3 14:44:29 cow nullmailer[1490]: Starting delivery: protocol: smtp host: smtp.gmail.com file: 1378212209.2284
Sep  3 14:44:29 cow nullmailer[1490]: Sending failed:  Unspecified temporary error
Sep  3 14:44:29 cow nullmailer[1490]: Starting delivery: protocol: smtp host: smtp.gmail.com file: 1378212171.2280
Sep  3 14:44:29 cow nullmailer[1490]: Sending failed:  Unspecified temporary error
Sep  3 14:44:29 cow nullmailer[1490]: Delivery complete, 2 message(s) remain.
Sep  3 14:45:29 cow nullmailer[1490]: Rescanning queue.
Sep  3 14:45:29 cow nullmailer[1490]: Starting delivery: protocol: smtp host: smtp.gmail.com file: 1378212209.2284
Sep  3 14:45:29 cow nullmailer[1490]: Sending failed:  Unspecified temporary error
Sep  3 14:45:29 cow nullmailer[1490]: Starting delivery: protocol: smtp host: smtp.gmail.com file: 1378212171.2280
Sep  3 14:45:29 cow nullmailer[1490]: Sending failed:  Unspecified temporary error
Sep  3 14:45:29 cow nullmailer[1490]: Delivery complete, 2 message(s) remain.
Sep  3 14:46:29 cow nullmailer[1490]: Rescanning queue.
Sep  3 14:46:29 cow nullmailer[1490]: Starting delivery: protocol: smtp host: smtp.gmail.com file: 1378212209.2284
Sep  3 14:46:29 cow nullmailer[1490]: Sending failed:  Unspecified temporary error
Sep  3 14:46:29 cow nullmailer[1490]: Starting delivery: protocol: smtp host: smtp.gmail.com file: 1378212171.2280
Sep  3 14:46:29 cow nullmailer[1490]: Sending failed:  Unspecified temporary error
Sep  3 14:46:29 cow nullmailer[1490]: Delivery complete, 2 message(s) remain.
$ grep nullmailer /var/log/syslog
Sep  3 14:28:17 cow nullmailer[1490]: Rescanning queue.
Sep  3 14:42:52 cow nullmailer[1490]: Trigger pulled.
Sep  3 14:42:52 cow nullmailer[1490]: Rescanning queue.
Sep  3 14:42:52 cow nullmailer[1490]: Starting delivery: protocol: smtp host: smtp.gmail.com file: 1378212171.2280
Sep  3 14:42:52 cow nullmailer[1490]: Sending failed:  Unspecified temporary error
Sep  3 14:42:52 cow nullmailer[1490]: Delivery complete, 1 message(s) remain.
Sep  3 14:43:29 cow nullmailer[1490]: Trigger pulled.
Sep  3 14:43:29 cow nullmailer[1490]: Rescanning queue.
Sep  3 14:43:29 cow nullmailer[1490]: Starting delivery: protocol: smtp host: smtp.gmail.com file: 1378212209.2284
Sep  3 14:43:29 cow nullmailer[1490]: Sending failed:  Unspecified temporary error
Sep  3 14:43:29 cow nullmailer[1490]: Starting delivery: protocol: smtp host: smtp.gmail.com file: 1378212171.2280
Sep  3 14:43:29 cow nullmailer[1490]: Sending failed:  Unspecified temporary error
Sep  3 14:43:29 cow nullmailer[1490]: Delivery complete, 2 message(s) remain.
Sep  3 14:44:29 cow nullmailer[1490]: Rescanning queue.
Sep  3 14:44:29 cow nullmailer[1490]: Starting delivery: protocol: smtp host: smtp.gmail.com file: 1378212209.2284
Sep  3 14:44:29 cow nullmailer[1490]: Sending failed:  Unspecified temporary error
Sep  3 14:44:29 cow nullmailer[1490]: Starting delivery: protocol: smtp host: smtp.gmail.com file: 1378212171.2280
Sep  3 14:44:29 cow nullmailer[1490]: Sending failed:  Unspecified temporary error
Sep  3 14:44:29 cow nullmailer[1490]: Delivery complete, 2 message(s) remain.
Sep  3 14:45:29 cow nullmailer[1490]: Rescanning queue.
Sep  3 14:45:29 cow nullmailer[1490]: Starting delivery: protocol: smtp host: smtp.gmail.com file: 1378212209.2284
Sep  3 14:45:29 cow nullmailer[1490]: Sending failed:  Unspecified temporary error
Sep  3 14:45:29 cow nullmailer[1490]: Starting delivery: protocol: smtp host: smtp.gmail.com file: 1378212171.2280
Sep  3 14:45:29 cow nullmailer[1490]: Sending failed:  Unspecified temporary error
Sep  3 14:45:29 cow nullmailer[1490]: Delivery complete, 2 message(s) remain.
Sep  3 14:46:29 cow nullmailer[1490]: Rescanning queue.
Sep  3 14:46:29 cow nullmailer[1490]: Starting delivery: protocol: smtp host: smtp.gmail.com file: 1378212209.2284
Sep  3 14:46:29 cow nullmailer[1490]: Sending failed:  Unspecified temporary error
Sep  3 14:46:29 cow nullmailer[1490]: Starting delivery: protocol: smtp host: smtp.gmail.com file: 1378212171.2280
Sep  3 14:46:29 cow nullmailer[1490]: Sending failed:  Unspecified temporary error
Sep  3 14:46:29 cow nullmailer[1490]: Delivery complete, 2 message(s) remain.
Sep  3 14:47:29 cow nullmailer[1490]: Rescanning queue.
Sep  3 14:47:29 cow nullmailer[1490]: Starting delivery: protocol: smtp host: smtp.gmail.com file: 1378212209.2284
Sep  3 14:47:29 cow nullmailer[1490]: Sending failed:  Unspecified temporary error
Sep  3 14:47:29 cow nullmailer[1490]: Starting delivery: protocol: smtp host: smtp.gmail.com file: 1378212171.2280
Sep  3 14:47:29 cow nullmailer[1490]: Sending failed:  Unspecified temporary error
Sep  3 14:47:29 cow nullmailer[1490]: Delivery complete, 2 message(s) remain.

The contents of /var/spool/nullmailer/queue/ and /var/spool/nullmailer/tmp/:

$ ls /var/spool/nullmailer/queue/
1378212171.2280  1378212209.2284
$ ls /var/spool/nullmailer/tmp/
31464  31468  31672

Questions

  1. Have I made any obvious error in the configuration?
  2. What could the "Unspecified temporary error" be?
  3. Where does the mail sending process go wrong?
  4. How should I proceed when trying to debug this?
2

From: http://opensourcehacker.com/2013/03/25/using-nullmailer-and-mandrill-for-your-ubuntu-linux-server-outboud-mail/

  1. Install Nullmailer

You want to have your email traffic to be SSL encrypted. Nullmailer supports this since version 1.10. Ubuntu 12.04 ships with Nullmailer 1.05-1. To get the latest Nullmailer for Ubuntu do from my Ubuntu PPA (see prior blog post about how I backported Nullmailer to Ubuntu 12.04)

Note: This will remove existing mail solutions on the server.

sudo apt-add-repository ppa:mikko-red-innovation/ppa
sudo apt-get update
sudo apt-get install nullmailer=1:1.11-2~precise1~ppa1
  • Although I'd rather use ssmtp instead. sudo apt-get install ssmtp – duli Dec 7 '13 at 18:30
1

There are many tutorials on the net suggesting the use of --starttls. The nullmailer package for raring (12.04) does not seem to support it. It seems like it was not compiled in.

Troubleshooting nullmailer is pretty hard, in this case only "Unspecified temporary error" was actually logged. A helpful page with troubleshooting tips is Nullmailer Landmine Map, which helped me find the source of this problem.

To reach the above conclusion I killed the nullmailer daemon (service nullmailer stop is a nicer way) and started it manually. It outputs unknown option string: '--starttls' (and the same when trying --tls). Nullmailer uses the executable /usr/lib/nullmailer/smtp to send mail and the version in the Ubuntu 12.04 package only accepts these options:

root# /usr/lib/nullmailer/smtp -h
usage: smtp [flags] remote-address < mail-file
Send an email message via SMTP
  -p, --port=INT    Set the port number on the remote host to connect to
      --user=VALUE  Set the user name for authentication
      --pass=VALUE  Set the password for authentication
  -d, --daemon      use syslog exclusively
  -s, --syslog      use syslog additionally
      --auth-login  Use AUTH LOGIN instead of AUTH PLAIN in SMTP

  -h, --help        Display this help and exit

Which in contrast to the possible options seem to sparse to me.

The conclusion is that the Nullmailer package can not be used with Google's SMTP server due to lack of including the necessary options when compiling the binares. Another conclusion is that Nullmailers documentation is lacking as well as its error reporting.

0

If nullmailer is failing with smtp.gmail.com try using IPv4 address directly: 74.125.206.109

my /etc/nullmailer/remotes looks like this:

74.125.206.108 smtp --port=465 --auth-login --ssl --user=USER@gmail.com --pass=PASS --insecure

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.