SMTP via SSL

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
27 messages Options
12
Reply | Threaded
Open this post in threaded view
|

SMTP via SSL

jtuchel
Hi Group,

I managed to set up our server to send mails using SMTP using Server Smalltalk. I simply dug down into sstEmailTo: and used the parts I understood ;-)
So far, this works nicely. We can send HTML-mails from our Seaside Web Server without any problems.

Up until any time soon now.

Because most ISPs switch off their simple SMTP gateways and we will soon be locked out. Unless we manage to use SSL for the SMTP connection.

Does anybody have a few pointers for me how to configure SST to send messages via SSL to an SMTP Gateway? I know it must be possible, but I have a hard time understanding much in the SST users' Guide, 

Any help is appreciated

Joachim

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: SMTP via SSL

Douglas Swartz
Hello Joachim,

It's cheating a little, but you could probably use stunnel to
establish the SSL connection and not change your Smalltalk code at
all.

Wednesday, March 26, 2014, 2:43:49 PM, you wrote:

> Hi Group,

> I managed to set up our server to send mails using SMTP using
> Server Smalltalk. I simply dug down into sstEmailTo: and used the parts I understood ;-)

> So far, this works nicely. We can send HTML-mails from our Seaside Web Server without any problems.

> Up until any time soon now.

> Because most ISPs switch off their simple SMTP gateways and we will
> soon be locked out. Unless we manage to use SSL for the SMTP connection.

> Does anybody have a few pointers for me how to configure SST to
> send messages via SSL to an SMTP Gateway? I know it must be
> possible, but I have a hard time understanding much in the SST users' Guide,

> Any help is appreciated

> Joachim

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: SMTP via SSL

jtuchel
I wouldnt mind cheating as long as our server can do its job. We're happily cheating on the server side by having apache handle ssl/https.
I'll see what I can find about stunnel.

Thanks for the tip.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: SMTP via SSL

jtuchel
Doug,

It seems stunnel is not the right thing to do.
I am far from being an smtp expert, but it seems I need to implement STARTTLS, which inititiates an unencrypted connection and switcges to encrypted communication when the STARTTLS command was sent and agreed upon. So it seems I have to do sth on the client side.

Or does vast support STARTTLS?

Joachim

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: SMTP via SSL

Marten Feldtmann-2
In reply to this post by jtuchel
Do not go the Smalltalk way - try to store your eMail and then let other programs do the job:

* even though smalltalkers are assumed to have the biggest productivity: do not waste your time to reinvent the world

* by letting other programs do your job, your Smalltalk single-thread application can do other job in the meantime

 As an example:

http://stackoverflow.com/questions/14722556/using-curl-to-send-email

 Or do you remember the Mono example I published several months ago ? Perhaps write your own C# program (not embedded within Smalltalk) and let C# do the job, same with Java.

Am Mittwoch, 26. März 2014 20:43:49 UTC+1 schrieb Joachim Tuchel:
Hi Group,

I managed to set up our server to send mails using SMTP using Server Smalltalk. I simply dug down into sstEmailTo: and used the parts I understood ;-)
So far, this works nicely. We can send HTML-mails from our Seaside Web Server without any problems.

Up until any time soon now.

Because most ISPs switch off their simple SMTP gateways and we will soon be locked out. Unless we manage to use SSL for the SMTP connection.

Does anybody have a few pointers for me how to configure SST to send messages via SSL to an SMTP Gateway? I know it must be possible, but I have a hard time understanding much in the SST users' Guide, 

Any help is appreciated

Joachim

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: SMTP via SSL

jtuchel
Marten,

I fully agree to your arguments about reasons to not do everything in Smalltalk. 

There are other arguments, however (and none of them is new to you I guess):

* I develop on Windows because the VAST IDE on Linux misses so many nice features from the windows version and because there are problems with Ctrl-key combinations on non-US locales (and what is an IDE without copy/paste worth???) and I deploy to a Linux server. So I'd have to maintain and at least test the stuff on both Windows and Linux

