POP3 RETR Command Missing +OK Response - email

I've been searching and testing for days now without any rational explanation for the following to happen:
I have a mail server which serves all our users and everyone is happily running on IMAP/POP3 access. I need to develop a utility to check POP3 e-mail and started getting errors retrieving mail. I set up the same pop account on my outlook and windows live mail and they couldn't download the e-mails either. I tried another PC and it downloaded just fine. After much debugging and searching, I found out that after sending the RETR command, there wasn't an "+OK" response on my pc but there was on the other pc. So I went down to telnet and sure as day my PC wasn't getting the +OK response on RETR, just the actual mail but I was getting it from every other pc I tried. I even booted up my win XP virtual pc and it has the same result as my pc. Here is an excerpt of the logs from mine and my test pc:
RETR with +OK:
+OK Welcome to MailEnable POP3 Server
USER devtest#x.com
+OK
PASS <Removed>
+OK
LIST
+OK 3 26743
1 2118
2 23949
3 676
.
UIDL
+OK
1 BE1F75CAE417453581CF11F16CF09989
2 846882DB63B54C9E91C4643AA5CCA1F5
3 A7BAFC28B04A493689A150F6D4CD7FD0
.
RETR 1
+OK 2118 octets
Received: from x ([x.x.60.10]) by x.net with MailEnab
le ESMTP; Sun, 28 Dec 2014 11:30:16 +0200
RETR with +OK missing:
+OK Welcome to MailEnable POP3 Server
USER devtest#x.com
+OK
PASS <Removed>
+OK
LIST
+OK 3 26743
1 2118
2 23949
3 676
.
UIDL
+OK
1 BE1F75CAE417453581CF11F16CF09989
2 846882DB63B54C9E91C4643AA5CCA1F5
3 A7BAFC28B04A493689A150F6D4CD7FD0
.
RETR 1
Received: from x ([x.x.60.10]) by x.net with MailEnab
le ESMTP; Sun, 28 Dec 2014 11:32:53 +0200
I'm now going to place another hard drive in my pc and install windows and telnet client and see what it does but I was hoping someone might have had some experience with this. It's only that one time that the +OK is missing, every other command has it showing as well as it being there on every other PC I try it on so it's only on my pc that it's missing.
Appreciate any thoughts or assistance!

Well loading a new hard drive worked perfectly as expected which led me to the fact that it must be something installed on my pc itself. Disabled the usual suspects (firewall and AV) and when that didn't work, I proceeded to close down every app running on my pc which possibly works with Ports and eventually narrowed the culprit down to the Fortinet VPN Client running on my PC. I don't have it's AV component enabled so I'm rather at a loss as to how it could be the reason for a single line on port 110 to go missing but if it's running then the +OK line is missing and if it's shut down then it appears.
I'm going to leave this question here in case it can help someone else and will also try post something to Fortinet as well.

Related

Error when trying to send mail over smtp with Office 365 account

