Setting up home email server

I just registered myself a new domain and now I'm working on setting up my own email server. I'm using Postfix/Dovecot and its super tedious and shitty. So many options and config files. Anyways, I finally got Postfix and Dovecot configured and working with my email client, but noticed that my test emails were not going though to gmail accounts. Here is an excert from the /var/log/mail.log:

Nov 5 04:08:10 ip-172-30-0-248 postfix/smtp[15326]: connect to gmail-smtp-in.l.google.com[2607:f8b0:400d:c08::1b]:25: Network is unreachable Nov 5 04:08:11 ip-172-30-0-248 postfix/smtp[15326]: 6F55F404C1: host gmail-smtp-in.l.google.com[209.85.232.26] said: 421-4.7.0 [52.5.102.128 15] Our system has detected that this
message is 421-4.7.0 suspicious due to the very low reputation of the sending IP address.
421-4.7.0 To protect our users from spam, mail sent from your IP address has 421-4.7.0 been t emporarily rate limited. Please visit 421 4.7.0 https://support.google.com/mail/answer/188131 for more information. g12si9785657qkh.166 - gsmtp (in reply to end of DATA command)
Nov 5 04:08:13 ip-172-30-0-248 postfix/smtp[15326]: 6F55F404C1: to=paulsoucy1@gmail.com, relay=alt1.gmail-smtp-in.l.google.com[64.233.186.26]:25, delay=2384, delays=2381/0.02/2/0.69
, dsn=4.7.0, status=deferred (host alt1.gmail-smtp-in.l.google.com[64.233.186.26] said: 421-4.7.0 [52.5.102.128 15] Our system has detected that this message is 421-4.7.0 suspicio us due to the very low reputation of the sending IP address. 421-4.7.0 To protect our users from spam, mail sent from your IP address has 421-4.7.0 been temporarily rate limited. Pleas
e visit 421 4.7.0 https://support.google.com/mail/answer/188131 for more information. y44si9813876qta.20 - gsmtp (in reply to end of DATA command))

Notice gmail smtp server replied with an error 421 and then proceeded to call my server names and said I had a very low reputation. Well then I decided to enable DKIM on my server and that seemed to fix it. Now my emails are going though to gmail!

* update * I just discovered www.mail-tester.com With it's feedback, I drastically improved my score from a 4.6/10 to a 9.6/10

Paul Soucy

Read more posts by this author.