Oracle Linux/Simple IMAP Server
From r00tedvw.com wiki
(Difference between revisions)
| Line 69: | Line 69: | ||
alias_maps = hash:/etc/aliases | alias_maps = hash:/etc/aliases | ||
alias_database = hash:/etc/aliases | alias_database = hash:/etc/aliases | ||
| + | </nowiki> | ||
==Dovecot== | ==Dovecot== | ||
Revision as of 14:12, 28 November 2016
Contents |
Overview
Dovecot for POP/IMAP
Postfix for SMTP
Setup SSL
Just going to use a simple self-signed cert. However, before we can, we need to create a symlink so that we utilize the existing private directory and create a link from the standard location for private keys to the actual location.
~$ cd /etc/ssl/ ~$ sudo ln -s ../pki/tls/private/ private ~$ sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/mail.key -out /etc/ssl/certs/mailcert.pem
Postfix
Make sure exim4 is not installed and verify that postfix is installed and at the latest version
~$ sudo rpm -qa | grep exim ~$ sudo yum install postfix
Edit the following: /etc/postfix/master.cf
uncomment: submission inet n - n - - smtpd -o smtpd_tls_security_level=encrypt -o smtpd_sasl_auth_enable=yes -o smtpd_client_restrictions=permit_sasl_authenticated,reject -o milter_macro_daemon_name=ORIGINATING add: -o syslog_name=postfix/submission -o smtpd_tls_wrappermode=no -o smtpd_recipient_restrictions=permit_mynetworks,permit_sasl_authenticated,reject -o smtpd_sasl_type=dovecot -o smtpd_sasl_path=private/auth
Let's back up the next file we'll be modifying:
~$ sudo cp /etc/postfix/main.cf /etc/postfix/main.cf.original
Edit the following: /etc/postfix.main.cf
uncomment and edit:
myhostname = mail.domain.com
myorigin = /etc/mailname
inet_interfaces = all
mydestination = mail.domain.com, domain.com, localhost, localhost,localdomain
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
relayhost =
uncomment:
recipient_delimiter = +
local_recipient_maps = proxy:unix:passwd.byname $alias_maps
comment out:
inet_interfaces = localhost
add:
# Adding mailbox size limit of 0 to remove restrictions on size
mailbox_size_limit = 0
# Adding SSL
smtpd_tls_cert_file=/etc/ssl/certs/mailcert.pem
smtpd_tls_key_file=/etc/ssl/private/mail.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_tls_security_level=may
smtpd_tls_protocols = !SSLv2, !SSLv3
verify:
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
Dovecot
~$ sudo yum install dovecot.x86_64