Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

need command line support for zoho

216 views
Skip to first unread message

Todd and Margo Chester

unread,
Mar 15, 2013, 5:17:30 PM3/15/13
to
Hi All,

The connection just times out. Does anyone know what I am
doing wrong here? This is Linux and the nail program.
(The account does work from Thunderbird.)

#!/bin/bash
echo "nail test" | \
nail -v \
-S smtp-use-starttls \
-S from=TapeR...@xxxx.com \
-S smtp-auth=login \
-S ssl-verify=ignore \
-S smtp-auth-user=TapeR...@xxxx.com \
-S smtp-auth-password=zzzzzz \
-S smtp=smtp.zoho.com:465 \
-s `dnsdomainname`" zoho smtp test subject" yy...@zoho.com


Many thanks,
-T

Mike Easter

unread,
Mar 15, 2013, 6:50:20 PM3/15/13
to
Disclaimer: I have no experience using nail, I just read.

nail doesn't necessarily have SSL compiled in.

Here's a brief page about nail which mentions nail without SSL

http://archive09.linux.com/articles/51767 Mail with Nail

I was looking for a page which explained when or how you could get away
with the ssl-verify=ignore

Whenever I just want to 'engage' an ssl mailserver I usually use openssl

openssl s_client -crlf -connect smtp.zoho.com:465 -starttls smtp

That gives me a connect, but I'm not seeing all the certificate stuff,
so I would need to tweak it somehow.

If I use the same syntax at live, I get the whole enchilada

openssl s_client -crlf -connect smtp.live.com:587 -starttls smtp


--
Mike Easter

Todd and Margo Chester

unread,
Mar 15, 2013, 7:23:08 PM3/15/13
to
Okay, I've have gotten a little further along. I am able to test
with gmail but not yet with zoho:

#!/bin/bash
echo "nail test" | nail -v -s `dnsdomainname`" zoho smtp test subject" \
-S smtp-use-starttls \
-S smtp-auth=plain \
-S ssl-verify=ignore \
-S smtp=smtps://smtp.zoho.com:465 \
-S from=xx...@zoho.com \
-S smtp-auth-user=xxxx \
-S smtp-auth-password="hahahahaha" \
-S nss-config-dir=/home/linuxutil/mailcerts/ \
yy...@zoho.com


Gives me:

250 AUTH LOGIN PLAIN
>>> STARTTLS
220 Ready to start TLS
SSL/TLS handshake failed: Unknown error -5938.

Anyone know what causes this?

Many thanks,
-T

Mike Easter

unread,
Mar 15, 2013, 7:36:20 PM3/15/13
to
Mike Easter wrote:

> Whenever I just want to 'engage' an ssl mailserver I usually use openssl
>
> openssl s_client -crlf -connect smtp.zoho.com:465 -starttls smtp
>
> That gives me a connect, but I'm not seeing all the certificate stuff,
> so I would need to tweak it somehow.

I can get the whole enchilada at zoho with:

openssl s_client -crlf -connect smtp.zoho.com:465


--
Mike Easter

Mike Easter

unread,
Mar 15, 2013, 7:50:41 PM3/15/13
to
Todd wrote:

>>> The connection just times out.

> SSL/TLS handshake failed: Unknown error -5938.

This discussion makes a lot of progress with nail but concludes that his
particular nail doesn't have SSL support

http://nixcraft.com/linux-software/593-mailing-my-local-linux-system.html

Start at comment #5 at the above link and continue in that vein to #9

--
Mike Easter

Todd and Margo Chester

unread,
Mar 15, 2013, 8:18:28 PM3/15/13
to
Hi Mike,

gmail uses SSL and my gmail script is working.

:'(

-T


Mike Easter

unread,
Mar 15, 2013, 8:47:13 PM3/15/13
to
Todd wrote:

> gmail uses SSL and my gmail script is working.

... for some value of 'working'

> SSL/TLS handshake failed: Unknown error -5938.




--
Mike Easter

Mike Easter

unread,
Mar 15, 2013, 9:17:35 PM3/15/13
to
Mike Easter wrote:

> Disclaimer: I have no experience using nail,

My distro's repos have replaced nail with mailx which apparently sets up
pretty much the same as nail

Use illustration including .rc
http://www.fclose.com/b/linux/1411/sending-email-from-mailx-command-in-linux-using-gmails-smtp/
Sending Email from mailx Command in Linux Using Gmail’s SMTP

http://nail.sourceforge.net/ nail, an enhanced mailx command - As of
March 2006, nail has been integrated into the Heirloom project as mailx.
Please visit http://heirloom.sourceforge.net/mailx.html and update your
bookmarks.

http://heirloom.sourceforge.net/mailx.html Heirloom mailx (previously
known as nail) ... In combination with OpenSSL or NSS, both the STARTTLS
method and SMTPS can be used. SMTP AUTH is also supported.



--
Mike Easter

Todd and Margo Chester

unread,
Mar 15, 2013, 9:58:05 PM3/15/13
to
Hi Mike,

You are right. My "nail" was really "mailx". I was on 12.4-6
(the latest for Scientific Linux). I upgraded to
mailx-12.5-3.fc15.x86_64.rpm

No symptom change.

I suspect my parameters (-S) are wrong.

Thank you for the help!

-T

Todd and Margo Chester

unread,
Mar 15, 2013, 10:12:47 PM3/15/13
to
Okay. I figured it out. I commented out "-S smtp-use-starttls".
Go figure.

Thank you all for the help! I appreciate having you guys
at the other end.

-T

Mike Easter

unread,
Mar 16, 2013, 10:46:52 AM3/16/13
to
Todd wrote:
> Todd wrote:
>> Mike Easter wrote:
>>> Todd wrote:
>>>
>>>> The connection just times out.

>>> openssl s_client -crlf -connect smtp.zoho.com:465 -starttls smtp
>>>
>>> That gives me a connect, but I'm not seeing all the certificate stuff,
>>> so I would need to tweak it somehow.
>>>
>>> If I use the same syntax at live, I get the whole enchilada

Then I tweaked it ...

> I can get the whole enchilada at zoho with:
>
> openssl s_client -crlf -connect smtp.zoho.com:465

... by dropping the '-starttls smtp' which worked OK for live

> Okay. I figured it out. I commented out "-S smtp-use-starttls".
> Go figure.

Excellent. Thanks for the followup.

So different secure servers want a different protocol for that starttls
business and mailx/nail has its own use-starttls syntax for handling
that difference.

Here's some mailx documentation of the server difference/s 'problem'.

http://heirloom.sourceforge.net/mailx/mailx.1.html

smtp-use-starttls

Causes mailx to issue a STARTTLS command to make an SMTP session SSL/TLS
encrypted. Not all servers support this command; because of common
implementation defects, it cannot be automatically determined whether a
server supports it or not.


--
Mike Easter
0 new messages