Some back story
I have the 3 last days struggled hard to try to get a mail server up and run. After first trying to get it up on a server with blocked ports I decided yesterday after several reinstalls to transfer my server over to linode.com so I dont have the struggels with blocked ports.
I finally have a mail server up and running with Postfix, Dovecot, SpamAssassin, ClamAV, Sieve and Roundcube. And even tho my server dont have blocked ports I'm running all mail through dynu.com with a SMTP Outbound Relay and Email Store/Forward for the extra security layer and storing/backup if my server for some reason should be unavailable.
Now to the problem, I can't recive any mail for some reason. But I can send mail just fine from the terminal, roundcube and from my iphone and it gets to the reciver without any problems.
When I check the logs dynu acctualy try's to deliver but something are failing along the way as this is what the log contains after a delivery request
Dec 22 22:44:17 rajohan postfix/smtpd: connect from mx1.dynu.com[ip address] Dec 22 22:44:18 rajohan postfix/smtpd: lost connection after UNKNOWN from mx1.dynu.com[ip address] Dec 22 22:44:18 rajohan postfix/smtpd: disconnect from mx1.dynu.com[ip address] unknown=0/1 commands=0/1
I would be really grateful if someone could take a look at my master, main and dovecot config's and see if they can see why. I'm by no means a linux expert, in fact I just started toying with linux about 1 month ago and are now feeling quite lost on what to do.
My master.cfg: https://pastebin.com/pH12rCq7 My main.cfg: https://pastebin.com/uZCFHNzS My dovecot.cfg https://pastebin.com/9SCKz1dj
And here are some of my DNS settings
- MX record 1 and 2 is applied to mail.rajohan.no
- mail.rajohan.no has a A record to the server ip
- rajohan.no has a A record to the server ip
- Reverse DNS is applied to rajohan.no (not sure if this should be applied to mail.rajohan.no and not rajohan.no)
- DKIM is applied to mail._domainkey.relay.rajohan.no
- SPF is applied to rajohan.no
And another question when i set hostname in terminal to rajohan would what overwrite localhost? Or is thoose 2 separate things?