8.2.13.3. Instalace MTA

rcsinfor="$Header: /home/radek/cvs/unix-book/unix.xml,v 1.7 2009-03-07 03:52:40 radek Exp $"

Jako MTA používám na většině virtuálních strojů program ssmtpd. Pro jednoduché účely, kdy vyžadujeme jen možnost odeslat poštu, úplně stačí.

Program tedy nainstalujeme

# apt-get install ssmtp

V rámci konfigurace zadámě „nějaké“ parametry a poté opravíme, nebo spíše přepíšeme konfigurační soubory. Do souboru /etc/ssmtp/ssmtp.conf jsem napsal:

***     This file is auto-generated using debconf on install.     ***
*** Any changes made may be overwritten on next upgrade depending ***
***  on your answer to the question on overwriting config files.  ***
#
# Config file for sSMTP sendmail
#
# The person who gets all mail for userids < 1000
root=radek@hnilica.cz

# 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=localhost

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

# The full hostname
hostname=deb.hnilica.cz

# 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

Kde deb v hostname je jméno virtuálního stroje.

Druhý konfigurační soubor /etc/ssmtp/revaliases jsem ponechal beze změn, tedy prázdný.