Synology usage series 11 – Setup nail to send email from CLI (using gmail smtp)

In order to send email from CLI, I setup nail as below:

1. ipkg install nail
2. edit /opt/etc/nail.rc, add following lines to the end of the file

set smtp-use-starttls
set smtp-auth-user=[username]
set ssl-verify=ignore
set smtp-auth-password=[password]

3. sending mail from cli:

# echo “email body” | /opt/bin/nail -s “subject” [destination]

UPDATE Jul 18, 2009

Recently I installed the postfix SMTP server on the diskstation. So the nail can actually make use of the SMTP from localhost instead of using Gmail.

set smtp=localhost
#set smtp-use-starttls
#set smtp-auth-user=
#set ssl-verify=
#set smtp-auth-password=

All I need is to assign the smtp to localhost and commented the rest of the smtp options.

2 thoughts

  1. Pingback: Synology DS207+ usage series 12 – Send email alert when someone login to shell | BLoG of R@y

  2. Pingback: Synology DS207+ usage series 15 – Send me email alert ONLY when external IP is changed | BLoG of Rαy

Leave a Reply

Your email address will not be published. Required fields are marked *