Search The ForumSearch   RegisterRegister  LoginLogin

MailBee.NET Objects

 AfterLogic Forum : MailBee.NET Objects
Subject Topic: Syntactically invalid HELO / EHLO Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
that0th3rGuy
Newbie
Newbie
Avatar

Joined: 04 July 2012
Location: South Africa
Online Status: Offline
Posts: 1
Posted: 04 July 2012 at 5:17am | IP Logged Quote that0th3rGuy


Good day,

I have a service, developed under VS 2010, that reads a SQL database and sends out pending emails, often in HTML format, generated by another service.

After instantiating a new Smtp object I call Smtp.Connect() and, if successful, Smtp.Hello(). The problem is that Smtp.Hello() generates an error:
      [11:04:06.51] [INFO] Assembly version: 6.0.2.220.
      [11:04:06.51] [INFO] Will resolve host "smtp.foo.net".
      [11:04:06.51] [INFO] Host "smtp.foo.net" resolved to IP address(es) xxx.xxx.xxx.xxx.
      [11:04:06.51] [INFO] Will connect to host "smtp.foo.net" on port 25.
      [11:04:06.52] [INFO] Socket connected to IP address xxx.xxx.xxx.xxx on port 25.
      [11:04:06.55] [RECV] 220 smtp01.foo.net ESMTP Exim 4.77 Wed, 04 Jul 2012 11:04:06 +0200\r\n
      [11:04:06.57] [INFO] Connected to mail service at host "smtp.foo.net" on port 25 and ready.
      [11:04:06.57] [INFO] Will send Hello command (HELO or EHLO).
      [11:04:06.57] [SEND] EHLO Foo_Corp_EMS\r\n
      [11:04:06.58] [RECV] 501 Syntactically invalid EHLO argument(s)\r\n
      [11:04:06.62] [INFO] Warning: EHLO command is not supported by the server. The server responded: 501 Syntactically invalid EHLO argument(s).
      [11:04:06.62] [SEND] HELO Foo_Corp_EMS\r\n
      [11:04:06.62] [RECV] 501 Syntactically invalid HELO argument(s)\r\n
      [11:04:06.66] [INFO] Error: The server has responded with negative reply. The server responded: 501 Syntactically invalid HELO argument(s).
      [11:04:06.66] [SEND] QUIT\r\n
      [11:04:06.68] [RECV] 221 smtp01.foo.net closing connection\r\n

So "EHLO" is not supported. "HELO" is supported but returns a negative response. I did some research on the SMTP protocol and the HELO/EHLO commands and found something that might explain my problem in RCF 2821. At the end of section 4.1.2 Command Argument Syntax the author mentions that, according to convention, certain characters should be avoided, specifically underscores, and mail servers "MUST reject that command with a 501 response," the response that I'm getting. After that the connection is closed and my emails are never sent.

Now, the client's machine, where this service is deployed, has underscores in it's name - "Foo_Corp_EMS." This name can, unfortunately, not be changed due to other software, dependent on that name, installed on the machine.

However! Using TELNET to connect to the mail server from that machine was successful.
      TELNET FooSMTP 25
      EHLO Foo_Corp_EMS

Am I missing something? Could the underscores be the cause of the problem? What else can I investigate in an attempt to resolve this?

Thanks in advance for any and all interest, comments and suggestions.

Kind regards,
me
      
Back to Top View that0th3rGuy's Profile Search for other posts by that0th3rGuy
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide