Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* OpenSSL with SMTP mail instead of GnuTLS
@ 2008-09-14 15:41 chrycheng
  2008-09-18 16:44 ` Phil Lord
  0 siblings, 1 reply; 10+ messages in thread
From: chrycheng @ 2008-09-14 15:41 UTC (permalink / raw)
  To: info-gnus-english

Anyone here who has made this work successfully?  Tried it using this
hack: http://lists.gnu.org/archive/html/gnu-emacs-sources/2007-05/msg00021.html
to no avail.  I get "Sending failed; SMTP protocol error" with no
trace buffer.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: OpenSSL with SMTP mail instead of GnuTLS
  2008-09-14 15:41 OpenSSL with SMTP mail instead of GnuTLS chrycheng
@ 2008-09-18 16:44 ` Phil Lord
  2008-09-19  1:28   ` chrycheng
  2008-12-21 23:54   ` Leo
  0 siblings, 2 replies; 10+ messages in thread
From: Phil Lord @ 2008-09-18 16:44 UTC (permalink / raw)
  To: info-gnus-english

On Sep 14, 4:41 pm, "chrych...@gmail.com" <chrych...@gmail.com> wrote:
> Anyone here who has made this work successfully?  Tried it using this
> hack:http://lists.gnu.org/archive/html/gnu-emacs-sources/2007-05/msg00021....
> to no avail.  I get "Sending failed; SMTP protocol error" with no
> trace buffer.

Sorry it didn't work for you, although I'm not surprised. It was a bit
of a hack. For me, it works but only
with cygwin and windows, and not on ubuntu. I'm afraid I don't have
the resources or the knowledge to
fix this up better than currently.

It's a worry for me; my email existence is hanging by the thread of a
bad hack. Some day soon, our
server config will change, and I'll be left without email. I don't
understand why Gnus can read email
straightforwardly with openssl, but not send it. Nor what everyone
else using Gnus to send mail is
doing. Is there another option that I am not aware of?

Phil

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: OpenSSL with SMTP mail instead of GnuTLS
  2008-09-18 16:44 ` Phil Lord
@ 2008-09-19  1:28   ` chrycheng
  2008-09-19 12:45     ` Phil Lord
  2008-12-21 23:54   ` Leo
  1 sibling, 1 reply; 10+ messages in thread
From: chrycheng @ 2008-09-19  1:28 UTC (permalink / raw)
  To: info-gnus-english

On Sep 19, 12:44 am, Phil Lord <phil.lord....@googlemail.com> wrote:
> On Sep 14, 4:41 pm, "chrych...@gmail.com" <chrych...@gmail.com> wrote:
>
> > Anyone here who has made this work successfully?  Tried it using this
> > hack:http://lists.gnu.org/archive/html/gnu-emacs-sources/2007-05/msg00021....
> > to no avail.  I get "Sending failed; SMTP protocol error" with no
> > trace buffer.
>
> Sorry it didn't work for you, although I'm not surprised. It was a bit
> of a hack. For me, it works but only
> with cygwin and windows, and not on ubuntu. I'm afraid I don't have
> the resources or the knowledge to
> fix this up better than currently.
>
> It's a worry for me; my email existence is hanging by the thread of a
> bad hack. Some day soon, our
> server config will change, and I'll be left without email. I don't
> understand why Gnus can read email
> straightforwardly with openssl, but not send it. Nor what everyone
> else using Gnus to send mail is
> doing. Is there another option that I am not aware of?
>
> Phil

Almost there!

Edited smtp-openssl.el so that the advice to smtpmail-open-stream
passes "-starttls smtp" as well.

Then, I learned about smtpmail-debug-info so I set that to get more
info on what was really happening.

I found out that the carriage returns in smtpmail's commands were
causing the SMTP server to return errors which in turn make smtpmail
choke during parsing.  So I hacked smtpmail-send-command to remove
those carriage returns.  (Still thinking of an approach more elegant
than having to redefine it in my .emacs).

Now, I am able to get the part where data is sent up to the point
where a dot character on a line by itself is sent.  I assume this is
something like an EOF signal to the SMTP server.  However, nothing
happens for a while after.  Then I get the "read:errno=54" in the SMTP
session trace buffer.

Any ideas anyone?

