I am trying to migrate from a Windows Server running MDaemon to Ubuntu 22.04 + MailCow. It’s actually the same physical box, just replaced the HDD+OS. Same IP, same Domain. So all DNS/MX records are setup correct and have been working for years. The caveat is that my ISP is Comcast so I’ve had to resort to work arounds to get mail in and out. I use Dynu.com for Dynamic DNS and Mail Storage/Forwarding. So incoming SMTP mail goes there first and is then sent to me. For outgoing SMTP, I use sendgrid.net. Again this has all been working with MDaemon for years.
Outgoing issue:
I setup [smtp.sendgrid.net]:587 as the relay. When I click test it works perfectly:
Connection: opening to smtp.sendgrid.net:587, timeout=15, options=array (
↪ ‘ssl’ =>
↪ array (
↪ ‘verify_peer’ => false,
↪ ‘verify_peer_name’ => false,
↪ ‘allow_self_signed’ => true,
↪ ),
)
Connection: opened
SERVER -> CLIENT: 220 SG ESMTP service ready at geopod-ismtpd-1-1
CLIENT -> SERVER: EHLO server.mydomain.com
SERVER -> CLIENT: 250-smtp.sendgrid.net
↪ 250-8BITMIME
↪ 250-PIPELINING
↪ 250-SIZE 31457280
↪ 250-STARTTLS
↪ 250-AUTH PLAIN LOGIN
↪ 250 AUTH=PLAIN LOGIN
CLIENT -> SERVER: STARTTLS
SERVER -> CLIENT: 220 Begin TLS negotiation now
CLIENT -> SERVER: EHLO server.mydomain.com
SERVER -> CLIENT: 250-smtp.sendgrid.net
↪ 250-8BITMIME
↪ 250-PIPELINING
↪ 250-SIZE 31457280
↪ 250-STARTTLS
↪ 250-AUTH PLAIN LOGIN
↪ 250 AUTH=PLAIN LOGIN
CLIENT -> SERVER: AUTH LOGIN
SERVER -> CLIENT: 334 VXNlcm5hbWU6
CLIENT -> SERVER: [credentials hidden]
SERVER -> CLIENT: 334 UGFzc3dvcmQ6
CLIENT -> SERVER: [credentials hidden]
SERVER -> CLIENT: 235 Authentication successful
CLIENT -> SERVER: MAIL FROM:myuser@mydomain.com
SERVER -> CLIENT: 250 Sender address accepted
CLIENT -> SERVER: RCPT TO:null@hosted.mailcow.de
SERVER -> CLIENT: 250 Recipient address accepted
CLIENT -> SERVER: DATA
SERVER -> CLIENT: 354 Continue
CLIENT -> SERVER: Date: Sat, 27 Aug 2022 22:21:53 -0500
CLIENT -> SERVER: To: Joe Null null@hosted.mailcow.de
CLIENT -> SERVER: From: Mailer myuser@mydomain.com
CLIENT -> SERVER: Subject: A subject for a SMTP test
CLIENT -> SERVER: Message-ID: WiodC5e4397hDyRoDnA3nx2c158ObgIuVqZgPQg@ids2.mydomain.com
CLIENT -> SERVER: X-Mailer: PHPMailer 6.6.0 (https://github.com/PHPMailer/PHPMailer)
CLIENT -> SERVER: MIME-Version: 1.0
CLIENT -> SERVER: Content-Type: text/plain; charset=iso-8859-1
CLIENT -> SERVER:
CLIENT -> SERVER: This is our test body
CLIENT -> SERVER:
CLIENT -> SERVER: .
SERVER -> CLIENT: 250 Ok: queued as SjqBHUf9QTuzo2Z8W5iOjQ
CLIENT -> SERVER: QUIT
SERVER -> CLIENT: 221 See you later
Connection: closed
However, when I try to send an actual email, it tries to send directly to the target domain. For some reason I didn’t capture it, but there is a line that says “relay=none” in the log:
** connect to mx1c1.comcast.net[2001:558:fd00:4f::4]:25: Network is unreachable
** connect to mx1h1.comcast.net[96.102.157.178]:25: Connection timed out
** disconnect from mailcowdockerized-sogo-mailcow-1.mailcowdockerized_mailcow-network[172.22.1.248] ehlo=1 auth=1 mail=1 rcpt=1 data=1 quit=1 commands=6
** 8AA0C17015CD: from=<myuser@mydomain.com>, size=1048, nrcpt=1 (queue active)
** 8AA0C17015CD: message-id=<5b-630ae000-7-173e6a40@211655112>
** 8AA0C17015CD: replace: header Received: from 1dc3ac21b10e (mailcowdockerized-sogo-mailcow-1.mailcowdockerized_mailcow-network [172.22.1.248])??(Authenticated sender: myuser@mydomain.com)??by ids2.mydomain.com (P from mailcowdockerized-sogo-mailcow-1.mailcowdockerized_mailcow-network[172.22.1.248]; from=<myuser@mydomain.com> to=<otheruser@comcast.net> proto=ESMTP helo=<1dc3ac21b10e>: Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPA id 8AA0C17015CD??for <spadgett_houston1@comcast.net>; Sat, 27 Aug 2022 22:24:37 -0500 (CDT)
** 8AA0C17015CD: client=mailcowdockerized-sogo-mailcow-1.mailcowdockerized_mailcow-network[172.22.1.248], sasl_method=PLAIN, sasl_username=myuser@mydomain.com
For incoming I see dynu hitting the server, but being disconnected for no listed reason.
** lost connection after CONNECT from www.dynu.com[162.216.242.29]
** connect from www.dynu.com[162.216.242.29]
** disconnect from www.dynu.com[162.216.242.29] commands=0/0
** lost connection after CONNECT from www.dynu.com[162.216.242.29]
** disconnect from www.dynu.com[162.216.242.29] commands=0/0
** lost connection after CONNECT from www.dynu.com[162.216.242.29]
** connect from www.dynu.com[162.216.242.29]
** connect from www.dynu.com[162.216.242.29]
** statistics: max cache size 1 at Aug 27 22:27:28
** statistics: max connection count 1 for (submission:43.157.18.137) at Aug 27 22:27:28
** statistics: max connection rate 1/60s for (submission:43.157.18.137) at Aug 27 22:27:28
** disconnect from mx1.wiredblade.com[162.216.242.35] helo=1 mail=0/1 quit=1 commands=2/3
** connect from mx1.wiredblade.com[162.216.242.35]
I am completely new to this, so if you need details from a specific log file, please include the default location, not just the name.