* If I write another program in another language, I still have to learn a lot of stuff about SMTP and SSL. So why should I not be able to do the same thing in Smalltalk?

* Inter-program-communication can be hard to test, and another component adds two additional interfaces at which things can go wrong. Now I have SMTP between my Smalltalk image and a Mail Relay/Gateway, then I'd have Smalltalk to mail program to mail relay

* Each component needs to handle errors. That adds to a huge pile of error handling, state checking, whatever. A hell to debug in a headless production environment.

Even if SMTP is easy and simple, I'd like to keep the number of moving parts as low as possible. So far, we've had good experiences with this approach.

Of course, if there is no way to do it in Smalltalk (at least not in VAST), I'll have to look at alternatives. For now, I hope for the one who tells me they did it and share their knowledge ;-)

Joachim


Am Donnerstag, 27. März 2014 07:29:22 UTC+1 schrieb Marten Feldtmann:
Do not go the Smalltalk way - try to store your eMail and then let other programs do the job:

* even though smalltalkers are assumed to have the biggest productivity: do not waste your time to reinvent the world

* by letting other programs do your job, your Smalltalk single-thread application can do other job in the meantime

 As an example:

<a href="http://stackoverflow.com/questions/14722556/using-curl-to-send-email" target="_blank" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fstackoverflow.com%2Fquestions%2F14722556%2Fusing-curl-to-send-email\46sa\75D\46sntz\0751\46usg\75AFQjCNHisz6sRxXzmdrC4NeuBuWPucCXfA';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fstackoverflow.com%2Fquestions%2F14722556%2Fusing-curl-to-send-email\46sa\75D\46sntz\0751\46usg\75AFQjCNHisz6sRxXzmdrC4NeuBuWPucCXfA';return true;">http://stackoverflow.com/questions/14722556/using-curl-to-send-email

 Or do you remember the Mono example I published several months ago ? Perhaps write your own C# program (not embedded within Smalltalk) and let C# do the job, same with Java.

Am Mittwoch, 26. März 2014 20:43:49 UTC+1 schrieb Joachim Tuchel:
Hi Group,

I managed to set up our server to send mails using SMTP using Server Smalltalk. I simply dug down into sstEmailTo: and used the parts I understood ;-)
So far, this works nicely. We can send HTML-mails from our Seaside Web Server without any problems.

Up until any time soon now.

Because most ISPs switch off their simple SMTP gateways and we will soon be locked out. Unless we manage to use SSL for the SMTP connection.

Does anybody have a few pointers for me how to configure SST to send messages via SSL to an SMTP Gateway? I know it must be possible, but I have a hard time understanding much in the SST users' Guide, 

Any help is appreciated

Joachim

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: SMTP via SSL

jtuchel
Nevertheless, I like what I read on StackOverflow. 
If any of your suggestions sounds like an easy thing to do, the use of curl seems to be at the top of my list. 

Thanks for the link

Joachim


Am Donnerstag, 27. März 2014 10:08:06 UTC+1 schrieb Joachim Tuchel:
Marten,

I fully agree to your arguments about reasons to not do everything in Smalltalk. 

There are other arguments, however (and none of them is new to you I guess):

* I develop on Windows because the VAST IDE on Linux misses so many nice features from the windows version and because there are problems with Ctrl-key combinations on non-US locales (and what is an IDE without copy/paste worth???) and I deploy to a Linux server. So I'd have to maintain and at least test the stuff on both Windows and Linux

* If I write another program in another language, I still have to learn a lot of stuff about SMTP and SSL. So why should I not be able to do the same thing in Smalltalk?

* Inter-program-communication can be hard to test, and another component adds two additional interfaces at which things can go wrong. Now I have SMTP between my Smalltalk image and a Mail Relay/Gateway, then I'd have Smalltalk to mail program to mail relay

* Each component needs to handle errors. That adds to a huge pile of error handling, state checking, whatever. A hell to debug in a headless production environment.