Also, I think smtpmail isn't really a part of Gnus so it has problems
with OpenSSL where Gnus doesn't.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: OpenSSL with SMTP mail instead of GnuTLS
  2008-09-19  1:28   ` chrycheng
@ 2008-09-19 12:45     ` Phil Lord
  2008-09-19 16:58       ` Sivaram Neelakantan
                         ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Phil Lord @ 2008-09-19 12:45 UTC (permalink / raw)
  To: info-gnus-english

On Sep 19, 2:28 am, "chrych...@gmail.com" <chrych...@gmail.com> wrote:
> On Sep 19, 12:44 am, Phil Lord <phil.lord....@googlemail.com> wrote:

> Now, I am able to get the part where data is sent up to the point
> where a dot character on a line by itself is sent.  I assume this is
> something like an EOF signal to the SMTP server.  However, nothing
> happens for a while after.  Then I get the "read:errno=54" in the SMTP
> session trace buffer.
>
> Any ideas anyone?
>
> Also, I think smtpmail isn't really a part of Gnus so it has problems
> with OpenSSL where Gnus doesn't.

I think the key problem is just that smtpmail.el is old; the author
also
wrote GnuTLS -- it works best with this, but not on windows.

Actually, you might want to try a completely different option. I've
been following
instructions from on msmtp -- this is a lightweight SMTP client which
looks to the outside world
(specifically emacs!) like sendmail.

I've managed to get it working with cygwin -- will be trying Ubuntu
next, and it should work
on mac, although I have no ability to test these.

There's documentation on EmacsWiki about it; the config is a bit hairy
at the moment, so
I'll probably write a proper wrapper library for it at some point;
smptmail-openssl.el can then
be retired for the hack that it is.

Phil

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: OpenSSL with SMTP mail instead of GnuTLS
  2008-09-19 12:45     ` Phil Lord
@ 2008-09-19 16:58       ` Sivaram Neelakantan
       [not found]       ` <mailman.19564.1221843533.18990.info-gnus-english@gnu.org>
  2008-09-23  1:55       ` chrycheng
  2 siblings, 0 replies; 10+ messages in thread
From: Sivaram Neelakantan @ 2008-09-19 16:58 UTC (permalink / raw)
  To: info-gnus-english

Phil Lord <phil.lord.bio@googlemail.com> writes:

> On Sep 19, 2:28 am, "chrych...@gmail.com" <chrych...@gmail.com> wrote:
>> On Sep 19, 12:44 am, Phil Lord <phil.lord....@googlemail.com> wrote:
>

[...]

> Actually, you might want to try a completely different option. I've
> been following
> instructions from on msmtp -- this is a lightweight SMTP client which
> looks to the outside world
> (specifically emacs!) like sendmail.
>
> I've managed to get it working with cygwin -- will be trying Ubuntu
> next, and it should work
> on mac, although I have no ability to test these.
>
> There's documentation on EmacsWiki about it; the config is a bit
> hairy at the moment, so I'll probably write a proper wrapper library
> for it at some point; smptmail-openssl.el can then be retired for
> the hack that it is.

[...]
er...if you meant this link

http://www.emacswiki.org/cgi-bin/wiki/GnusMSMTP

I wrote some bits of it and others improved upon it.  If there is
anything which is not clear, do tell, I'll clean it up.  FWIW, the
last time I checked, msmtp worked on Windows+Emacs too without cygwin.

 sivaram
 -- 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: OpenSSL with SMTP mail instead of GnuTLS
       [not found]       ` <mailman.19564.1221843533.18990.info-gnus-english@gnu.org>
