Friday, November 13, 2015

Setup personal email server using postfix,dovecot and squirrelmail with MySQL


  1. Postfix,Dovecot with MySQL installation guide is available https://www.linode.com/docs/email/postfix/email-with-postfix-dovecot-and-mysql
  2. After that SquirrelMail setup is  http://www.tecmint.com/setup-postfix-mail-server-in-ubuntu-debian/
  3. Needed to add SquirrelMail plugin for mysql i.e. change_sqlpass.How to set it up https://www.howtoforge.com/how-to-configure-squirrelmail-to-allow-users-to-change-their-email-passwords-on-an-ispconfig-3-server

Problems and solution(Solution that worked for me)

...bounced (mail for example.com loops back to myself)...
Possible Solution : https://www.howtoforge.com/postfix-mail-for-example.com-loops-back-to-myself


...status=bounced (unknown user: "sandeep")...
Possible Solution : You will get this If you set /etc/postfix/main.cf
mydestination = localhost.$mydomain, localhost, mail.$mydomain, $mydomain
change it to
mydestination = localhost


...mail dovecot: lmtp(12873): Fatal: Error reading configuration: Invalid settings: postmaster_address setting not given...
Possible Solution : In /etc/dovecot/dovecot.conf
postmaster_address=postmaster at <domain name like example.com>


...is neither permitted nor denied by best guess record for domain of <email>@<domain name>...
Possible Solution : Needed to setup SPF as defined in https://www.mail-tester.com/spf/linode


...Our system has detected that this 550-5.7.1 message does not meet IPv6 sending guidelines regarding PTR records 550-5.7.1 and authentication. Please review 550-5.7.1  https://support.google.com/mail/?p=ipv6_authentication_error...
Possible Solution : Not know skipping ipv6 is a good option/solution but the alternative find is that in /etc/postfix/main.cf
change
inet_protocols = all
to
inet_protocols = ipv4

...Not recieving any mail from another domain or even getting log in mail log...
Possible Solution : Enable ports in iptables
iptables -A INPUT -p tcp --dport 25 -m state --state NEW -j ACCEPT
iptables -A INPUT -p tcp --dport 465 -m state --state NEW -j ACCEPT
iptables -A INPUT -p tcp --dport 587 -m state --state NEW -j ACCEPT
iptables -A INPUT -p tcp --dport 110 -m state --state NEW -j ACCEPT
iptables -A INPUT -p tcp --dport 995 -m state --state NEW -j ACCEPT
iptables -A INPUT -p tcp --dport 143 -m state --state NEW -j ACCEPT
iptables -A INPUT -p tcp --dport 993 -m state --state NEW -j ACCEPT


...Squirrelmail load_config fatal error for change_sqlpass...
Possible Solution : change_sqlpass is dependent of compitability plugin.Search it and install that plugin in Squirrelmail


...connect to localhost[private/dovecot-lmtp]: Connection refused...
Possible Solution : Check in /etc/postfix/main.cf for virtual transport
and also check /etc/dovecot/conf.d/10-master.conf configuration

No comments: