0

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.

The Problem

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[22192]: connect from mx1.dynu.com[ip address]
Dec 22 22:44:18 rajohan postfix/smtpd[22192]: lost connection after UNKNOWN from mx1.dynu.com[ip address]
Dec 22 22:44:18 rajohan postfix/smtpd[22192]: 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

  1. MX record 1 and 2 is applied to mail.rajohan.no
  2. mail.rajohan.no has a A record to the server ip
  3. rajohan.no has a A record to the server ip
  4. Reverse DNS is applied to rajohan.no (not sure if this should be applied to mail.rajohan.no and not rajohan.no)
  5. DKIM is applied to mail._domainkey.relay.rajohan.no
  6. 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?

  • 2
    This isn't a site for hiring people for help. – womble Dec 23 '17 at 2:35
1

Your mail server is not configured to allow unauthenticated senders. This would be normal on port 587 (Submission) but is incorrect for an MX which must allow unauthenticated user to send mail (but not relay to other domains).

$: telnet MX1.DYNU.COM 25
Trying 207.38.69.195...
Connected to MX1.DYNU.com.
Escape character is '^]'.
220 mx1.dynu.com ESMTP
EHLO mail.systemajik.com
250-mx1.dynu.com
250-SIZE
250-STARTTLS
250-AUTH LOGIN
250 HELP
  • I dont really understand what you are saying. Would't reciving mail from the relay server be the same as reciving mail from whoever else? And i can send mail just fine through the relay thats not a problem. The issue is reciving mail other people send to me – Rajohan Dec 22 '17 at 23:08
  • @Rajohan They are entirely different and have different naming in the documentation, Sending servers usually have the MTA (Mail Transfer Agent) rle, while a server for general incoming mail has the MX (Mail eXchange) role. Your server was definitely not configured as an MX when I checked it. – BillThor Dec 25 '17 at 4:04
0

I managed to fix this by just chainging connection security from SSL/TLS to STARTTLS on dynu. Everything is working perfectly now!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.