A
andrudzan

  • 5 days ago
  • Joined 6 days ago
  • 1 discussion
  • 1 post
  • 0 best answers
  • Post posted... wait what?
  • Hi! i have dicovered that some emails sent to root@mail.x.x. are deferred.
    mail.x.x is my mailserver hostname.

    Postfix log.

    postfix-mailcow-1 | Apr 13 11:46:57 9c7051be5cd1 postfix/smtp[442]: connect to mail.x.x[x.x.x.242]:255: Connection timed out
    postfix-mailcow-1 | Apr 13 11:46:57 9c7051be5cd1 postfix/smtp[442]: 31071925445: to=root@mail.x.x, relay=none, delay=3278, delays=3247/0.19/30/0, dsn=4.4.1, status=deferred (connect to mail.x.x[x.x.x.242]:25: Connection timed out)

    My setup :
    Mailserver stands behind a router. Router has public IP x.x.x.242. All needed ports are NATed to local IP(192.168.1.2).

    So fore some reason, when mailcow tries to send some internal mails, it tries to send it to my external IP configured on router but not to his private ip or localhost.

    What i have tried so far.
    I have tried to use transport map mail.x.x to [192.168.1.2]:25. Then server just loops it and bounces.
    Then i have also tried to configure custom dns that points to may router DNS in unbound.conf. Because if i ask my router DNS to resolve mail.x.x it will return local IP 192.168.1.2.
    Used this article docs.mailcow.email Icon Using an external DNS service - mailcow: dockerized documentation


    DNS should understand DNSSEC according to mailcow documentation . But my mikrotik router does not.
    So, this trick also not help.

    How to solve this issue?
    I am sure that i am not the only one who has mailcow behind a router/firewall.
    So i assume i am missing some simple config…