After days of troubleshooting, google search, and reconfiguration, my current configuration is:
[root@mail01 ~]# postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
html_directory = no
inet_interfaces =
mail_owner = postfix
mail_spool_directory = /var/spool/mail
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost
mydomain = localdomain
myhostname = mail01
mynetworks =
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES
recipient_delimiter = +
relay_domains =
sample_directory = /usr/share/doc/postfix-2.3.3/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtpd_banner = mail-server
unknown_local_recipient_reject_code = 550
virtual_gid_maps = static:
virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_mailbox_domains.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_transport = dovecot
virtual_uid_maps = static:
[root@mail01 ~]# cat /etc/postfix/master.cf
#
# Postfix master process configuration file. For details on the format
# of the file, see the master(5) manual page (command: "man 5 master").
#
# ==========================================================================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ==========================================================================
smtp inet n - n - - smtpd
#submission inet n - n - - smtpd
# -o smtpd_enforce_tls=yes
# -o smtpd_sasl_auth_enable=yes
# -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#smtps inet n - n - - smtpd
# -o smtpd_tls_wrappermode=yes
# -o smtpd_sasl_auth_enable=yes
# -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#628 inet n - n - - qmqpd
pickup fifo n - n 60 1 pickup
cleanup unix n - n - 0 cleanup
qmgr fifo n - n 300 1 qmgr
#qmgr fifo n - n 300 1 oqmgr
tlsmgr unix - - n 1000? 1 tlsmgr
rewrite unix - - n - - trivial-rewrite
bounce unix - - n - 0 bounce
defer unix - - n - 0 bounce
trace unix - - n - 0 bounce
verify unix - - n - 1 verify
flush unix n - n 1000? 0 flush
proxymap unix - - n - - proxymap
smtp unix - - n - - smtp
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay unix - - n - - smtp
-o fallback_relay=
# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq unix n - n - - showq
error unix - - n - - error
discard unix - - n - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - n - - lmtp
anvil unix - - n - 1 anvil
scache unix - - n - 1 scache
#
# ====================================================================
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# Many of the following services use the Postfix pipe(8) delivery
# agent. See the pipe(8) man page for information about ${recipient}
# and other message envelope options.
# ====================================================================
#
# maildrop. See the Postfix MAILDROP_README file for details.
# Also specify in main.cf: maildrop_destination_recipient_limit=1
#
maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
#
# The Cyrus deliver program has changed incompatibly, multiple times.
#
old-cyrus unix - n n - - pipe
flags=R user=cyrus argv=/usr/lib/cyrus-imapd/deliver -e -m ${extension} ${user}
# Cyrus 2.1.5 (Amos Gouaux)
# Also specify in main.cf: cyrus_destination_recipient_limit=1
cyrus unix - n n - - pipe
user=cyrus argv=/usr/lib/cyrus-imapd/deliver -e -r ${sender} -m ${extension} ${user}
#
# See the Postfix UUCP_README file for configuration details.
#
uucp unix - n n - - pipe
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
#
# Other external delivery methods.
#
ifmail unix - n n - - pipe
flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp unix - n n - - pipe
flags=Fq. user=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient
dovecot unix - n n - - pipe
flags=DRhu user=vmail:mail argv=/usr/libexec/dovecot/deliver -d ${recipient}
[root@mail01 ~]# dovecot -n
# 1.0.7: /etc/dovecot.conf
base_dir: /var/run/dovecot/
log_path: /var/log/dovecot.log
info_log_path: /var/log/mailinfo
log_timestamp: %Y-%m-%d %H:%M:%S
listen(default):
listen(imap):
listen(pop3):
ssl_disable: yes
login_dir: /var/run/dovecot/login
login_executable(default): /usr/libexec/dovecot/imap-login
login_executable(imap): /usr/libexec/dovecot/imap-login
login_executable(pop3): /usr/libexec/dovecot/pop3-login
first_valid_uid:
last_valid_uid:
first_valid_gid:
last_valid_gid: guid_of_user_postfix>
mail_privileged_group: mail
mail_location: maildir:/var/mail/vmail/%d/%n/Maildir
maildir_copy_with_hardlinks: yes
mbox_very_dirty_syncs: yes
mail_executable(default): /usr/libexec/dovecot/imap
mail_executable(imap): /usr/libexec/dovecot/imap
mail_executable(pop3): /usr/libexec/dovecot/pop3
mail_plugin_dir(default): /usr/lib64/dovecot/imap
mail_plugin_dir(imap): /usr/lib64/dovecot/imap
mail_plugin_dir(pop3): /usr/lib64/dovecot/pop3
pop3_client_workarounds(default):
pop3_client_workarounds(imap):
pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh
auth default:
mechanisms: plain login
user: mail
passdb:
driver: sql
args: /etc/dovecot-mysql.conf
userdb:
driver: static
args: uid=
userdb:
driver: sql
args: /etc/dovecot-mysql.conf
socket:
type: listen
client:
path: /var/spool/postfix/auth
mode: 432 #<-- in the configuration the value of this is 0660, I do not know why "dovecot -n" showed this
user: postfix
group: postfix
master:
path: /var/run/dovecot/auth-master
mode: 432 #<-- in the configuration the value of this is 0660, I do not know why "dovecot -n" showed this
user: vmail
I use the "Test Account Settings" feature of outlook 2003 and it indicated "All tests completed successfully. I have checked the logs after testing with outlook 2003 and this is what I got:
[root@mail01 ~]# cat /var/log/maillog
Jan 7 20:59:50 mail01 postfix/smtpd[3342]: warning:
Jan 7 20:59:50 mail01 postfix/smtpd[3342]: connect from unknown[
Jan 7 20:59:52 mail01 postfix/smtpd[3342]: 567FEEB0077: client=unknown[
Jan 7 20:59:53 mail01 postfix/cleanup[3347]: 567FEEB0077: message-id=<20090108025952.567FEEB0077@mail01>
Jan 7 20:59:53 mail01 postfix/qmgr[3152]: 567FEEB0077: from=
Jan 7 20:59:53 mail01 postfix/pipe[3348]: 567FEEB0077: to=
Jan 7 20:59:54 mail01 postfix/smtpd[3342]: disconnect from unknown[
[root@mail01 ~]# cat /var/log/dovecot.log
[root@mail01 ~]# cat /var/log/mailinfo
dovecot: 2009-01-07 20:59:47 Info: pop3-login: Login: user=
dovecot: 2009-01-07 20:59:48 Info: POP3(admin@myvirtualdomain.com): Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0
The thing that is currently the pain in my head is the part where it says "Can't open log file /var/log/mailinfo: Permission denied". As of now I am in a dead end situation (I think) because I cannot troubleshoot why my mail server fails to receive emails because the useful part in logs are not being written on to it because of a Permission Denied error which is actually written to the same log file.
Did I missed something in the configuration? Wrong value? Something that should have been added? Something that should have been deleted? Please help me get out of the "Permission Denied" problem so that I could go on with troubleshooting the send/receive of mails.
Thanks!!!
