0

I'm trying to set up nullmailer (1.13) to send to AWS SES and failing. Here are the contents of my remotes file:

email-smtp.us-east-1.amazonaws.com smtp --starttls --port=465 --user=AKIA.. --pass=..

And here's the error in /var/log/mail.err.

Mar 16 01:26:05 server nullmailer[7663]: smtp: Failed:
Mar 16 01:26:05 server nullmailer[29064]: Sending failed:  Protocol error

I've tried with and without --starttls. I also tried --ssl as this blog recommended.

tedder42
  • 833
  • 1
  • 9
  • 19
  • `--user=AKIA...` is probably wrong. You don't use your access key ID & secret for SMTP with SES: http://docs.aws.amazon.com/ses/latest/DeveloperGuide/smtp-credentials.html – Michael - sqlbot Mar 16 '16 at 02:36
  • SES SMTP credentials look like that- "SMTP username is the same as their AWS Access Key ID". @Michael-sqlbot – tedder42 Mar 16 '16 at 03:33

1 Answers1

0

Stumbled across my own question and figured it out. The testing shell script here really helped, and running nullmail-send by hand showed me that ubuntu@localhost was the FROM address, which was rejected by SES.

http://www.troubleshooters.com/linux/nullmailer/

Besides the protocol error, I was getting a config failure that eventually I discovered was a permissions problem. Here's that error:

Dec 10 19:59:46 irc nullmailer[9011]: Could not load the config

So, a couple changes:

  • nullmailer on ubuntu runs as the mail user, so it can't read the /etc/nullmailer/remotes that was owned by root and mod 600 for root. So: chown mail:mail /etc/nullmailer/*.
  • Fixed the ubuntu@localhost, probably from cron/system mails, by adding my domain in /etc/nullmailer/defaulthost.
  • remotes also needed --ssl on it to talk to port 465 in SES.
tedder42
  • 833
  • 1
  • 9
  • 19