Even if SMTP is easy and simple, I'd like to keep the number of moving parts as low as possible. So far, we've had good experiences with this approach.

Of course, if there is no way to do it in Smalltalk (at least not in VAST), I'll have to look at alternatives. For now, I hope for the one who tells me they did it and share their knowledge ;-)

Joachim


Am Donnerstag, 27. März 2014 07:29:22 UTC+1 schrieb Marten Feldtmann:
Do not go the Smalltalk way - try to store your eMail and then let other programs do the job:

* even though smalltalkers are assumed to have the biggest productivity: do not waste your time to reinvent the world

* by letting other programs do your job, your Smalltalk single-thread application can do other job in the meantime

 As an example:

<a href="http://stackoverflow.com/questions/14722556/using-curl-to-send-email" target="_blank" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fstackoverflow.com%2Fquestions%2F14722556%2Fusing-curl-to-send-email\46sa\75D\46sntz\0751\46usg\75AFQjCNHisz6sRxXzmdrC4NeuBuWPucCXfA';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fstackoverflow.com%2Fquestions%2F14722556%2Fusing-curl-to-send-email\46sa\75D\46sntz\0751\46usg\75AFQjCNHisz6sRxXzmdrC4NeuBuWPucCXfA';return true;">http://stackoverflow.com/questions/14722556/using-curl-to-send-email

 Or do you remember the Mono example I published several months ago ? Perhaps write your own C# program (not embedded within Smalltalk) and let C# do the job, same with Java.

Am Mittwoch, 26. März 2014 20:43:49 UTC+1 schrieb Joachim Tuchel:
Hi Group,

I managed to set up our server to send mails using SMTP using Server Smalltalk. I simply dug down into sstEmailTo: and used the parts I understood ;-)
So far, this works nicely. We can send HTML-mails from our Seaside Web Server without any problems.

Up until any time soon now.

Because most ISPs switch off their simple SMTP gateways and we will soon be locked out. Unless we manage to use SSL for the SMTP connection.

Does anybody have a few pointers for me how to configure SST to send messages via SSL to an SMTP Gateway? I know it must be possible, but I have a hard time understanding much in the SST users' Guide, 

Any help is appreciated

Joachim

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: SMTP via SSL

jtuchel
In reply to this post by Marten Feldtmann-2
And then there is this one:

Am Donnerstag, 27. März 2014 07:29:22 UTC+1 schrieb Marten Feldtmann:
Do not go the Smalltalk way - try to store your eMail and then let other programs do the job:

* even though smalltalkers are assumed to have the biggest productivity: do not waste your time to reinvent the world


My hope was/is that the huge and stable SST framework does include support for what I need. I've been proven wrong before, but maybe this one is easy (at least the use of SMTPS should be easy with SST, right?).

So the idea is not that I am wasting my time on SMTPS, but that IBM already wasted theirs or Instantiations agrees to waste theirs on it ;-)))

Joachim

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: SMTP via SSL

jtuchel
In reply to this post by jtuchel
Okay, 

my picture is getting clearer now:

what our ISP is about to switch off is ESMTP (or SMTP with SMTP-AUTH) via unencrypted tcpip sockets.

What will remain available is either STARTTLS or SMTPS, which, if I understand correctly, is just the same as bare SMPT or ESMTP, but transported on an SSL connection.

So it sounds like the implementation changes between what we have now and what would be supported are small if we go the SMTPS route, because all that needs to be done is to replace the underlying unencrypted tcpip connection with an SSL encrypted one. On the protocol layer, all would be as before. STARTTLS sounds as if it's much more complicated and less secure (because a server cannot keep a client from sending credentials unencrypted).

So what do I need to do to have my local and remote endpoints communicate via an SSL connection? 

Doug: stunnel seems to be for the server side only, correct?

Joachim



Am Donnerstag, 27. März 2014 06:19:20 UTC+1 schrieb Joachim Tuchel:
Doug,

