Forum Discussion

new2nbu's avatar
new2nbu
Level 4
5 years ago

Configuring BLAT with STUNNEL

Hello- I'm new to configuring STUNNEL with BLAT and I'm hoping I can explain this ok but looking for some assistance.  The Netbackup catalog DR file/email can no longer be sent via email using SMTP over port 25 and they are enforcing TLS over port 587.

I have always used BLAT and I have since downloaded stunnel and went through these steps:

  1. Download and install stunnel-5.56-win64-installer.exe
  2. Created a backup of the stunnel.conf.orig.txt file
  3. Edited stunnel.conf text to the following:

            client = yes
             [ssmtp]
             accept = 25
             connect = mailxxx.xxx.corp:587

  1. Save/quit the file
  2. Start/Programs, right-click "service install" and click Run as Administrator
  3. Start/programs, right click "service start" and click Run as Administrator
  4. Edited nbmail.cmd (d\program files\veritas\netbackup\bin) to include blat xxxx -server localhost:25 
  5. Reconfigured blat using this command:  

          blat.exe -installSMTP localhost <sender_email_address> -q -port 25 -u <smtp account> -pw <password>

  1. Send a test email with this command: 

blat.exe -sender <server_email-address> -to myaccount@xx.com -subject "test from %computeraccount%" -body "test"

I receive the following email error:

***Error *** SMTP server error

Error: Not a socket.

Error:Not a socket

Thanks so much -- hopefully it's something easy and I'm just completely missing it!!

  • sdo's avatar
    sdo
    5 years ago

    Probably best to reach out to the stunnel people to help you debug their logs.

12 Replies

  • I suspect that maybe all you need is a local Windows firewall rule to allow incoming traffic to stunnel on the localhost, and/or maybe your A/V is blocking incoming port 25 and/or maybe AV is also blocking outgoing port 587.

    Can you telnet to localhost port 25 ?

    Can you telnet to SMTP relay host port 587 ?

    • new2nbu's avatar
      new2nbu
      Level 4

      Thank so much for the reply.  Sorry, I should have included that.  Yes, I can telnet both on ports 25 and 587 to the mail server and the Windows Firewall is turned off.  I was running the test command with blat <blat.exe -server backup_reports@xx.com -to myemailaddress@..com -subject "test from %computeraccount% -body "test" I still receive this error:

      Error:Connection to server was dropped.

      ***Error***SMTP Server error

      Error:Not a socket

      Error: Not a socket

      In the stunnel viewer I do see "SSL_Connect:  ssl/record/ssl3_recored.c:331:  ssl3_get_record:wrong version number.. 

      Thanks so much,

       

      • Krutons's avatar
        Krutons
        Moderator

        I'd take a look at your configuration file again, seems like it might be incomplete. Compare your config file to the sample stunnel.conf.

        ssl3_get_record:wrong version number
        Id assume this pretty much means your system isn't using SSLv3.

        Look over the options in your config file, maybe something to specify SSL like below.
        options = NO_SSLv3