Discussion:
Blat and STARTTLS
jrander76
2009-04-06 19:39:10 UTC
Permalink
In using blat and I get an error "Must issue a STARTTLS command first".

I am on a Windows XP system.

I have started stunnel and it is running before I execute the blat command from the command line.

I am using blat version "Blat v2.6.2 w/GSS encryption (build : Feb 25 2007 12:06:19)".

Can some one tell or show me how to issue a "STARTTLS command first".

Here is the blat command line that is executed:

set to_eMail=***@email.com
set from_eMail=***@email.com
set subj=-s "Test Blat"
set try=-try 2
set smtpServer=-server smtp.email.com
set smtpPort=-port 587
set user=-u ***@email.com
set password=-pw xxxxxx
set x=-x "X-Header-Test: Can Blat do it? Yes it Can!"
set debug=-debug -log blat.log -timestamp
set hostname=-hostname localhost

blat sendfile.txt -to %to_eMail% -f %from_eMail% %subj% %smtpServer% %smtpPort% %hostname% %user% %password% %try% %debug% %x%

===================================================
Here is the blat log that is generated:
2009.04.06 14:21:27 (Mon)
------------Start of Session-----------------
Blat v2.6.2 w/GSS encryption (build : Feb 25 2007 12:06:19)
2009.04.06 14:21:27 (Mon): <<<getline<<< 220 mx.email.com ESMTP j34sm5860521waf.62
2009.04.06 14:21:27 (Mon): >>>putline>>> EHLO localhost
2009.04.06 14:21:27 (Mon): <<<getline<<< 250-mx.email.com at your service, [65.210.205.254]
2009.04.06 14:21:27 (Mon): <<<getline<<< 250-SIZE 35651584
2009.04.06 14:21:27 (Mon): <<<getline<<< 250-8BITMIME
2009.04.06 14:21:27 (Mon): <<<getline<<< 250-STARTTLS
2009.04.06 14:21:27 (Mon): <<<getline<<< 250-ENHANCEDSTATUSCODES
2009.04.06 14:21:27 (Mon): <<<getline<<< 250 PIPELINING
2009.04.06 14:21:34 (Mon): Sending sendfile.txt to ***@email.com
2009.04.06 14:21:34 (Mon): Subject: Test Blat
2009.04.06 14:21:34 (Mon): Login name is ***@Email.com
2009.04.06 14:21:34 (Mon): Try number 1 of 2.
2009.04.06 14:21:34 (Mon): >>>putline>>> AUTH LOGIN
2009.04.06 14:21:34 (Mon): <<<getline<<< 530 5.7.0 Must issue a STARTTLS command first. j34sm5860521waf.62
2009.04.06 14:21:34 (Mon): The SMTP server does not require AUTH LOGIN.
Are you sure server supports AUTH?
2009.04.06 14:21:34 (Mon): >>>putline>>> MAIL FROM:<***@gmail.com>
2009.04.06 14:21:34 (Mon): <<<getline<<< 530 5.7.0 Must issue a STARTTLS command first. j34sm5860521waf.62
2009.04.06 14:21:34 (Mon): The SMTP server does not like the sender name.
Have you set your mail address correctly?
2009.04.06 14:21:34 (Mon): >>>putline>>> QUIT
2009.04.06 14:21:34 (Mon): <<<getline<<< 221 2.0.0 closing connection j34sm5860521waf.62
2009.04.06 14:21:34 (Mon)
-------------End of Session------------------

I will appreciate any assistance you can give me.
Chip
2009-04-07 03:44:42 UTC
Permalink
Post by jrander76
I have started stunnel and it is running before I execute the blat command
from the command line.
<snip>
<snip>
Post by jrander76
set smtpServer=-server smtp.email.com
<snip>
Post by jrander76
2009.04.06 14:21:34 (Mon): <<<getline<<< 530 5.7.0 Must issue a STARTTLS
command first. j34sm5860521waf.62
<snip>


You started stunnel, but you are not using it. Stunnel would provide the
TLS session needed by your server. Your smtpServer variable should look
like this:

set smtpServer=-server 127.0.0.1

Then in your stunnel.conf, you need to an entry that points to your mail
server on its correct port, such as this:

accept = 25
connect = smtp.email.com:465
--
Chip
jrander76
2009-04-07 16:49:01 UTC
Permalink
Thanks for your help. It worked.
Post by Chip
Post by jrander76
I have started stunnel and it is running before I execute the blat command
from the command line.
<snip>
<snip>
Post by jrander76
set smtpServer=-server smtp.email.com
<snip>
Post by jrander76
2009.04.06 14:21:34 (Mon): <<<getline<<< 530 5.7.0 Must issue a STARTTLS
command first. j34sm5860521waf.62
<snip>
You started stunnel, but you are not using it. Stunnel would provide the
TLS session needed by your server. Your smtpServer variable should look
set smtpServer=-server 127.0.0.1
Then in your stunnel.conf, you need to an entry that points to your mail
accept = 25
connect = smtp.email.com:465
--
Chip
Loading...