Postfix/Dovecot ++ mail server. Can send mail but not receive mail

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 применяется к mail.rajohan.no, а не rajohan.no)
  5. DKIM применяется к mail._domainkey.relay.rajohan.no
  6. SPF применяется к rajohan.no

И еще вопрос, когда я устанавливаю имя хоста в терминал в rajohan, что бы перезаписать localhost? Или это две разные вещи?

0
задан 23 December 2017 в 04:43
2 ответа

Мне удалось это исправить, просто переключив безопасность соединения с SSL / TLS на STARTTLS на dynu. Теперь все работает отлично!

0
ответ дан 4 December 2019 в 16:03

Ваш почтовый сервер не настроен для разрешения неаутентифицированных отправителей. Это нормально для порта 587 (отправка), но неверно для MX, который должен разрешать неаутентифицированному пользователю отправлять почту (но не ретранслировать в другие домены).

$: 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
1
ответ дан 4 December 2019 в 16:03

Теги

Похожие вопросы