From ArchWiki
Revision as of 20:10, 18 October 2013 by Siot (talk | contribs) (Creation)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

S-nail is a mail processing system with a command syntax reminiscent of ed with lines replaced by messages. It is based on Heirloom mailx that is based upon Berkeley Mail 8.1, is intended to provide the functionality of the POSIX mailx command and offers (mostly optional) extensions for IDNA, MIME, S/MIME, SMTP, POP3 and IMAP. It is usable as a mail batch language.

Setup for send mails with external smtp server

Add to your /etc/mail.rc the following text changing bold strings:

set smtp=server:port
set smtp-use-starttls
set ssl-verify=ignore
set ssl-auth=login
set smtp-auth-user=mailuser
set smtp-auth-password=password
set from="youremail@domain"    #optional
set sender="youremail@domain"  #optional

Remember that this configuration is system-wide.

Testing and sending emails

To test the configuration and send mails on bash scripts you can use:

$echo "message" << EOT | mailx -v -s "subject" receiver@mail.com