It seems stunnel is not the right thing to do.
I am far from being an smtp expert, but it seems I need to implement STARTTLS, which inititiates an unencrypted connection and switcges to encrypted communication when the STARTTLS command was sent and agreed upon. So it seems I have to do sth on the client side.

Or does vast support STARTTLS?

Joachim

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: SMTP via SSL

Douglas Swartz
Hello Joachim,

stunnel can work the client side as well as the server side. Stunnel
works much like a proxy. It listens on a port and writes what it
receives on that port out to some other specified IP address and port.
If it listens for SSL traffic, it will write out unencrypted traffic.
If it listens for unencrypted traffic, it writes out SSL/TLS. Most of
the discussion you see about it has it listening to encrypted traffic
and writing unencrypted traffic to a server.

In your smtp client example, you might set up stunnel to listen for
unencrypted traffic on port 9900 of your smtp client and talk SSL to
your ISP. You would change your VAST SMTP client to talk to port 9900
on that local box. VAST establishes an unencrypted smtp session with
stunnel; stunnel establishes an SSL/TLS session with your ISP and
forwards the SMTP traffic to it.

Here's a discussion of doing pretty much what you need to do:
http://www.charlestonsw.com/setting-up-stunnel-on-linux/


Doug

Thursday, March 27, 2014, 4:19:14 AM, you wrote:

> Okay,



> my picture is getting clearer now:




> what our ISP is about to switch off is ESMTP (or SMTP with
> SMTP-AUTH) via unencrypted tcpip sockets.




> What will remain available is either STARTTLS or SMTPS, which, if I
> understand correctly, is just the same as bare SMPT or ESMTP, but transported on an SSL connection.




> So it sounds like the implementation changes between what we have
> now and what would be supported are small if we go the SMTPS route,
> because all that needs to be done is to replace the underlying
> unencrypted tcpip connection with an SSL encrypted one. On the
> protocol layer, all would be as before. STARTTLS sounds as if it's
> much more complicated and less secure (because a server cannot keep
> a client from sending credentials unencrypted).




> So what do I need to do to have my local and remote endpoints
> communicate via an SSL connection?




> Doug: stunnel seems to be for the server side only, correct?




> Joachim






> Am Donnerstag, 27. März 2014 06:19:20 UTC+1 schrieb Joachim Tuchel:
> Doug,
> It seems stunnel is not the right thing to do.
> I am far from being an smtp expert, but it seems I need to
> implement STARTTLS, which inititiates an unencrypted connection and
> switcges to encrypted communication when the STARTTLS command was
> sent and agreed upon. So it seems I have to do sth on the client side.

> Or does vast support STARTTLS?

> Joachim






--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: SMTP via SSL

jtuchel
Doug,

This sounds like a hassle-free solution. I'll take a closer look at stunnel.

Thanks for the tip and link,

Joachim

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
dfe
Reply | Threaded
Open this post in threaded view
|

Re: SMTP via SSL

dfe
In reply to this post by jtuchel
Hi Joachim,

In the Web Services Cookbook there is an example of configuring the transport layer to use SSL.  It is geared towards web services, but you may be able to apply the transport configurations to SMTP. 


Regards,

Diane

On Wednesday, March 26, 2014 3:43:49 PM UTC-4, Joachim Tuchel wrote:
Hi Group,

I managed to set up our server to send mails using SMTP using Server Smalltalk. I simply dug down into sstEmailTo: and used the parts I understood ;-)
So far, this works nicely. We can send HTML-mails from our Seaside Web Server without any problems.

Up until any time soon now.

Because most ISPs switch off their simple SMTP gateways and we will soon be locked out. Unless we manage to use SSL for the SMTP connection.

Does anybody have a few pointers for me how to configure SST to send messages via SSL to an SMTP Gateway? I know it must be possible, but I have a hard time understanding much in the SST users' Guide, 

Any help is appreciated

