Search:  
Gentoo Wiki

MTA_sSMTP

Contents

sSMTP

This is a program that replaces sendmail on workstations that should send their mail via the departmental mailhub from which they pick up their mail (via pop, imap, rsmtp, pop_fetch, NFS... or the like). This program accepts mail and sends it to the mailhub, optionally replacing the domain in the From: line with a different one.

Warning: the above is all it does. It does not receive mail, expand aliases or manage a queue. That belongs on a mailhub with a system administrator.

The man page ssmtp and the program logic manual (ssmtp_plm) discuss the limitations in more detail.

It uses a minimum of external configuration information, and so can be installed by copying the (right!) binary and an optional four-line config file to a given machine.

Files

/etc/ssmtp/ssmtp.conf - configuration file 
/etc/ssmtp/revaliases - reverse aliases file

Configuration

ssmtp.conf

#
# /etc/ssmtp/ssmtp.conf -- a config file for sSMTP sendmail.
#

# The person who gets all mail for userids < 1000
# Make this empty to disable rewriting.
root=postmaster

# The place where the mail goes. The actual machine name is required
# no MX records are consulted. Commonly mailhosts are named mail.domain.com
# The example will fit if you are in domain.com and your mailhub is so named.
mailhub=mail

# Example for SMTP port number 2525
# mailhub=mail.your.domain:2525
# Example for SMTP port number 25 (Standard/RFC)
# mailhub=mail.your.domain        
# Example for SSL encrypted connection
# mailhub=mail.your.domain:465

# Where will the mail seem to come from?
rewriteDomain=

# The full hostname
# hostname=_HOSTNAME_

# Set this to never rewrite the "From:" line (unless not given) and to
# use that address in the "from line" of the envelope.
#FromLineOverride=YES

# Use SSL/TLS to send secure messages to server.
#UseTLS=YES

# Use SSL/TLS certificate to authenticate against smtp host.
#UseTLSCert=YES

# Use this RSA certificate.
#TLSCert=/etc/ssl/certs/ssmtp.pem

Example

root=you@your.domain
mailhub=mail.your.domain
rewriteDomain=
UseSTARTTLS=YES
AuthUser=username
AuthPass=password

Example 2

mailhub=mail.ISP_Domain.com
rewriteDomain=ISP_Domain.com
hostname=ISP_Domain.com
FromLineOverride=YES

revaliases

# sSMTP aliases
# 
# Format:	local_account:outgoing_address:mailhub
#
# Example: root:your_login@your.domain:mailhub.your.domain[:port]
# where [:port] is an optional port number that defaults to 25.

Example

root:you@your.domain:mail.your.domain[:port]
you:you@your.domain:mail.your.domain[:port]

More

Retrieved from "http://www.gentoo-wiki.info/MTA_sSMTP"

Last modified: Thu, 24 Jan 2008 10:31:00 +0000 Hits: 3,827