Hi there,
has anybody gotten SstSMTPConnection and friends to work with ESMTP Auth? Joachim
-- You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/VfqeygFxkx8J. To post to this group, send email to [hidden email]. To unsubscribe from this group, send email to [hidden email]. For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en. |
I implemented a dirty hack to handle simple userid/password authentication with an SMTP server. It's not hard to implement, but I'm still not sure how to nicely integrate it with SSTs way of configuring services. I've spent nothing on any other than simple AUTH LOGIN, because that's what I needed.
So if you need to send mails using an SMTP server that uses any kind of authorization (which is the norm with todays' SMTP servers because of spam), SST doesn't support it out of the box. Joachim Am Dienstag, 20. März 2012 21:14:36 UTC+1 schrieb [hidden email]: Hi there, Am Dienstag, 20. März 2012 21:14:36 UTC+1 schrieb [hidden email]: Hi there,-- You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/wHQ90C0KbMUJ. To post to this group, send email to [hidden email]. To unsubscribe from this group, send email to [hidden email]. For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en. |
Hi Joachim
-- I know I'm dreging this up from ages ago, but this is still not supported in VAST. I'd like to know if you can share how you implemented your dirty hack? Thanks Dusty On Thursday, 5 April 2012 09:03:03 UTC+2, Joachim Tuchel wrote: I implemented a dirty hack to handle simple userid/password authentication with an SMTP server. It's not hard to implement, but I'm still not sure how to nicely integrate it with SSTs way of configuring services. I've spent nothing on any other than simple AUTH LOGIN, because that's what I needed. 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. |
Dusty,
-- the hack is basically this: you subclass SstSMTPConnection and override #sendHelo: like this: sendHelo: client | result securityConfig | securityConfig := self transport configuration securityConfiguration. stream nextPutAll: 'EHLO '; nextPutAll: securityConfig senderDomain; cr; flush. "Extended HELO for AUTH-LOGIN" "$NON-NLS$" (result := self receiveResponse) isSstError ifTrue: [^result]. result = OK ifFalse: [^SstError for: SstSendError with: result]. "Initiaite login sequence" "This is the simplest hack that could possibly work!" stream nextPutAll: 'AUTH LOGIN'; cr; flush. (result := self receiveResponse) isSstError ifTrue: [^result]. result = 334 ifFalse: [^SstError for: SstSendError with: result]. stream nextPutAll: (AbtBase64Coder new encode: securityConfig username); cr; flush. (result := self receiveResponse) isSstError ifTrue: [^result]. result = 334 ifFalse: [^SstError for: SstSendError with: result]. stream nextPutAll: (AbtBase64Coder new encode: securityConfig password); cr; flush. (result := self receiveResponse) isSstError ifTrue: [^result]. result = 235 ifFalse: [^SstError for: SstSendError with: result] "235 = Authentication succeeded" securityConfig is just an object that has the follwoing inst vars: senderDomain password username Now things start to become complicated and esoteric. Sst uses configuration caches and stuff just as if global state was a great invention. Just to not use what you registered in some places anyways, so that you have to dig them out of the caches by hand. So what you need to register is a TransportConfiguration that looks like this: SstTcpConfiguration new addressClass: SstSmtpAddress; transportIdentifier: 'smtp'; "$NON-NLS$" transportClass: SstTcpTransport; defaultPort: 'smtp'; "$NON-NLS$" nonBlocking: false; noDelay: true; reuseAddress: true; messageClass: SstByteMessage; assemblerClass: SstSmtpAssembler; connectionClass: OfESMTPConnection; "The subclass I mentioned above" streamClass: SstSocketStream; securityConfiguration: ((OfESMTPSecurityConfiguration new) username: 'You guess'; password: 'IWonttellyou'; senderDomain: 'you smtp server's address'; yourself); yourself Once you have all of this in place, you need to register things that I can't even tell you exactly what they're intended to do ;-) SstTransport register: self transportConfigurationForESMTP mutuallyReachableBy: #('smtp' 'smtpl'). SstTransport register: (self transportConfigurationForESMTP transportIdentifier: 'smtpl') mutuallyReachableBy: #('smtp' 'smtpl') I did that in the startup sequence of our web server. Don't ask how long it took me to put these pieces together. I'll just answer that I forgot ;-) HTH Joachim Am Donnerstag, 8. Januar 2015 10:18:28 UTC+1 schrieb Dusty:
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. |
Free forum by Nabble | Edit this page |