Joachim

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: SMTP via SSL

jtuchel
Diane,

I had seen this in the documentation, but I completely failed to see a slightest hint as to what I'd have to do to use SSL with SMTP. 
I somewhat expected I need to do something with my remote and local endpoints and have them use ssl instead of bare sockets. But how?

So thanks for the link. Unfortunately, I am not able to make any use of it.

Joachim



Am Mittwoch, 2. April 2014 19:59:04 UTC+2 schrieb dfe:
Hi Joachim,

In the Web Services Cookbook there is an example of configuring the transport layer to use SSL.  It is geared towards web services, but you may be able to apply the transport configurations to SMTP. 

<a href="http://www.instantiations.com/docs/86/ws/wwhelp/wwhimpl/common/html/wwhelp.htm#href=wscbsecure.html&amp;single=true" target="_blank" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwww.instantiations.com%2Fdocs%2F86%2Fws%2Fwwhelp%2Fwwhimpl%2Fcommon%2Fhtml%2Fwwhelp.htm%23href%3Dwscbsecure.html%26single%3Dtrue\46sa\75D\46sntz\0751\46usg\75AFQjCNFD5ADF3xMFS1j4SqtOq-LBuLyUdA';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwww.instantiations.com%2Fdocs%2F86%2Fws%2Fwwhelp%2Fwwhimpl%2Fcommon%2Fhtml%2Fwwhelp.htm%23href%3Dwscbsecure.html%26single%3Dtrue\46sa\75D\46sntz\0751\46usg\75AFQjCNFD5ADF3xMFS1j4SqtOq-LBuLyUdA';return true;">http://www.instantiations.com/docs/86/ws/wwhelp/wwhimpl/common/html/wwhelp.htm#href=wscbsecure.html&single=true 

Regards,

Diane

On Wednesday, March 26, 2014 3:43:49 PM UTC-4, Joachim Tuchel wrote:
Hi Group,

I managed to set up our server to send mails using SMTP using Server Smalltalk. I simply dug down into sstEmailTo: and used the parts I understood ;-)
So far, this works nicely. We can send HTML-mails from our Seaside Web Server without any problems.

Up until any time soon now.

Because most ISPs switch off their simple SMTP gateways and we will soon be locked out. Unless we manage to use SSL for the SMTP connection.

Does anybody have a few pointers for me how to configure SST to send messages via SSL to an SMTP Gateway? I know it must be possible, but I have a hard time understanding much in the SST users' Guide, 

Any help is appreciated

Joachim

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: SMTP via SSL

jtuchel
Hi Diane,

so I tried this (because that was the part that I seemed to understand, and it seemed to be a starting point to play with):







Am Mittwoch, 2. April 2014 22:53:27 UTC+2 schrieb Joachim Tuchel:
Diane,

I had seen this in the documentation, but I completely failed to see a slightest hint as to what I'd have to do to use SSL with SMTP. 
I somewhat expected I need to do something with my remote and local endpoints and have them use ssl instead of bare sockets. But how?

So thanks for the link. Unfortunately, I am not able to make any use of it.

Joachim



Am Mittwoch, 2. April 2014 19:59:04 UTC+2 schrieb dfe:
Hi Joachim,

In the Web Services Cookbook there is an example of configuring the transport layer to use SSL.  It is geared towards web services, but you may be able to apply the transport configurations to SMTP. 

<a href="http://www.instantiations.com/docs/86/ws/wwhelp/wwhimpl/common/html/wwhelp.htm#href=wscbsecure.html&amp;single=true" target="_blank" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwww.instantiations.com%2Fdocs%2F86%2Fws%2Fwwhelp%2Fwwhimpl%2Fcommon%2Fhtml%2Fwwhelp.htm%23href%3Dwscbsecure.html%26single%3Dtrue\46sa\75D\46sntz\0751\46usg\75AFQjCNFD5ADF3xMFS1j4SqtOq-LBuLyUdA';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwww.instantiations.com%2Fdocs%2F86%2Fws%2Fwwhelp%2Fwwhimpl%2Fcommon%2Fhtml%2Fwwhelp.htm%23href%3Dwscbsecure.html%26single%3Dtrue\46sa\75D\46sntz\0751\46usg\75AFQjCNFD5ADF3xMFS1j4SqtOq-LBuLyUdA';return true;">http://www.instantiations.com/docs/86/ws/wwhelp/wwhimpl/common/html/wwhelp.htm#href=wscbsecure.html&single=true 

