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=smtp.gmail.com:587 set smtp-use-starttls set smtp-auth-user=[username]@gmail.com set ssl-verify=ignore set smtp-auth-password=[password]
3. sending mail from cli:
# echo “email body” | /opt/bin/nail -s “subject” [destination]@whatever92389.com
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.
[...] My backup plan finally done
Synology DS207+ usage series 11 – Setup nail to send email from CLI (using gmail smtp) [...]
[...] the script need wget, bash and nail to [...]