Postfix

Before configuring Postfix, make sure you have an IP, hostname and a domain. For this example I used the IP “10.0.0.152”, hostname “Lunetikk” and domain “lunetikk.local”

Editing main.cf

The Postfix config is located at “/etc/postfix/main.cf” and can be edited with vi.

Line 91 remove comment (#) and insert the FQDN

mydomain = lunetikk.lunetikk.local

Line 107 remove comment so the ending after $ will be the domain

myorigin = $mydomain

Line 268 remove comment and insert your network (keep the comment if you dont want to restrict your network)

mynetworks = 10.0.0.0/24, 127.0.0.0/8

Line 423 remove comment to use Maildir

home_mailbox = Maildir/

Line 671 remove comment and insert FQDN

myhostname = lunetikk.lunetikk.local

Line 675 change to “all”, all Interfaces will now be used. If this option is “localhost”, Postfix's port 25 will not be contacted by other pcs in the network.

inet_interfaces = all

Line 683 insert to use Cyrus as mailbox. This service will be installed and configured on the page Cyrus

mailbox_transport = cyrus

Line 691 change, to check the hostname before sending (spam protection)

smtpd_recipient_restrictions = permit_mynetworks, permit_auth_destination, permit_sasl_authenticated, reject

Line 693 change to “yes” to activate SMTPD authentification

smtpd_sasl_auth_enable = yes

Line 697 can be changed to resize your mailbox. In this example it is 100MB. 0 = no restriction.

mailbox_size_limit = 102400000

Insert at the bottom of main.cf

smtpd_sasl_security_options = noanonymous
smtpd_sasl_local_domain = $myhostname

Save and start Postfix and saslauthd afterwards

rcsaslauthd start
rcpostfix start

Optional: To start Postfix and saslauthd on boot

chkconfig postfix on
chkconfig saslauthd on

⇒Continue with Cyrus