Regards,

Diane

On Wednesday, March 26, 2014 3:43:49 PM UTC-4, Joachim Tuchel wrote:
Hi Group,

I managed to set up our server to send mails using SMTP using Server Smalltalk. I simply dug down into sstEmailTo: and used the parts I understood ;-)
So far, this works nicely. We can send HTML-mails from our Seaside Web Server without any problems.

Up until any time soon now.

Because most ISPs switch off their simple SMTP gateways and we will soon be locked out. Unless we manage to use SSL for the SMTP connection.

Does anybody have a few pointers for me how to configure SST to send messages via SSL to an SMTP Gateway? I know it must be possible, but I have a hard time understanding much in the SST users' Guide, 

Any help is appreciated

Joachim

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: SMTP via SSL

SebastianHC
Hi Joachim,

I think VAST is missing some general things here.
Have a look at : https://qmail.jms1.net/test-auth.shtml

You might want to extend VAST by your own SstSSLSmtpConnection supporting EHLO and STARTTLS messages.

Sebastian


Am 02.04.2014 13:58, schrieb Joachim Tuchel:
Hi Diane,

so I tried this (because that was the part that I seemed to understand, and it seemed to be a starting point to play with):



Am Mittwoch, 2. April 2014 22:53:27 UTC+2 schrieb Joachim Tuchel:
Diane,

I had seen this in the documentation, but I completely failed to see a slightest hint as to what I'd have to do to use SSL with SMTP. 
I somewhat expected I need to do something with my remote and local endpoints and have them use ssl instead of bare sockets. But how?

So thanks for the link. Unfortunately, I am not able to make any use of it.

Joachim



Am Mittwoch, 2. April 2014 19:59:04 UTC+2 schrieb dfe:
Hi Joachim,

In the Web Services Cookbook there is an example of configuring the transport layer to use SSL.  It is geared towards web services, but you may be able to apply the transport configurations to SMTP. 

<a moz-do-not-send="true" href="http://www.instantiations.com/docs/86/ws/wwhelp/wwhimpl/common/html/wwhelp.htm#href=wscbsecure.html&amp;single=true" target="_blank" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwww.instantiations.com%2Fdocs%2F86%2Fws%2Fwwhelp%2Fwwhimpl%2Fcommon%2Fhtml%2Fwwhelp.htm%23href%3Dwscbsecure.html%26single%3Dtrue\46sa\75D\46sntz\0751\46usg\75AFQjCNFD5ADF3xMFS1j4SqtOq-LBuLyUdA';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwww.instantiations.com%2Fdocs%2F86%2Fws%2Fwwhelp%2Fwwhimpl%2Fcommon%2Fhtml%2Fwwhelp.htm%23href%3Dwscbsecure.html%26single%3Dtrue\46sa\75D\46sntz\0751\46usg\75AFQjCNFD5ADF3xMFS1j4SqtOq-LBuLyUdA';return true;">http://www.instantiations.com/docs/86/ws/wwhelp/wwhimpl/common/html/wwhelp.htm#href=wscbsecure.html&single=true 

Regards,

Diane

On Wednesday, March 26, 2014 3:43:49 PM UTC-4, Joachim Tuchel wrote:
Hi Group,

I managed to set up our server to send mails using SMTP using Server Smalltalk. I simply dug down into sstEmailTo: and used the parts I understood ;-)
So far, this works nicely. We can send HTML-mails from our Seaside Web Server without any problems.