An application, which obviously uses Chilkat plugin, does not correctly send E-mails anymore using an Office 365 account. After a migration from on-premise exchange to Microsoft 365, the account and server settings were changed at end of March this year. Furthermore, client authentication needed to be disabled for the mailbox. After that, sending E-mails from the application had worked. Now, it again doesn't. Yesterday, one E-mail could successfully be sent after a computer restart - the next ones failed again.
I'm stuck to find the cause of the error and also I don't know, what data exactly is sent from the application during the connection, which makes the analysis more difficult.
I found this post mentioning that entries for TLS 1.0 need to be in the registry. Those were missing, but there were entries for TLS 1.2, so I didn't assume this is an issue, espccially because the entries concerning cryptography (also mentioned in the post) did already exist. In the meantime, I have added them nonetheless.
Below is the Chilkat Log, showing that - after the server is ready - the clientHandshake2 fails with error code 0x2746.
The support person of the application he couldn't find any problem and asked concerning that error code - what i assumed he should be able to examine. When I talked to him on the phone, I found out that he doesn't know more about Chilkat than I do. He mentioned an interesting point, which need to be double checked: As far as he was informed from the user directly - or how he had understood it - the error doesn't show up, if the user chooses another "Mandant" (client) in the application and sends E-mails from there.
Can someone help identify the cause of the error?
SendEmail:
DllDate: May 25 2017
ChilkatVersion: 9.5.0.68
UnlockPrefix: WERNERMAILQ
Architecture: Little Endian; 32-bit
Language: Visual C++ 2017 (32-bit)
VerboseLogging: 0
sendEmailInner:
renderToMime:
createEmailForSending:
Auto-generating Message-ID
--createEmailForSending
renderToMime: Elapsed time: 0 millisec
--renderToMime
sendMimeInner:
ensureSmtpSession:
ensureSmtpConnection:
SmtpHost: smtp.office365.com
SmtpPort: 587
SmtpUsername: edith.beer#halten.ch
SmtpSsl: 0
StartTLS: 1
smtpConnect:
smtpHostname: smtp.office365.com
smtpPort: 587
connectionIsReady:
Need new SMTP connection
--connectionIsReady
smtpSocketConnect:
socketOptions:
SO_SNDBUF: 262144
SO_RCVBUF: 4194304
TCP_NODELAY: 1
SO_KEEPALIVE: 1
--socketOptions
--smtpSocketConnect
smtpGreeting:
readSmtpResponse:
SmtpCmdResp: 220 AM0PR02CA0163.outlook.office365.com Microsoft ESMTP MAIL Service ready at Mon, 23 Aug 2021 11:51:12 +0000
--readSmtpResponse
--smtpGreeting
startTLS:
sendCmdToSmtp:
SmtpCmdSent: EHLO EWGH-N-FV<CRLF>
--sendCmdToSmtp
readSmtpResponse:
SmtpCmdResp: 250-AM0PR02CA0163.outlook.office365.com Hello [213.221.219.37]
SmtpCmdResp: 250-SIZE 157286400
SmtpCmdResp: 250-PIPELINING
SmtpCmdResp: 250-DSN
SmtpCmdResp: 250-ENHANCEDSTATUSCODES
SmtpCmdResp: 250-STARTTLS
SmtpCmdResp: 250-8BITMIME
SmtpCmdResp: 250-BINARYMIME
SmtpCmdResp: 250-CHUNKING
SmtpCmdResp: 250 SMTPUTF8
--readSmtpResponse
sendCmdToSmtp:
SmtpCmdSent: STARTTLS<CRLF>
--sendCmdToSmtp
readSmtpResponse:
SmtpCmdResp: 220 2.0.0 SMTP server ready
--readSmtpResponse
clientHandshake:
clientHandshake2:
readHandshakeMessages:
WindowsError: Eine vorhandene Verbindung wurde vom Remotehost geschlossen.
WindowsErrorCode: 0x2746
maxToReceive: 5
Failed to receive data on the TCP socket
Failed to read beginning of SSL/TLS record.
b: 0
dbSize: 0
nReadNBytes: 0
idleTimeoutMs: 30000
--readHandshakeMessages
--clientHandshake2
--clientHandshake
Client handshake failed. (1)
connectionClosed: 0
Failed to establish TLS connection.
--startTLS
--smtpConnect
--ensureSmtpConnection
--ensureSmtpSession
--sendMimeInner
--sendEmailInner
Failed.
--SendEmail
--ChilkatLog
23.08.2021 13:48:27 -F- Beim Versand der Lohnabrechnung per Email an Mitarbeiter(in) Nadine Aeschlimann ist ein Fehler aufgetreten!
You are using an old version of Chilkat. Try testing with the latest version.
In the meantime we could solve it.
The reason was that the outgoing requests were blocked by the firewall. Strangely, a few of them went through, but not all. This is the reason why a network issue was initially not in the focus of our investigation.

exim Timing Out to Gmail

I have a Centos server with exim installed. I am trying to send en email from the command line like this:
exim -v account#gmail.com
From: email#mydomain.com
To: account#gmail.com
Subject: test email
this is a test
^D
I have also tried:
echo 'test message' | mail -s Test1 account#gmail.com
as well as sending from a PHP script.
The result is the email times out. The logs indicate exim is timing out:
H=alt2.gmail-smtp-in.l.google.com [173.194.219.26] Connection timed out
I believe iptables are correct. I have scanned the server from an external IP and ports 25, 265 and 587 are open. (Not sure 587 needs to be since this will be a send-only situation most likely.)
I have also telnet'd to port 25 successfully. (Most of the successful resolutions I have found involved port 25 being blocked. I don't think that is the case here. I have also called my provider and checked. They claim port 25 connections are not blocked.)
I would appreciate some ideas.
Thank you.

