ssmtp debian linux

Notes on setting up ssmpt on debian squeeze

The system
# cat /etc/issue /etc/debian_version ;
Debian GNU/Linux 6.0 \n \l

6.0.7



You may need to remove exim first
# apt-get --purge remove exim4-base exim4-config


Install ssmtp
# apt-get install ssmtp


An example ssmtp.conf
# cat /etc/ssmtp/ssmtp.conf 
#
# Config file for sSMTP sendmail
#
# The person who gets all mail for userids < 1000
# Make this empty to disable rewriting.
#root=postmaster
root=donotspammeever@ipduh.awmn

# The place where the mail goes. The actual machine name is required no 
# MX records are consulted. Commonly mailhosts are named mail.domain.com
#mailhub=mail
mailhub=email.ipduh.awmn

# Where will the mail seem to come from?
#rewriteDomain=
hostname=xenocrates.ipduh.awmn

# The full hostname
hostname=xenocrates.ipduh.awmn

# Are users allowed to set their own From: address?
# YES - Allow the user to specify their own From: address
# NO - Use the system generated From: address
FromLineOverride=YES



Test ssmpt setup
# echo "what up" |ssmtp -v systems@ipduh.awmn -f me
[<-] 220 ares.ipduh.awmn ESMTP Postfix
[->] HELO xenocrates.ipduh.awmn
[<-] 250 ares.ipduh.awmn
[->] MAIL FROM:
[<-] 250 2.1.0 Ok
[->] RCPT TO:
[<-] 250 2.1.5 Ok
[->] DATA
[<-] 354 End data with .
[->] Received: by xenocrates.ipduh.awmn (sSMTP sendmail emulation); Sun, 18 May 2014 16:25:07 +0300
[->] From: "root" 
[->] Date: Sun, 18 May 2014 16:25:07 +0300
[->] what up
[->] 
[->] .
[<-] 250 2.0.0 Ok: queued as 025E055A31
[->] QUIT
[<-] 221 2.0.0 Bye





ssmtp setup debian squeeze