@ 2008-09-19 18:48         ` Phil Lord
  0 siblings, 0 replies; 10+ messages in thread
From: Phil Lord @ 2008-09-19 18:48 UTC (permalink / raw)
  To: info-gnus-english

On Sep 19, 5:58 pm, Sivaram Neelakantan <nsivaram....@gmail.com>
wrote:
> Phil Lord <phil.lord....@googlemail.com> writes:
> > On Sep 19, 2:28 am, "chrych...@gmail.com" <chrych...@gmail.com> wrote:
> >> On Sep 19, 12:44 am, Phil Lord <phil.lord....@googlemail.com> wrote:
>
> [...]
>
> > Actually, you might want to try a completely different option. I've
> > been following
> > instructions from on msmtp -- this is a lightweight SMTP client which
> > looks to the outside world
> > (specifically emacs!) like sendmail.
>
> > I've managed to get it working with cygwin -- will be trying Ubuntu
> > next, and it should work
> > on mac, although I have no ability to test these.
>
> > There's documentation on EmacsWiki about it; the config is a bit
> > hairy at the moment, so I'll probably write a proper wrapper library
> > for it at some point; smptmail-openssl.el can then be retired for
> > the hack that it is.
>
> [...]
> er...if you meant this link
>
> http://www.emacswiki.org/cgi-bin/wiki/GnusMSMTP
>
> I wrote some bits of it and others improved upon it.  If there is
> anything which is not clear, do tell, I'll clean it up.  FWIW, the
> last time I checked, msmtp worked on Windows+Emacs too without cygwin.
>
>  sivaram
>  --

Sorry, I didn't mean to be rude. The documentation is reasonably
clear. The only thing that would have made it better, I think, is a
short description of how to test your msmtp config from outside gnus,
on the command line. If you get this wrong, in my hands, emacs has a
tendency to hang and has to be killed. Try, for example, changing the
config to a random port. msmtp will now try to connect and emacs will
hang while it fails. In my hands, you need to kill the emacs process
to get out of this using task manager. Not the ideal environment for
experimentation.

For me, also, using the .msmtp config is not ideal, as I have to
duplicate between windows and ubuntu. So, what I would like to do is
write a new package, which duplicates the options of msmtp, so that
you can configure in emacs, using lisp.  Underneath, I'd expect it to
still use sendmail.el; no point rewriting this.

I'm not surprised it works wihtout cygwin, but it's good to know. For
me, a cygwin option is easier in practice, but either is fine.

Anyway, again, apologies for the implied rudeness of the last post; I
am very grateful for the stuff on EmacsWiki; it was invaluable to me.
It's probably going to form the basis of my email config for the next
few years at least!

Phil

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: OpenSSL with SMTP mail instead of GnuTLS
  2008-09-19 12:45     ` Phil Lord
  2008-09-19 16:58       ` Sivaram Neelakantan
       [not found]       ` <mailman.19564.1221843533.18990.info-gnus-english@gnu.org>
@ 2008-09-23  1:55       ` chrycheng
  2008-09-23 17:26         ` chrycheng
  2 siblings, 1 reply; 10+ messages in thread
From: chrycheng @ 2008-09-23  1:55 UTC (permalink / raw)
  To: info-gnus-english

On Sep 19, 8:45 pm, Phil Lord <phil.lord....@googlemail.com> wrote:
> On Sep 19, 2:28 am, "chrych...@gmail.com" <chrych...@gmail.com> wrote:
>
> > On Sep 19, 12:44 am, Phil Lord <phil.lord....@googlemail.com> wrote:
> > Now, I am able to get the part where data is sent up to the point
> > where a dot character on a line by itself is sent.  I assume this is
> > something like an EOF signal to the SMTP server.  However, nothing
> > happens for a while after.  Then I get the "read:errno=54" in the SMTP
> > session trace buffer.
>
> > Any ideas anyone?

It looks like it's a problem with my SMTP server.  I recreated the
session in the command line and was able to observe the same
behavior.  I'll take this up with support instead.

>
> > Also, I think smtpmail isn't really a part of Gnus so it has problems
> > with OpenSSL where Gnus doesn't.
>
> I think the key problem is just that smtpmail.el is old; the author
> also
> wrote GnuTLS -- it works best with this, but not on windows.
>
> Actually, you might want to try a completely different option. I've
> been following
> instructions from on msmtp -- this is a lightweight SMTP client which
> looks to the outside world
> (specifically emacs!) like sendmail.

Thanks for the info but I'm trying to avoid having to install new
software at the moment.  This is my last resort if ever I don't get
this working with what is already in my system at the moment.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: OpenSSL with SMTP mail instead of GnuTLS
  2008-09-23  1:55       ` chrycheng
@ 2008-09-23 17:26         ` chrycheng
  2008-10-02  9:40           ` Phil Lord
  0 siblings, 1 reply; 10+ messages in thread
From: chrycheng @ 2008-09-23 17:26 UTC (permalink / raw)
  To: info-gnus-english

On Sep 23, 9:55 am, "chrych...@gmail.com" <chrych...@gmail.com> wrote:
> On Sep 19, 8:45 pm, Phil Lord <phil.lord....@googlemail.com> wrote:
>
> > On Sep 19, 2:28 am, "chrych...@gmail.com" <chrych...@gmail.com> wrote:
>
> > > On Sep 19, 12:44 am, Phil Lord <phil.lord....@googlemail.com> wrote:
> > > Now, I am able to get the part where data is sent up to the point
> > > where a dot character on a line by itself is sent.  I assume this is
> > > something like an EOF signal to the SMTP server.  However, nothing
> > > happens for a while after.  Then I get the "read:errno=54" in the SMTP
> > > session trace buffer.
>
> > > Any ideas anyone?
>
> It looks like it's a problem with my SMTP server.  I recreated the
> session in the command line and was able to observe the same
> behavior.  I'll take this up with support instead.
>

Finally got things to work!

Support advised me to add "-crlf" to the list of parameters being
passed to openssl.  That immediately worked but the message headers
weren't being interpreted properly so I had to hack smtpmail-send-
data-1 also so that "\n" is used instead of "\r\n".

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: OpenSSL with SMTP mail instead of GnuTLS
  2008-09-23 17:26         ` chrycheng
