Email Service Authentication Problem

Help
Mike
2012-12-01
2013-06-12
  • Mike
    Mike
    2012-12-01

    I'm having a problem sending emails via the email service because authentication fails.

    Per the documentation, I used telnet as a sanity check, and I can authenticate, and send emails via telnet. What I had to do in order to accomplish this was to first convert my user name and password to base64 encoding using a free utility. Does the email service do the base64 conversion?

    Thanks,
    Mike

     
  • Mike
    Mike
    2012-12-04

    Here's some follow up infoprmation that will hopefully enable someone to help me debug:

    Version information:

    STAF - 3.4.11
    Email Service - 3.3.6

    Email service configuration string in my config file:

    SERVICE email LIBRARY JSTAF EXECUTE c:/staf/ext_services/email/STAFEmail.jar  \
                  PARMS "MAILSERVER mailserver.company.com PORT 587"

    Here's an example email service command string that I think should work, but doesn't:

    STAF local EMAIL SEND TO personal_user@personal_email.com FROM work_user@company.com MESSAGE "FYI" SUBJECT "Test" AUTHUSER work_user AUTHPASSWORD work_pwd

    Here's the details of the successful telnet session:

    telnet mailserver.company.com 587
    220 mailserver.company.com Microsoft ESMTP MAIL Service ready at Mon, 3 Dec 2012 16:53:48 -0800
    EHLO
    250-mailserver.company.com Hello
    250-SIZE 20971520
    250-PIPELINING
    250-DSN
    250-ENHANCEDSTATUSCODES
    250-STARTTLS
    250-X-ANONYMOUSTLS
    250-AUTH NTLM LOGIN
    250-X-EXPS GSSAPI NTLM
    250-8BITMIME
    250-BINARYMIME
    250-CHUNKING
    250-XEXCH50
    250 XRDST
    auth login
    334 VXNlcm5hbWU6
    ****************
    334 UGFzc3dvcmQ6
    ************
    235 2.7.0 Authentication successful
    mail from: work_user@company.com
    250 2.1.0 Sender OK
    rcpt to: personal_user@personal_email.com
    250 2.1.5 Recipient OK
    data
    354 Start mail input; end with <CRLF>.<CRLF>
    to: personal_user@personal_email.com
    from: work_user@company.com
    subject: test

    blah blah blah…

    .
    250 2.6.0 <1c8293c4-ae41-4c51-9c5f-969d1657b3da@oczmail.ocz.ocztechnology.com> Queued mail for delivery

    I'm working on a Windows 7 machine, and don't have any details about the mail server other than the ip address and port number.

    Any help would be appreciated.

    Thanks,
    Mike

     
  • Sharon Lucas
    Sharon Lucas
    2012-12-05

    The current version of the Email service does do base64 encoding encoding.  You can see the cvs diff of the code added to support the AUTHUSER option in Feature #3032716 "Email service: smtp-auth option required" at Email service: smtp-auth option required.  However, there is also a note in this feature that says:  "Note that since the mail servers we use
    do not allow authentication, we have not tested this feature."  So, it's possible more tweaking needs to be done.  Feel free to look at the Email service source code and make changes and submit a patch.

     
  • Sharon Lucas
    Sharon Lucas
    2012-12-05

    Had a typo in the first sentence of my previous comment.  I meant to say the Email service does do base64 encoding of the user name and password.