Something went wrong while trying to load the full version of this site. Try hard-refreshing this page to fix the error.

IMAP and authentication...

yuri.rj

Hi again everyone...

Here i am again with my problems sending and receiving e-mails...
Our e-mail server just changed and now all accounts are exchange accounts....

So.. i have access through IMAP but i'm receiving some errors.

Maybe one of you had this experience already.

2011-06-28 16:53:35,175 ERROR QMD#simone.guerra -Unable to connect to remote host mail.exchange.locaweb.com.br
javax.mail.MessagingException: 451 5.7.3 Must issue a STARTTLS command first


at com.sun.mail.smtp.SMTPTransport.issueCommand(SMTPTransport.java:923)

at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:643)

at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:322)

at javax.mail.Transport.send0(Transport.java:163)

at javax.mail.Transport.send(Transport.java:80)

at com.bas.basserver.iopipes.EmailSink.a(Unknown Source)

at com.bas.basserver.iopipes.EmailSink.processMessage(Unknown Source)

at org.openadaptor.adaptor.STPipelineController.processMessage(Unknown Source)

at org.openadaptor.adaptor.SimpleController.processMessage(Unknown Source)

at org.openadaptor.adaptor.AbstractSimpleSource.processMessage(Unknown Source)

at org.openadaptor.adaptor.AbstractSimpleSource.sourceProcess(Unknown Source)

at org.openadaptor.adaptor.AbstractSimpleSource.sourceProcess(Unknown Source)

at com.bas.connectionserver.iopipes.RequestReplySource.sendMessages(Unknown Source)

at com.bas.basserver.channels.ChannelManager.a(Unknown Source)

at com.bas.basserver.channels.ChannelManager.sendNotifications(Unknown Source)

at com.bas.basserver.bsmanager.f.a(Unknown Source)

at com.bas.basserver.bsmanager.e.a(Unknown Source)

at com.bas.basserver.bsmanager.f.a(Unknown Source)

at com.bas.basserver.bsmanager.f.a(Unknown Source)

at com.bas.basserver.iopipes.ComponentSink.processMessage(Unknown Source)

at org.openadaptor.adaptor.STPipelineController.processMessage(Unknown Source)

at com.bas.openadaptor.NonTransactionalController.processMessage(Unknown Source)

at org.openadaptor.adaptor.AbstractSimplePipe.processMessage(Unknown Source)

at org.openadaptor.adaptor.STPipelineController.processMessage(Unknown Source)

at com.bas.openadaptor.NonTransactionalController.processMessage(Unknown Source)

at org.openadaptor.adaptor.AbstractSimpleSource.processMessage(Unknown Source)

at org.openadaptor.adaptor.AbstractSimpleSource.sourceProcess(Unknown Source)

at org.openadaptor.adaptor.AbstractSimpleSource.sourceProcess(Unknown Source)

at com.bas.openadaptor.a$a.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)


aware_support

This server requires a secure connection with the e-mail sender. Aware IM doesn't support this yet. You need a different e-mail server.


corradomatt

Hi Support!

Does AwareIm support secure connections for email servers yet? We need it before we can get our software working. I think it's important to the rest of the community too!

Thanks!


aware_support

No, not yet


Sergej

Does IMAP work correct in AwareIM?

I mean does it saves email on the server?


Sergej

IMAP in awareim removes email from the server. It is a pity, because usually it leaves them.
http://en.wikipedia.org/wiki/Internet_Message_Access_Protocol

E-mail clients using IMAP generally leave messages on the server until the user explicitly deletes them. This and other characteristics of IMAP operation allow multiple clients to manage the same mailbox.


yuri.rj

corradomatt wrote

Hi Support!

Does AwareIm support secure connections for email servers yet? We need it before we can get our software working. I think it's important to the rest of the community too!

Thanks!

aware_support wrote

No, not yet

Will it be available soon?
It's a really needed functionality


yuri.rj

For those who still have this problem
I found out something called Stunnel
It's an application that can "emulate" the SSL/TLS connection needed to use with servers that require secure connection

Hope it helps


corradomatt

Hi yuri.rj, thanks for the info about Stunnel. It looks promising until Aware can add this functionality. Have you gotten it to work for your application?

I'm interested in getting it working for gmail - specifically a google apps account. I'm going to play around with it tonight and see if I can get it to work.


yuri.rj

Actually I AM using gmail.... And it works perfectly
Tell me if you need some help
It's pretty simple actually...

Good luck


tford

Yuri .. why don't you just post your "help" notes here for everyone to use in the future. Steps of your solution would be very helpful.


yuri.rj

tford,

You're right!
I hadn't posted before because it's almost self explanatory

The only thing is to edit the .conf file
After the installation, stunner creates a shortcut called "Edit stunnel.conf"

On this file there are some commented lines like this

;[gmail-imap]
;client = yes
;accept = 127.0.0.1:143
;connect = imap.gmail.com:993

All you have to do is uncomment the lines that you'll use and edit your IP and PORT. I chose 1110 to POP3 and 1109 to smtp and stunnel is installed in the same server(localhost/127.0.0.1). So here its my .conf file

[gmail-pop3]
client = yes
accept = 127.0.0.1:1110
connect = pop.gmail.com:995

[gmail-smtp]
client = yes
accept = 127.0.0.1:1109
connect = smtp.gmail.com:465

Thats it.
Now AwareIM configuration must point to 127.0.0.1 and the selected port must match the ones that had been chosen(in my case 1110 and 1109).
AwareIM will try to contact the SMTP/POP3 server on the 127.0.0.1 and stunnel will redirect it to pop.gmail.com:995/smtp.gmail.com:465