@ 2008-10-02  9:40           ` Phil Lord
  0 siblings, 0 replies; 10+ messages in thread
From: Phil Lord @ 2008-10-02  9:40 UTC (permalink / raw)
  To: info-gnus-english

On Sep 23, 6:26 pm, "chrych...@gmail.com" <chrych...@gmail.com> wrote:
> On Sep 23, 9:55 am, "chrych...@gmail.com" <chrych...@gmail.com> wrote:
>
>
>
> > On Sep 19, 8:45 pm, Phil Lord <phil.lord....@googlemail.com> wrote:
>
> > > On Sep 19, 2:28 am, "chrych...@gmail.com" <chrych...@gmail.com> wrote:
>
> > > > On Sep 19, 12:44 am, Phil Lord <phil.lord....@googlemail.com> wrote:
> > > > Now, I am able to get the part where data is sent up to the point
> > > > where a dot character on a line by itself is sent.  I assume this is
> > > > something like an EOF signal to the SMTP server.  However, nothing
> > > > happens for a while after.  Then I get the "read:errno=54" in the SMTP
> > > > session trace buffer.
>
> > > > Any ideas anyone?
>
> > It looks like it's a problem with my SMTP server.  I recreated the
> > session in the command line and was able to observe the same
> > behavior.  I'll take this up with support instead.
>
> Finally got things to work!
>
> Support advised me to add "-crlf" to the list of parameters being
> passed to openssl.  That immediately worked but the message headers
> weren't being interpreted properly so I had to hack smtpmail-send-
> data-1 also so that "\n" is used instead of "\r\n".

Eeech. Well, sounds like you have a good support service at least.

Glad that it worked for you in the end.

Phil

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: OpenSSL with SMTP mail instead of GnuTLS
  2008-09-18 16:44 ` Phil Lord
  2008-09-19  1:28   ` chrycheng
@ 2008-12-21 23:54   ` Leo
  1 sibling, 0 replies; 10+ messages in thread
From: Leo @ 2008-12-21 23:54 UTC (permalink / raw)
  To: Phil Lord; +Cc: info-gnus-english

On 2008-09-18 17:44 +0100, Phil Lord wrote:
>> Anyone here who has made this work successfully?  Tried it using this
>> hack:http://lists.gnu.org/archive/html/gnu-emacs-sources/2007-05/msg00021....
>> to no avail.  I get "Sending failed; SMTP protocol error" with no
>> trace buffer.
>
> Sorry it didn't work for you, although I'm not surprised. It was a bit
> of a hack. For me, it works but only with cygwin and windows, and not
> on ubuntu. I'm afraid I don't have the resources or the knowledge to
> fix this up better than currently.

I have recently decided to start using Emacs to send emails again and I
could only do so with smtp-openssl.el on W32. Thank you very much for
this.

BTW, any plan to turn this into a proper package?

Cheers,
-- 
.:  Leo  :.  [ sdl.web AT gmail.com ]  .: I use Emacs :.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2008-12-21 23:54 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-14 15:41 OpenSSL with SMTP mail instead of GnuTLS chrycheng
2008-09-18 16:44 ` Phil Lord
2008-09-19  1:28   ` chrycheng
2008-09-19 12:45     ` Phil Lord
2008-09-19 16:58       ` Sivaram Neelakantan
     [not found]       ` <mailman.19564.1221843533.18990.info-gnus-english@gnu.org>
2008-09-19 18:48         ` Phil Lord
2008-09-23  1:55       ` chrycheng
2008-09-23 17:26         ` chrycheng
2008-10-02  9:40           ` Phil Lord
2008-12-21 23:54   ` Leo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).