The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

SOLVED Weird SMTP AUTH issue

Discussion in 'E-mail Discussions' started by zubuz, Aug 4, 2017.

  1. zubuz

    zubuz Member

    Joined:
    Apr 29, 2003
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    151
    I have a new client who is running some sort of ancient software that sends email through SMTP via Telnet on port 25. Apparently his former provider allowed an open relay (!). I have helped him configure the batch file to use SMTP AUTH. I've verified that the email account and password have been properly base64-encoded, and when I manually key in the lines in the batch file in a Telnet session, it works perfectly. However, when the batch file is run, for some reason, the ID is not being set properly.

    The sequence is as follows, with C being the client lines and S being the server lines:

    C: EHLO hisdomain.com
    S:
    250-[server] Hello [his IP]
    250-SIZE 52428800
    250-8BITMIME
    250-PIPELINING
    250-AUTH PLAIN LOGIN
    250-STARTTLS
    250 HELP
    C: AUTH LOGIN
    S: 334 VXNlcm5hbWU6
    C: [base64-encoded userid]
    S: 535 Incorrect authentication data

    I have checked exim_rejectlog, and this is the line:

    2017-08-04 09:01:52 dovecot_login authenticator failed for (hisdomain.com) [his IP]:12657: 535 Incorrect authentication data (set_id=E!\023)

    Ordinarily I would expect to see set_id=[his email], but instead it produces E!\023. I have no idea what that means, although obviously that's not a valid id on the system and is therefore the problem. Any thoughts on what might be happening here?
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,037
    Likes Received:
    1,281
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    It's possible the issue is with the batch file itself, as opposed to any server configuration values, since it's working well when you test manually. How is the batch file configured?

    Thank you.
     
  3. zubuz

    zubuz Member

    Joined:
    Apr 29, 2003
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    151
    It's a simple text file that is read by the software that initiates the Telnet connection, then fed line by line into Telnet.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,037
    Likes Received:
    1,281
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Does it make a difference if the SMTP connection occurs over port 465 instead of port 25?

    Thank you.
     
  5. zubuz

    zubuz Member

    Joined:
    Apr 29, 2003
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    151
    We require SSL if connecting via 465, and SSL is beyond the capabilities of the software he is using, so yes, it makes a difference, but not a useful one. ;)

    It turns out that closer analysis of the software revealed that it was hard-coded for non-AUTH transmission. The software was not expecting a 334 return code and therefore aborted when it didn't receive 250. We were able to add additional subroutines to the software to handle the return codes associated with AUTH (334 to prompt for username and password, and 235 to denote successful authentication). The user is testing now, but I am confident that it will work correctly. Thanks for your assistance.
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,037
    Likes Received:
    1,281
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    I'm glad to see you were able to determine the cause of the issue. Thank you for updating us with the outcome.
     
Loading...

Share This Page