LDAP cannot authenticate

I was following this guide to setup an LDAP server on CentOS 6.6: http://www.learnitguide.net/2016/01/configure-openldap-server-on-rhel7.html. I know the guide is for RHEL, but I think the vast majority of steps should be the same. I went through the tutorial and everything seems to work right except for sshing into the server as an LDAP user. As root I am able to su to any LDAP user. getent passwd username returns appropriate results. But every time I try to ssh in as a user I get permission denied and these messages show up in /var/log/secure:
Aug 8 22:13:14 servername sshd[5900]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=rhostname user=username
Aug 8 22:13:14 servername sshd[5900]: pam_sss(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=rhostname user=username
Aug 8 22:13:14 servername sshd[5900]: pam_sss(sshd:auth): received for user username: 6 (Permission denied)
Aug 8 22:13:17 servername sshd[5900]: Failed password for username from rhostIPaddress port 34758 ssh2
I was hoping maybe someone may know of a step that guide left out that would cause this behavior. Thanks.
Turns out the self signed certificate I was using needed to have the IP address as the common name as opposed to the FQDN, not sure why that is but it's working now.
Information that can help others.
In my case this message was a time difference problem between the FreeIPA server and the clients. The command systemctl status sssd -l presented the message (skew clock too great).
This message from the Kerberos authentication server appears if the difference hour in servers is too large (more than three or four minutes).
OS: Ubuntu Server

Mercury: sending email from localhost

I configured my Mercury (on local PC with Windows 7 professional) step-by-step following http://www.open-emr.org/wiki/index.php/Mercury_Mail_Configuration_in_Windows, using smtp.gmail.com as external server. I then sent a test email to my gmail from Mercury, and the Mercury core process window showed "Mon 01, 10:50:08: Job MG000001: from postmaster#localhost (local) .... to xxxx#gmail.com (non-local)-OK". But the Mercury SMTP client (relay version) window showed "Faild. Error FF servicing queue job." I saw this error message being repeated (Mercury tried to re-send the email).
I tried to gether more error information but the Mercury logs (XAMPP Control penal) was empty.
Can someone please help? Thanks.
I had the same problem as yours and I came out with this solution.
Follow the answer in this link:
No mail received in inbox with XAMPP 1.8.0, MercuryMail and mail()
And then go to
Mercury under MercuryS -> Connection Control -> Uncheck "Do not Permit SMTP relaying to non-local mail"
Hope it helps :)

Sendmail in GAE dev sever doesn't show the email body

While working locally on the dev server, GAE doesn't send any emails out. Unless running it with the following command:
dev_appserver.py --enable_sendmail myapp
This would rely on a local sendmail to be setup.
I am using Ubuntu now for some time and I never came across something so difficult to setup.
I came across this solution and 5 other tutorials. The mail.log shows that the email was accepted and sent out, but google times out.
Jun 28 12:13:38 tp sm-mta[15964]: r5SAnXFV014925: to=<kave#gmail.com>, ctladdr=<kave#localhost.localdomain> (1000/1000), delay=00:24:05, xdelay=00:00:00, mailer=esmtp, pri=210342, relay=alt4.gmail-smtp-in.l.google.com., dsn=4.0.0, stat=Deferred: Connection timed out with alt4.gmail-smtp-in.l.google.com
I would be happy to give up and rely on the log files. But the command line ouput doesn't show the email body:
INFO 2013-06-28 11:17:40,146 mail_stub.py:140] MailService.Send
From: admin#mydomain.com
To: kave#gmail.com
Subject: Invitation to join xxx
Body:
Content-type: text/plain
Data length: 347
It is so frustrating. Any ideas please?
Update:
I have tried to run it with the VM arguments:
But I get this error message:
I ran into this same issue a couple weeks ago. I ended up adding the following VM arguments to eclipse when running the DevAppServer:
-Dmail.log_mail_level=WARNING -Dmail.log_mail_body=true