SendGrid is a great way of getting emails sent from your TrueNAS if you don’t have an email relay or your emails get blocked by spam fliters.
Get ready in SendGrid
- Create and verify your free SendGrid account.
- Verify your domain or email address with SendGrid.
- Create an API key. It only needs send access. Copy the API key somewhere safe.
Setup TrueNAS
Log into your TrueNAS web UI:
- Go to Accounts > Users:
- Edit the root user
- Set an email address from step 2 and save.
- Go to System > Email and set:
- ‘From email address’ to the email from step 2
- ‘From name’ to something that isn’t an email address (eg, ‘FreeNAS’)
- ‘Outgoing mail server’ to ‘smtp.sendgrid.com’
- ‘Mail server port’ to ‘2525’ (or ‘587’)
- ‘Security’ to ‘TLS’
- ‘SMTP Authentication’ to enabled
- ‘Username’ is ‘apikey’
- Password is the API key from step 3.
- Save it.
- Click ‘Send test email’. You should hopefully receive an email.
Troubleshooting
If it doesn’t work, make sure you’ve:
- set the API key correctly
- verified sender authentication is working – try sending an email with telnet
- the emails match what you’ve verified
- if you use your own domain, try setting your localdomain to your domain
- your ISP isn’t blocking the outgoing port.