Sponsored by

Friday, February 20, 2009

How to configure Mail Postfix with Dovecot on Linux

1. Requirement

Postfix, Qpopper, Mailx, Mailman, Apache2, PHP5, Dovecot

2. Configure Postfix

vim /etc/postfix/main.cf

mail_spool_directory = /var/mail

canonical_maps = hash:/etc/postfix/canonical

virtual_alias_maps = hash:/etc/postfix/virtual

virtual_alias_domains = hash:/etc/postfix/virtual

relocated_maps = hash:/etc/postfix/relocated

transport_maps = hash:/etc/postfix/transport

sender_canonical_maps = hash:/etc/postfix/sender_canonical

masquerade_exceptions = root

masquerade_classes = envelope_sender, header_sender, header_recipient

myhostname = linux.meanchey.com

program_directory = /usr/lib/postfix

inet_interfaces = 192.168.64.210

masquerade_domains = meanchey.com

mydestination = $myhostname, localhost.$mydomain, $mydomain

defer_transports =

mynetworks_style = subnet

disable_dns_lookups = no

relayhost = 192.168.64.210

mailbox_command =

mailbox_transport =

strict_8bitmime = no

disable_mime_output_conversion = no

smtpd_sender_restrictions = hash:/etc/postfix/access

smtpd_client_restrictions =

smtpd_helo_required = no

smtpd_helo_restrictions =

strict_rfc821_envelopes = no

smtpd_recipient_restrictions = permit_mynetworks,reject_unauth_destination,permit_sasl_authenticated

smtp_sasl_auth_enable = no

smtpd_sasl_auth_enable = yes

smtpd_sasl_type = dovecot

smtpd_sasl_path = private/auth

smtpd_use_tls = no

smtp_use_tls = no

alias_maps = hash:/etc/aliases

mailbox_size_limit = 0

message_size_limit = 10240000

3. Configure Qpopper

vim /etc/xinitd.d/qpopper

#

# qpopper - pop3 mail daemon

#

service pop3

{

# disable = yes

socket_type = stream

protocol = tcp

wait = no

user = root

server = /usr/sbin/popper

server_args = -s

flags = IPv4

}

:x!

4. Configure Dovecot

# vim /etc/dovecot/dovecot.conf

auth default {

# Space separated list of wanted authentication mechanisms:

# plain login digest-md5 cram-md5 ntlm rpa apop anonymous gssapi

# NOTE: See also disable_plaintext_auth setting.

mechanisms = plain login

----------------------------------

socket listen {

#master {

# Master socket provides access to userdb information. It's typically

# used to give Dovecot's local delivery agent access to userdb so it

# can find mailbox locations.

#path = /var/run/dovecot/auth-master

#mode = 0600

# Default user/group is the one who started dovecot-auth (root)

#user =

#group =

#}

client {

# The client socket is generally safe to export to everyone. Typical use

# is to export it to your SMTP server so it can do SMTP AUTH lookups

# using it.

path = /var/spool/postfix/private/auth

mode = 0660

user = postfix

group = postfix

}

}

=====================

After you should restart all services.

0 comments:

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More