1. Cấu hình Mail Server sử dụng Postfix làm SMTP:
Mở file /etc/main.cf lên:
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
myhostname = mail.test.vn
mydomain = test.vn
myorigin = $mydomain
inet_interfaces = all
mydestination = $myhostname, $mydomain, localhost.$mydomain
mynetworks_style = class
mynetworks_style = subnet
mynetworks =
127.0.0.0/8, 192.168.0.0/24
relay_domains = hash:/etc/postfix/relaydomains
local_recipient_maps =
transport_maps = hash:/etc/postfix/transport
alias_maps = hash:/etc/postfix/aliases
mail_spool_directory = /var/spool/mail
header_checks = pcre:/etc/postfix/header_checks
debugger_command =
PATH=/usr/bin:/usr/X11R6/bin
xxgdb $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail.postfix
newaliases_path = /usr/bin/newaliases.postfix
mailq_path = /usr/bin/mailq.postfix
setgid_group = postdrop
manpage_directory = /usr/share/man
readme_directory = /usr/share/doc/postfix-2.2.10/README_FILES
alias_database = hash:/etc/postfix/aliases
unknown_local_recipient_reject_code = 450
maximal_queue_lifetime = 2d
smtp_destination_recipient_limit = 100
smtpd_recipient_limit = 200
smtpd_sender_restrictions =
permit_mynetworks,
reject_non_fqdn_sender,
reject_unknown_sender_domain,
reject_rhsbl_sender dsn.rfc-ignorant.org
mailbox_size_limit = 1004857600
message_size_limit = 20971520
body_checks = regexp:/etc/postfix/body_check
smtp_sender_dependent_authentication = yes
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
permit_mynetworks, reject_unauth_destination
html_directory = no
queue_directory = /var/spool/postfix
mail_owner = postfix
2. Configure Dovecot (POP3 & SMTP) /etc/dovecot.conf
protocols = imap pop3
imap_listen = *
pop3_listen = *
ssl_disable = yes
login_dir = /var/run/dovecot-login
login = imap
login = pop3
mbox_locks = fcntl
auth = default
auth_mechanisms = plain
auth_userdb = passwd
auth_passdb = pam
auth_user = root
Sau khi chúng ta cấu hình xong postfix và dovecot xong chúng ta có một mail Server hoàn chỉnh.
