07.06.2014 Views

2 - Raspberry PI Community Projects

2 - Raspberry PI Community Projects

2 - Raspberry PI Community Projects

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

EXTRA<br />

erying the MX records<br />

When the DNS does not have an MX record for a domain, the email server will<br />

try sending the messages to the host itself, by using the matching A record<br />

(or AAAA in IPv6).<br />

In some cases, the installation can also ask what networks should be allowed to send email via<br />

the machine. In its default configuration, Postfix only accepts emails coming from the machine<br />

itself; the local network will usually be added. The Falcot Corp administrators added 192.168.0.<br />

0/16 to the default answer. If the question is not asked, the relevant variable in the configuration<br />

file is mynetworks, as seen in the example below.<br />

Local email can also be delivered through procmail. This tool allows users to sort their incoming<br />

email according to rules stored in their ~/.procmailrc file.<br />

After this first step, the administrators got the following configuration file; it will be used as a<br />

starting point for adding some extra functionality in the next sections.<br />

# See /usr/share/postfix/main.cf.dist for a commented, more complete version<br />

# Debian specific: Specifying a file name will cause the first<br />

# line of that file to be used as the name. The Debian default<br />

# is /etc/mailname.<br />

#myorigin = /etc/mailname<br />

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)<br />

biff = no<br />

# appending .domain is the MUA's job.<br />

append_dot_mydomain = no<br />

# Uncomment the next line to generate "delayed mail" warnings<br />

#delay_warning_time = 4h<br />

# TLS parameters<br />

smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem<br />

smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key<br />

smtpd_use_tls=yes<br />

smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache<br />

smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache<br />

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for<br />

# information on enabling SSL in the smtp client.<br />

myhostname = mail.falcot.com<br />

alias_maps = hash:/etc/aliases<br />

254 The Debian Administrator's Handbook

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!