Up until any time soon now.

Because most ISPs switch off their simple SMTP gateways and we will soon be locked out. Unless we manage to use SSL for the SMTP connection.

Does anybody have a few pointers for me how to configure SST to send messages via SSL to an SMTP Gateway? I know it must be possible, but I have a hard time understanding much in the SST users' Guide, 

Any help is appreciated

Joachim
--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: SMTP via SSL

jtuchel
Hi Sebastian,

that's what I did: I implemented an extension to support EHLO. STARTTLS seemed to complicated, so I used ESMTP as TSTTCPW.
Our little extension is not really "integrated" into SST, because we had to change a few system methods (which I think shouldn't be necessary if I only understood  a little bit about the inner workings of SST), but it does its job.

But now that our hosting provider is shutting down ESMTP on simple SMTP, we need to use SMTPS, which is SMTP over SSL.

I played a bit with cURL as Marten suggested, and I could send an SMTPS message in about 20 minutes with a simple command line. My SST extension took me a few days of research and trial and error....

I also read the article Doug linked to, and it seems like STUNNEL would also work very nicely, and I wouldn't have to change our existing Smalltalk code (makes this alternative very attractive). 

So, for now, I will continue along the STUNNEL road and see how fast I can get this to run. But still it seems SST should have enough power and flexibility to support this simple scenario. And I guess it does, but there's a big secret around how to unleash the beast...

Joachim
  

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: SMTP via SSL

Julian Ford
In reply to this post by jtuchel
Hello, Joachim.

I am using EMail in my application.
I took EMan from a while back, and have enhanced it to be able to handle SSL and HTML email.
It does the STARTTLS, and I have used it successfully with GMail, Sympatico, as well as non-SSL EMails.
I will happily share that with you, if that would be helpful.

I was planning on offering it up as a VAST Goody.

Let me know, and I will export the app, and send it along.

Best Regards,
Julian Ford

On Thursday, March 27, 2014 1:19:20 AM UTC-4, Joachim Tuchel wrote:
Doug,

It seems stunnel is not the right thing to do.
I am far from being an smtp expert, but it seems I need to implement STARTTLS, which inititiates an unencrypted connection and switcges to encrypted communication when the STARTTLS command was sent and agreed upon. So it seems I have to do sth on the client side.

Or does vast support STARTTLS?

Joachim

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: SMTP via SSL

jtuchel
Julian,

great!
It would be very helpful if you could upload your updated version of EMan to vast goodies!
I don't use EMan but maybe your version can convince me to do so.

Joachim


Am Montag, 7. April 2014 02:07:55 UTC+2 schrieb Julian Ford:
Hello, Joachim.

I am using EMail in my application.
I took EMan from a while back, and have enhanced it to be able to handle SSL and HTML email.
It does the STARTTLS, and I have used it successfully with GMail, Sympatico, as well as non-SSL EMails.
I will happily share that with you, if that would be helpful.

I was planning on offering it up as a VAST Goody.

Let me know, and I will export the app, and send it along.

Best Regards,
Julian Ford

On Thursday, March 27, 2014 1:19:20 AM UTC-4, Joachim Tuchel wrote:
Doug,

It seems stunnel is not the right thing to do.
I am far from being an smtp expert, but it seems I need to implement STARTTLS, which inititiates an unencrypted connection and switcges to encrypted communication when the STARTTLS command was sent and agreed upon. So it seems I have to do sth on the client side.

Or does vast support STARTTLS?

Joachim

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: SMTP via SSL

Julian Ford
Hello, Joachim.

I am sorry this was a long time coming, but if you look in VAST Goodies, you will see I have uploaded a new
version of the EMan Runtime map.  This will work on 8.5 as well as 8.6, and has support for SSL, but also
HTML EMails, BCC issues with Thunderbird and GMail (the BCC recipients were all seeing each other's EMail addresses,
since the original inplementation also included the BCC line in the message header, and SOME EMail clients show that),
and EMail accounts that require NONE for Auth.

The original Eman code is a little hard to look at, but it does seem to be quite solid, and I have used this framework within
my own product for several years now.

Just to give you a quick example (obviously I have built my own framework around EMan to simplify all of this further,
but this should give you an idea of what is basically required):

smtpManager := OcEMManager new
        smtpAuthentication: 'NONE';
        smtpRequiresSSL: true;
        smtpPort: 587;
        smtpHostName: 'smtp.gmail.com';
        smtpUserName: 'myUserName';
        smtpPassword: 'myPassword';
        returnAddress: '[hidden email]';
        hhmmFromGMT: '-0500';
        "auditTrail: Transcript;"
        yourself.

mailMessage := smtpManager newMessage
    from: 'My Name';
    to: '[hidden email]';
    subject: 'an EMail test';
    replyTo: '[hidden email]';
    useHtmlContent: false;
    setMessageToString: 'some EMail message';
    yourself.

carbonCopyList do: [ :string | mailMessage cc: string ].
blindCopyList do: [ :string | mailMessage bcc: string ].
attachments do: [ :fileName | message attachFile: fileName ].

mailMessage send.



If you have any questions at all, please let me know, and I will do my best to respond more quickly.

I hope this helps you!

Regards,
Julian


On Monday, April 7, 2014 1:45:08 AM UTC-4, Joachim Tuchel wrote:
Julian,

great!
It would be very helpful if you could upload your updated version of EMan to vast goodies!
I don't use EMan but maybe your version can convince me to do so.

Joachim


Am Montag, 7. April 2014 02:07:55 UTC+2 schrieb Julian Ford:
Hello, Joachim.

I am using EMail in my application.
I took EMan from a while back, and have enhanced it to be able to handle SSL and HTML email.
It does the STARTTLS, and I have used it successfully with GMail, Sympatico, as well as non-SSL EMails.
I will happily share that with you, if that would be helpful.

I was planning on offering it up as a VAST Goody.

Let me know, and I will export the app, and send it along.

Best Regards,
Julian Ford

On Thursday, March 27, 2014 1:19:20 AM UTC-4, Joachim Tuchel wrote:
Doug,

It seems stunnel is not the right thing to do.
I am far from being an smtp expert, but it seems I need to implement STARTTLS, which inititiates an unencrypted connection and switcges to encrypted communication when the STARTTLS command was sent and agreed upon. So it seems I have to do sth on the client side.

Or does vast support STARTTLS?

Joachim

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: SMTP via SSL

Julian Ford
In reply to this post by jtuchel
Hello, Joachim.

Did you get my reply?
I just happened to look at the newsgroup, and see that my message was deleted for some reason.
Did you manage to see it before it was deleted?

Julian

On Monday, April 7, 2014 1:45:08 AM UTC-4, Joachim Tuchel wrote:
Julian,

great!
It would be very helpful if you could upload your updated version of EMan to vast goodies!
I don't use EMan but maybe your version can convince me to do so.

Joachim


Am Montag, 7. April 2014 02:07:55 UTC+2 schrieb Julian Ford:
Hello, Joachim.

I am using EMail in my application.
I took EMan from a while back, and have enhanced it to be able to handle SSL and HTML email.
It does the STARTTLS, and I have used it successfully with GMail, Sympatico, as well as non-SSL EMails.
I will happily share that with you, if that would be helpful.

I was planning on offering it up as a VAST Goody.

Let me know, and I will export the app, and send it along.

Best Regards,
Julian Ford

On Thursday, March 27, 2014 1:19:20 AM UTC-4, Joachim Tuchel wrote:
Doug,

It seems stunnel is not the right thing to do.
I am far from being an smtp expert, but it seems I need to implement STARTTLS, which inititiates an unencrypted connection and switcges to encrypted communication when the STARTTLS command was sent and agreed upon. So it seems I have to do sth on the client side.

Or does vast support STARTTLS?

Joachim

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
12