Menu

#57 blat with port 587 STARTTLS

v1.0 (example)
open
nobody
None
7
2022-11-17
2019-09-06
EdG
No

I do not succed to use blat with port 587 STARTTLS (blat version 3222)
Blat.exe -Install -Server mysmtp.mydomain.com -Port 587 -f sender@mydomain.com -u mfp -Pw mypasswd
Blat.exe -from sender@mydomain.com -To recipient@mydomain.com -Subject "TEST" -Attachi "message.txt" -Body "test"
<<<getline<<< 220 mysmtp.mydomain.com ESMTP

putline>>> EHLO myhost.mydomain.com
<<<getline<<< 250-etrn="" text="" is="" message.txt="" 60480000="" 250="" 250-starttls="" 250-mysmtp.mydomain.com="" stdin.txt="" 250-8bitmime="" dsn="" to="" <<<getline<<<="" recipient@mydomain.com="" file:="" test="" 250-pipelining="" sending="" sender@mydomain.com="" subject:="" 250-size="" name="" attached="" login="" 250-enhancedstatuscodes="" putline="">>> AUTH LOGIN
<<<getline<<< starttls="" smtp="" warning="" login.="" are="" does="" you="" supports="" sure="" auth="" ***="" not="" must="" a="" auth?="" issue="" require="" server="" 5.7.0="" command="" 530="" the="" putline="" first="">>> MAIL FROM:sender@mydomain.com
<<<getline<<< set="" starttls="" smtp="" have="" your="" correctly?="" does="" mail="" you="" must="" issue="" name.="" 530="" ***="" address="" not="" like="" a="" sender="" server="" 5.7.0="" command="" error="" the="" putline="" first="">>> QUIT
<<<getline<<< 221 2.0.0 Bye</getline<<<></getline<<<></getline<<<>

With other system like ssmtp on linux (same 587 STARTTLS), it works like a charm.
What did I wrong with blat ?

Discussion

  • EdG

    EdG - 2019-09-06

    Blat.exe -Install -Server mysmtp.mydomain.com -Port 587 -f sender@mydomain.com -u mfp -Pw mypasswd
    Blat.exe -from sender@mydomain.com -To recipient@mydomain.com -Subject "TEST" -Attachi "message.txt" -Body "test"
    220 mysmtp.mydomain.com ESMTP
    EHLO myhost.mydomain.com
    250-mysmtp.mydomain.com
    250-PIPELINING
    250-SIZE 60480000
    250-ETRN
    250-STARTTLS
    250-ENHANCEDSTATUSCODES
    250 DSN
    Sending stdin.txt to recipient@mydomain.com
    Subject: TEST
    Login name is sender@mydomain.com
    Attached text file: message.txt
    AUTH LOGIN
    530 5.7.0 Must issue a STARTTLS command first
    Warning The SMTP server does not require AUTH LOGIN.
    Warning Are you sure server supports AUTH?
    MAIL FROM:sender@mydomain.com
    530 5.7.0 Must issue a STARTTLS command first
    Error The SMTP server does not like the sender name.
    Error Have you set your mail address correctly?
    QUIT
    221 2.0.0 Bye

     
  • Chip

    Chip - 2019-09-08

    Blat does not have SSL/TLS support built into the program. What I do is to use stunnel from stunnel.org. This stunnel program provides the encryption layer needed for STARTTLS. If you search the Blat forums on Yahoo, there are many examples of using stunnel and its configuration file to support TLS. Since there have been issues with SSL and TLS, I have chosen to continue using stunnel instead of trying to incorporate openssl.dll into Blat.

    There are two ways for me to add this support. One would be to compile the openssl library and link it directly into the Blat executable. The other is to look for look for openssl.dll at runtime, and use it if it exists; without the openssl.dll, SSL and TLS support would necessarily be disabled.

    If I compile the openssl libary and link it directly into Blat, this could present other problems related to distribution of the Blat sources. Currently, the Blat sources has everything needed to compile it into an executable for anyone interested in buiding custom versions for themselves and/or their projects.

    I think is the better option would be to look for openssl.dll, and use that if I can find it.

    There might be other issues as I begin this effort to add openssl support, which I will have to resolve if I want it to work.

     
  • racassel

    racassel - 2022-11-17

    Please add SSL/TLS support. I have to use Swithmail now. I don't want to have to install stunnel on 100+ machines to email reports. Thank you for considering this.
    - Lazy Admin since 1992

     

Log in to post a comment.