SMTP and NTLM

Hi,

I have a HP Unix from which I'm trying to connect to an email server through telnet and test sending emails using commands. Why am I doing that is not important.
The email server is an Exchange server and it looks like that the only Authentication method it supports is NTLM.
The host name is "svrdb01".
Here is what I do:

telnet 172.19.120.36
ehlo 172.19.120.36
AUTH NTLM 4e544c4d535350000100000007220000060006002000000073767264623031

The hex number is made based on the following information:

  • NTLMSSP Signature and Type 1 Indicator: (0x4e544c4d53535000 and 0x01000000)
  • Flags: (0x07220000)
    Negotiate Unicode (0x00000001)
    Negotiate OEM (0x00000002)
    Request Target (0x00000004)
    Negotiate NTLM (0x00000200)
    Negotiate Workstation Supplied (0x00002000)
  • Supplied Domain Security Buffer (0x0600060020000000)
    Length: 7 bytes (0x0700)
    Allocated Space: 7 bytes (0x0700)
    Offset: 32 bytes (0x20000000)
  • Data section (workstation name "svrdb01"): 73767264623031

But in return I get the "Authentication unsuccessful" error. Am I doing something wrong? How can I make sure those flags I've set are actually correct? For example how do I know my OS actually supports NTLM?