Saturday, August 13, 2011

Lab Postfix Sample config

dovecot.conf
[root@rhel01 dovecot]# grep -v ^# /etc/dovecot/dovecot.conf
!include conf.d/*.conf
protocols = imap pop3
listen = 192.168.122.122
dict {
#quota = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext
#expire = sqlite:/etc/dovecot/dovecot-dict-sql.conf.ext
}

/etc/postfix/main.cf
[root@rhel01 postfix]# grep -v ^# main.cf
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
mail_owner = postfix
myhostname = rhel01.penoycentral.net
mydomain = penoycentral.net
myorigin = $mydomain
inet_interfaces = all
inet_protocols = all
mydestination = $myhostname, $mydomain, localhost.$mydomain, localhost, mail.penoycentral.net
unknown_local_recipient_reject_code = 550
mynetworks = 192.168.1.0/24, 192.168.122.0/24, 127.0.0.1/8
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
debug_peer_level = 2
debugger_command =
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
ddd $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
html_directory = no
manpage_directory = /usr/share/man
sample_directory = /usr/share/doc/postfix-2.6.6/samples
readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES



DNS penoycentral.net zone config for the mailserver to work properly
[root@wk named]# cat /var/named/penoycentral.net.zone
$TTL 1D
@ IN SOA penoycentral.net. root.penoycentral.net (
2011091302 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
IN NS wk.penoycentral.net.
wk IN A 192.168.1.70
@ IN MX 10 mail.penoycentral.net.
rhel01 IN A 192.168.122.122
rhel02 IN A 192.168.122.120
mail IN CNAME rhel01

To check if MX records setup properly in the domain
[root@rhel02 /]# nslookup
> set type=mx
> penoycentral.net
Server: 192.168.1.70
Address: 192.168.1.70#53

penoycentral.net mail exchanger = 10 mail.penoycentral.net.


#### postfix usefull commands #####

delete mailq
#postsuper -d

No comments:

Post a Comment