Pages

Search This Blog

Total Pageviews

Sunday, April 17, 2011

Postfix Troubleshooting Guide

Problem. Connection Timeout error while sending mails.

Solution: First check your network connectvity & dns resolution
1. Please check your internet gateway is reachable or not with route -n & ping command
route -n
ping 172.26.3.94 ( Gateway IP Address)
ping google.com
2. Check your nameservers.
cat /etc/resolve.conf
search domainname.com
nameserver 4.2.2.2
nameserver 4.2.2.3
cat /etc/sysconfig/network
FORWARD_IPV4=yes
NETWORKING=yes
HOSTNAME=phtx
DOMAINNAME=domainname.com
3. Check your smtp port 25 is open or not with following command on your mail server.
telnet mail.domainname.com 25
4. Check your hosts file.
cat /etc/hosts
sample Output
127.0.0.1 localhost.localdomain localhost
192.168.0.1 domainname.com server
If You are using secondary mx pointer, so please check your secondary pointer ( Where your
mail server is located) is reachable or not with ping command
ping mail.domainname.com
--------------------------------------------------------------------------------------------------------------------------------
Problem : Access Denied Error (Relay access denied;)
 
Solution: First check your access file, from which ip address or domains your mails is being
relayed.
You can block or allow access for domain names or ip address here.
cat access
mail.domainname.com RELAY
64.229.18.84 RELAY
62.15.74.220 RELAY
As well as Please check mynetwork option in main.cf file
/etc/postfix/main.cf
mynetworks = 127.0.0.0/8, 225.57.0.0/24
-------------------------------------------------------------------------------------------------------------------------------------
Problem: User unknown error

Solution: If you are using virtual users, virtual domains , so please check your following
files.
/etc/postfix/virtual
/etc/postfix/canonical
as well as check your users in /etc/passwd file
make changes accordingly.
--------------------------------------------------------------------------------------------------------------------------------------
Problem: Host not found error

Solution: Please insert following option in main.cf file
File: /etc/postfix/main.cf
smtp_helo_name = server.domainname.com (hostname.domainname.com)
also check your domainname,hostname in /etc/hosts & /etc/sysconfig/network file.
--------------------------------------------------------------------------------------------------------------------------------------
Problem: Mail Bounce.

Solution: There may be various reason to mail bouce.
1. Hostname & domainname unreachable or dns problem ( The domain & host to which we are
sending mails), so please check the domain name or hostname with ping command.
--------------------------------------------------------------------------------------------------------------------------------------
Problem: Connection Dropped by IMAP server.

Solution: Please check dovecot service is running or not on the server.
/etc/init.d/dovecot status
cat /etc/dovecot.conf |grep protocol
protocols = imap imaps pop3 pop3s
--------------------------------------------------------------------------------------------------------------------------------------
Problem: Authentication Error or not authorised user error

Solution: If you are using secondary mx pointer ( mailing is hosted on another server),
then you’ve to maintain authentication credentials in /etc/postfix/sasl_passwd file
cat sasl_passwd
mail.domainname.com username@domainname.com:password
after that update database for sasl_passwd file
Note: whenever you make changes in following files, please update database of
respective file as following
if you make changes in acccess file , file path: /etc/postfix/access
so give postmap command with file name
postmap access
postmap virtual
postmap canonical
–------------------------------------------------------------------------------------------------------------------------------------

No comments:

Post a Comment