Difference between revisions of "S-nail"

From ArchWiki
Jump to: navigation, search
(Setup for send mails with external smtp server)
(simplify language and minimize configuration)
Line 1: Line 1:
 
[[Category:Email Client]]
 
[[Category:Email Client]]
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.
+
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, which in turn is based upon Berkeley Mail 8.1. It 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 ==
+
== Sending mail with an external SMTP server ==
  
Add to your {{ic|/etc/mail.rc}} the following text changing bold strings:
+
Configuration files are {{ic|$HOME/.mailrc}} and the systemwide {{ic|/etc/mail.rc}}. Add the following text to the appropriate file, changing bold strings:
  
 
  set smtp='''smtp(s)://server:port'''
 
  set smtp='''smtp(s)://server:port'''
 
  set smtp-use-starttls
 
  set smtp-use-starttls
set ssl-verify=ignore
 
set smtp-auth=login
 
 
  set smtp-auth-user='''mailuser'''
 
  set smtp-auth-user='''mailuser'''
 
  set smtp-auth-password='''password'''
 
  set smtp-auth-password='''password'''
  set from="'''Your Name <youremail@domain>'''"   #optional
+
  set from="'''Your Name <youremail@domain>'''" # optional
set sender="'''Another Name <anotheremail@domain>'''"  #optional
+
 
+
Remember that this configuration is system-wide.
+
  
 
=== Testing and sending emails ===
 
=== Testing and sending emails ===
  
To test the configuration and send mails on bash scripts you can use:
+
To test the configuration:
  
 
  $ echo "'''message'''" | mailx -v -s "'''subject'''" '''receiver@mail.com'''
 
  $ echo "'''message'''" | mailx -v -s "'''subject'''" '''receiver@mail.com'''

Revision as of 00:41, 24 December 2013

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, which in turn is based upon Berkeley Mail 8.1. It 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.

Sending mail with an external SMTP server

Configuration files are $HOME/.mailrc and the systemwide /etc/mail.rc. Add the following text to the appropriate file, changing bold strings:

set smtp=smtp(s)://server:port
set smtp-use-starttls
set smtp-auth-user=mailuser
set smtp-auth-password=password
set from="Your Name <youremail@domain>" # optional

Testing and sending emails

To test the configuration:

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