I'm trying to set up nullmailer with Google Apps. I think I have properly configured Google Apps and /etc/nullmailer/remotes, but somehow I'm getting this error

Sending failed: Could not exec program

Here's a bit more verbosity:

# sudo -u mail nullmailer-send
Rescanning queue.
Starting delivery, 1 message(s) in queue.
Starting delivery: protocol: --port=587 host: smtp-relay.gmail.com file: 1470693591.47284
Sending failed: Could not exec program
Delivery complete, 1 message(s) remain.

And my remotes:

sudo cat /etc/nullmailer/remotes
smtp-relay.gmail.com --port=587 --starttls

(I have Google Apps relay access configured by IP, not user/pass.)

  • 2
    You should show your remotes file (properly redacted for username/password) Aug 8 '16 at 22:15

I had the same problem and found the solution by using strace on the nullmailer daemon process. It tried to execute /usr/lib/nullmailer/--starttls which lead me to double-check the remotes file format and have a look at that directory.

The solution is to add smtp to your remotes line:

smtp-relay.gmail.com smtp --port=587 --starttls

Confirming. In my case, with a "--port=nnn" it (nullmailer) needed the 'smtp' option entered explicitly. ( as text in /etc/nullmailer/remotes )

e.g. my.relay smtp --port=999

Even though 'smtp' is the default.


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.