S-nail: Difference between revisions

From Coolscript
Jump to navigation Jump to search
No edit summary
 
(22 intermediate revisions by the same user not shown)
Line 1: Line 1:
S-nail is an easy workaround for Linux workstation which can be quickly establish, it works with gmail, yahoo and others.
S-nail is an easy way to send email on Linux. The setup is quickly done and works with gmail, yahoo and others. <br>
The following is an example tested Ubuntu 20 or Debian 10/Buster
The following is an example setup which was tested on Ubuntu 20 and Debian 10/Buster


=Installation=
=Installation=
  apt-get install s-nail
  '''apt-get install s-nail'''


=Configuration=
=Configuration=
This configuration is a quick sample to use [https://en.wikipedia.org/wiki/Transport_Layer_Security TLS]  
This configuration is a quick sample of howto to use [https://en.wikipedia.org/wiki/Transport_Layer_Security TLS]  
with [https://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol#STARTTLS_or_%22Opportunistic_TLS%22 STARTTLS]  
with [https://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol#STARTTLS_or_%22Opportunistic_TLS%22 STARTTLS]  
and [https://en.wikipedia.org/wiki/SMTP_Authentication#Details PLAIN].
and [https://en.wikipedia.org/wiki/SMTP_Authentication#Details PLAIN] which suits for almost all mail server.
It already contains the USERNAME and PWD. This way the client does not need to authenticate anymore.
It already contains the '''USERNAME''' and '''PASSWORD''' to '''AUTHENTICATE'''. <br>
This way the client does not need to authenticate itself anymore.
This example trusts the
[https://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol Mailserver] (
[https://en.wikipedia.org/wiki/Message_transfer_agent MTA]) and does '''not''' verify the [https://en.wikipedia.org/wiki/Transport_Layer_Security TLS]
[https://en.wikipedia.org/wiki/Public_key_certificate certificate],
this is a workaround for missing [https://en.wikipedia.org/wiki/Root_certificate root certificates] seen often in private environments.


*Add the following to /etc/s-nail.rc
*Add and configure the following to '''/etc/s-nail.rc'''


  set v15-compat  
  set v15-compat  
set smtp='''<span style="color:red">mailserver.com:587</span>'''
set user='''<span style="color:red">username'''</span>
set password='''<span style="color:red">password'''</span>
  ssl-method=auto
  ssl-method=auto
set smtp=<your-mailserver.com>
set user=<username>
set password=<password>
  set smtp-use-starttls
  set smtp-use-starttls
  set ssl-verify=ignore
  set ssl-verify=ignore
  set smtp-auth=plain
  set smtp-auth=plain
=Test=
'''echo "TestText" | s-nail -s "TestSubject" user.name@domain.com'''
Keywords: mta mail tls ssl smtp pop pop3 imap message

Latest revision as of 19:56, 18 March 2021

S-nail is an easy way to send email on Linux. The setup is quickly done and works with gmail, yahoo and others.
The following is an example setup which was tested on Ubuntu 20 and Debian 10/Buster

Installation

apt-get install s-nail

Configuration

This configuration is a quick sample of howto to use TLS with STARTTLS and PLAIN which suits for almost all mail server. It already contains the USERNAME and PASSWORD to AUTHENTICATE.
This way the client does not need to authenticate itself anymore. This example trusts the Mailserver ( MTA) and does not verify the TLS certificate, this is a workaround for missing root certificates seen often in private environments.

  • Add and configure the following to /etc/s-nail.rc
set v15-compat 
set smtp=mailserver.com:587
set user=username
set password=password
ssl-method=auto
set smtp-use-starttls
set ssl-verify=ignore
set smtp-auth=plain

Test

echo "TestText" | s-nail -s "TestSubject" user.name@domain.com


Keywords: mta mail tls ssl smtp pop pop3 imap message