Skip AUTH when not Required

Use this forum if you have installed hMailServer and want to ask a question related to a production release of hMailServer. Before posting, please read the troubleshooting guide. A large part of all reported issues are already described in detail here.
Post Reply
eneerge
New user
New user
Posts: 3
Joined: 2019-06-12 21:36

Skip AUTH when not Required

Post by eneerge » 2019-06-12 21:45

I have an application that has authentication hard coded into it. I've removed the SMTP authentication on the server, but that old application is still sending an AUTH LOGIN and then the server is responding saying authentication failed. Is there anyway to make the server just ignore the authentication request if authentication isn't required?

"SMTPD" 5676 11 "2019-06-12 14:09:58.269" "x.x.x.110" "SENT: 220 server.com ESMTP"
"SMTPD" 5676 11 "2019-06-12 14:09:58.285" "x.x.x.110" "RECEIVED: EHLO computername"
"SMTPD" 5676 11 "2019-06-12 14:09:58.285" "x.x.x.110" "SENT: 250-server.com[nl]250-SIZE 20480000[nl]250-AUTH LOGIN[nl]250 HELP"
"SMTPD" 5676 11 "2019-06-12 14:09:58.285" "x.x.x.110" "RECEIVED: AUTH LOGIN amJhdW1iYXVnaV=="
"SMTPD" 5676 11 "2019-06-12 14:09:58.285" "x.x.x.110" "SENT: 334 UGFzc3dvcmQ6"
"SMTPD" 7164 11 "2019-06-12 14:09:58.285" "x.x.x.110" "RECEIVED: ***"
"SMTPD" 7164 11 "2019-06-12 14:09:58.285" "x.x.x.110" "SENT: 535 Authentication failed. Restarting authentication process." <---- why can't it just ignore the authentication process altogether?


Here is a very similar question to mine, but they ended up modifying their application to use a different AUTH login. This isn't an easy change for me since it's hard coded into the app. https://www.hmailserver.com/forum/viewtopic.php?t=28622

User avatar
jimimaseye
Moderator
Moderator
Posts: 8172
Joined: 2011-09-08 17:48

Re: Skip AUTH when not Required

Post by jimimaseye » 2019-06-12 22:23

Set an individual ip range for that device stating no authentication required.
HMS 5.6.6 B2383 on Win Server 2008 R2 Foundation, + 5.6.7-B2415 on test.
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829

eneerge
New user
New user
Posts: 3
Joined: 2019-06-12 21:36

Re: Skip AUTH when not Required

Post by eneerge » 2019-06-12 22:32

I have an IP range of the device with all "Require SMTP authentication" box unchecked, but still get the same problem.

User avatar
mattg
Moderator
Moderator
Posts: 20293
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: Skip AUTH when not Required

Post by mattg » 2019-06-13 01:22

You probably need the other way around
You need to force AUTH for that single IP (or change your application)
eneerge wrote:
2019-06-12 21:45
I've removed the SMTP authentication on the server,
How did you do this?
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

eneerge
New user
New user
Posts: 3
Joined: 2019-06-12 21:36

Re: Skip AUTH when not Required

Post by eneerge » 2019-06-13 06:45

So after recommending someone to disable their authentication in their app, they mentioned that it was not enabled, but it obviously was based on the log I looked at. They were able to reach out to a vendor and have them remove the SMTP authentication request and now the emails are going through once again.

Prior to switching to hmail, we were using the Microsoft SMTP Service. Apparently either:
1. That server ignored the authentication and continued without resetting the connection
2. Authentication was using Windows Auth and was using a domain user/pass

At this point I have not verified which of the above applies. I suspected #2, but the user/pass combination appeared to be encoded or encrypted when I looked at the Wireshark capture so I couldn't actually figure out if it was trying to do Windows Auth or not. While I was investigating, the vendor disabled the authentication altogether and it started working again. I don't have another Microsoft SMTP server to test with right now to verify the actual issue, but I'm back up now at least.

The "Require SMTP Authentication" Image
https://imgur.com/UZL4lOm

User avatar
mattg
Moderator
Moderator
Posts: 20293
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: Skip AUTH when not Required

Post by mattg » 2019-06-13 10:21

Yes hmailserver will NOT ignore credentials if offered, unless you disable AUTH on a port via ini settings

So you are all good?
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

Post Reply