Did i made myself clear? i don't know if my english is that good…….


corradomatt

ok yuri.rj, thanks for that....I think I understand it but I cannot get it to work on my system. I am developing on a windows xp machine and I have tried to use the standard 127.0.0.1 with no success. I have also tried to use the IP address assigned by my router (192.168.1.100) with no success.

Could you possibly point me in the right direction for the correct IP address?


yuri.rj

For me it was that simple... But let's try to solve that
Could you post your stunnel.conf?
And what are your awareIm system settings? Could you post a print screen for that too?


corradomatt

Here's my stunnel.conf file....

; Sample stunnel configuration file for Win32 by Michal Trojnara 2002-2011
; Some options used here may be inadequate for your particular configuration
; This sample file does *not* represent stunnel.conf defaults
; Please consult the manual for detailed description of available options

; **************************************************************************
; * Global options                                                         *
; **************************************************************************

; Debugging stuff (may useful for troubleshooting)
;debug = 7
;output = stunnel.log

; Disable FIPS mode to allow non-approved protocols and algorithms
;fips = no

; **************************************************************************
; * Service defaults may also be specified in individual service sections  *
; **************************************************************************

; Certificate/key is needed in server mode and optional in client mode
cert = stunnel.pem
;key = stunnel.pem

; Authentication stuff needs to be configured to prevent MITM attacks
; It is not enabled by default!
;verify = 2
; Don't forget to c_rehash CApath
;CApath = certs
; It's often easier to use CAfile
;CAfile = certs.pem
; Don't forget to c_rehash CRLpath
;CRLpath = crls
; Alternatively CRLfile can be used
;CRLfile = crls.pem

; Disable support for insecure SSLv2 protocol
options = NO_SSLv2
; Workaround for Eudora bug
;options = DONT_INSERT_EMPTY_FRAGMENTS

; These options provide additional security at some performance degradation
;options = SINGLE_ECDH_USE
;options = SINGLE_DH_USE

; **************************************************************************
; * Service definitions (at least one service has to be defined)           *
; **************************************************************************

; Example SSL server mode services

[pop3s]
accept  = 995
connect = 110

[imaps]
accept  = 993
connect = 143

[ssmtp]
accept  = 465
connect = 25

; Example SSL client mode services

[gmail-pop3]
client = yes
accept = 127.0.0.1:110
connect = pop.gmail.com:995

;[gmail-imap]
;client = yes
;accept = 127.0.0.1:143
;connect = imap.gmail.com:993

[gmail-smtp]
client = yes
accept = 127.0.0.1:25
connect = smtp.gmail.com:465

; Example SSL front-end to a web server

;[https]
;accept  = 443
;connect = 80
; "TIMEOUTclose = 0" is a workaround for a design flaw in Microsoft SSL
; Microsoft implementations do not use SSL close-notify alert and thus
; they are vulnerable to truncation attacks
;TIMEOUTclose = 0

; vim:ft=dosini

and a screen shot of my system settings....

Thanks for your help yuri.rj, I really appreciate it!


yuri.rj

First you don't need to uncomment this lines:

[pop3s]
accept = 995
connect = 110

[imaps]
accept = 993
connect = 143

[ssmtp]
accept = 465
connect = 25

And i would recommend you to change default smtp/pop3 ports

This is my stunner.conf file:

;


; * Service definitions (at least one service has to be defined) *
; **************************************************************************

; Example SSL server mode services

;[pop3s]
;accept = 995
;connect = 110

;[imaps]
;accept = 993
;connect = 143

;[ssmtp]
;accept = 465
;connect = 25

; Example SSL client mode services

[gmail-pop3]
client = yes
accept = 127.0.0.1:1110
connect = pop.gmail.com:995

;[gmail-imap]
;client = yes
;accept = 127.0.0.1:143
;connect = imap.gmail.com:993

[gmail-smtp]
client = yes
accept = 127.0.0.1:1109
connect = smtp.gmail.com:465

; Example SSL front-end to a web server

;[https]
;accept = 443
;connect = 80
; "TIMEOUTclose = 0" is a workaround for a design flaw in Microsoft SSL
; Microsoft implementations do not use SSL close-notify alert and thus
; they are vulnerable to truncation attacks
;TIMEOUTclose = 0

; vim:ft=dosini

In AwareIM i set like this:

Incoming Email Host: 127.0.0.1(awareIM and Stunnel are in the same machine)
Port: 1110

Outgoing Email Host: 127.0.0.1(awareIM and Stunnel are in the same machine)
Port: 1109

[/quote]


corradomatt

Awesome! Thank you so much yuri.rj - you're the best!!

It worked perfectly. One thing that I didn't notice was on stunnel I had to choose "Configuration" > "Reload stunnel.conf" after I made my changes to the stunnel.conf file before those changes would take effect. After that and with your settings suggestions it works beautifully!!

I have it working great with my gmail account now I need to try it with my Google Apps account. I'll post the results along with complete step-by-step instructions to the Tips and Tricks section of this forum.


yuri.rj

It's awesome, isn't it?

I got that excited too when It worked for me

Glad I could help... And this post on Tips and Tricks will be very helpful too... I hadn't thought of that...


RocketRod

So will stunnel handle the receiving of email as well? I was told it could only send email.

Cheers Rod


yuri.rj

Rod
Using the configuration above, awareIm will work as a "bridge" and the only thing it will do is transport from port 25/110 to Gmail default ports.

So.... It WILL work for incoming and outgoing e-mail.... I'm using both

Cheers
Yuri


Next Page »