Author Topic: Configuring Stunnel using 2 email accounts (gmail-imap/smtp & yahoo-pop/smtp)  (Read 34617 times)

0 Members and 1 Guest are viewing this topic.

jra

  • Guest
Hello guys! I'm just new here, though I am an avast user for a couple of years now.

I'm not an advanced pc user, please help me configure Stunnel, Email client, and Avast, so that avast can scan my email.

I have two email accounts: one is Gmail using secured IMAP & SMTP, the other one is Yahoo Mail using secured POP3 & SMTP. My email client is Windows Mail. I don't use third party spam filter, only the built-in spam filter of Windows Mail.

Any help would be greatly appreciated. Thanks in advance... :)

Offline Lisandro

  • Avast team
  • Certainly Bot
  • *
  • Posts: 67194
Take a look here: http://forum.avast.com/index.php?topic=10428.0 to see how to set up secure email with avast!.

Download Stunnel here: http://www.stunnel.org/download/binaries.html

Advanced configuration: please refer to this post http://forum.avast.com/index.php?topic=8775.msg97026#msg97026

Feel free to ask for further help if you need.
The best things in life are free.

jra

  • Guest
Does the Stunnel work on Windows Vista and Windows Mail? After configuring stunnel, windows mail, and avast; when I open windows mail, it cannot connect to server then it stop working and then windows closes windows mail.

I'm not sure if my configuration for stunnel (below) is correct?

; have Stunnel work as a client (not as a server)
client=yes

; imap service, listens on localhost:11143
[gmail-imaps]
accept=127.0.0.1:11143
connect=imap.gmail.com:993

; SMTP service, listens on localhost:11025
[gmail-smtps]
protocol=smtp
accept=localhost:11025
connect=smtp.gmail.com:465

; POP3 service, listens on localhost:11110
[mail-yahoo-pop3s]
accept=127.0.0.1:11110
connect=pop.mail.yahoo.com.ph:995

; SMTP service, listens on localhost:11025
[mail-yahoo-smtps]
protocol=smtp
accept=127.0.0.1:11025
connect=smtp.mail.yahoo.com.ph:465

Is there an exact configuration of stunnel for gmail (imap & smtp) and yahoo (pop3 & smtp)?

Also, how to configure Windows Mail? I'm not also sure if I did it right.

-----------------------------------------------------------------------------------------
Please pardon me for the post above.

It's working already. Thank you, thank you, thank you very much. More power to you! :D
« Last Edit: January 17, 2008, 04:35:20 AM by jra »

sded

  • Guest
You need to use different smtp proxy port numbers (like 11025 and 11026) so you can select which smtp server you want to use.   :)

Offline Lisandro

  • Avast team
  • Certainly Bot
  • *
  • Posts: 67194
It's working already. Thank you, thank you, thank you very much. More power to you! :D
You're welcome. Feel free to come back any time you need help you just to change experiences 8)
The best things in life are free.

jra

  • Guest
You need to use different smtp proxy port numbers (like 11025 and 11026) so you can select which smtp server you want to use.   :)

Hello! As you've said, I edited my stunnel configuration to:

; have Stunnel work as a client (not as a server)
client=yes

; imap service, listens on localhost:11143
[gmail-imaps]
accept=127.0.0.1:11143
connect=imap.gmail.com:993

; SMTP service, listens on localhost:11025
[gmail-smtps]
protocol=smtp
accept=localhost:11025
connect=smtp.gmail.com:465

; POP3 service, listens on localhost:11110
[yahoomail-pop3s]
accept=127.0.0.1:11110
connect=pop.mail.yahoo.com.ph:995

; SMTP service, listens on localhost:11026
[yahoomail-smtps]
protocol=smtp
accept=127.0.0.1:11026
connect=smtp.mail.yahoo.com.ph:465

Is it correct? Why can't I send email on both gmail and yahoo? It says the server has not responded. And why is it, eventhough I use two different smtp proxy port numbers (11025 & 11026), in the error message (pasted below), the port for two email accounts are the same?

[ Subject 'TESTING', Account: 'Gmail', Server: 'localhost', Protocol: SMTP, Port: 11025, Secure(SSL): No, Error Number: 0x800CCC19        ]
[ Subject 'TESTING', Account: 'Yahoo Mail', Server: 'localhost', Protocol: SMTP, Port: 11025, Secure(SSL): No, Error Number: 0x800CCC19 ]

Receiving email has no problem. But sending, what seems to be the problem?

Please help me. Thanks. ???

sded

  • Guest
Don't know why you got two port 11025-did you stop and restart Stunnel after you changed stunnel.conf?  Try removing the "protocol=smtp" in stunnel.conf since you are using port 465.  And then stop & restart stunnel.  If that doesn't work, take a look at Avast!-On access protection control/internet mail/customize/redirect and make sure that both 11025 and 11026 are added there and that "ignore local communications" is unchecked.  Then go to smtp and uncheck "scan outbound mail" and see if it works.  If that works, then recheck "scan outbound mail" and try again.  Also look at the stunnel log and see if you are getting any error messages. 

jra

  • Guest
Don't know why you got two port 11025-did you stop and restart Stunnel after you changed stunnel.conf?  Try removing the "protocol=smtp" in stunnel.conf since you are using port 465.  And then stop & restart stunnel.  If that doesn't work, take a look at Avast!-On access protection control/internet mail/customize/redirect and make sure that both 11025 and 11026 are added there and that "ignore local communications" is unchecked.  Then go to smtp and uncheck "scan outbound mail" and see if it works.  If that works, then recheck "scan outbound mail" and try again.  Also look at the stunnel log and see if you are getting any error messages. 


Thank you so much!

I just removed the "protocol=smtp" in stunnel.conf and I can send email now. And the two 11025 port; it's 11025 & 11026 now.

May I ask, why the "protocol=smtp" should be removed? Anyway, my problem has been solved, thanks to you!

More power to you!  ;)

Offline Lisandro

  • Avast team
  • Certainly Bot
  • *
  • Posts: 67194
I just removed the "protocol=smtp" in stunnel.conf and I can send email now. And the two 11025 port; it's 11025 & 11026 now.
Are the messages being scanned both in Gmail and Yahoo?
The best things in life are free.

jra

  • Guest
I just removed the "protocol=smtp" in stunnel.conf and I can send email now. And the two 11025 port; it's 11025 & 11026 now.
Are the messages being scanned both in Gmail and Yahoo?

Good thing you asked.

I checked the internet mail scanner while I'm sending messages both on gmail & yahoo. Only the Yahoo mail was scanned. The Gmail was not. On the Avast!-On access protection control/internet mail/customize/redirect/smtp box; first setting was 11025,11026 then I tried 11025, 11026 (with space) both doesn't scan gmail, only yahoo has been scanned.

What should I do?  ???

Thank you.

Offline Lisandro

  • Avast team
  • Certainly Bot
  • *
  • Posts: 67194
The Gmail port is wrong...

; SMTP service, listens on localhost:11025
[gmail-smtps]
protocol=smtp
accept=localhost:11025
connect=smtp.gmail.com:465
I think it should be 587...

# SMTP service, listens on localhost:11025
[gmail-smtps]
protocol=smtp
accept=127.0.0.1:11025
connect=smtp.gmail.com:587
The best things in life are free.

jra

  • Guest
The Gmail port is wrong...

; SMTP service, listens on localhost:11025
[gmail-smtps]
protocol=smtp
accept=localhost:11025
connect=smtp.gmail.com:465
I think it should be 587...

# SMTP service, listens on localhost:11025
[gmail-smtps]
protocol=smtp
accept=127.0.0.1:11025
connect=smtp.gmail.com:587

But the instruction from Gmail Help Center, the smtp port number is 465 and checked SSL box. Does 587 also uses SSL?

jra

  • Guest
The Gmail port is wrong...

; SMTP service, listens on localhost:11025
[gmail-smtps]
protocol=smtp
accept=localhost:11025
connect=smtp.gmail.com:465
I think it should be 587...

# SMTP service, listens on localhost:11025
[gmail-smtps]
protocol=smtp
accept=127.0.0.1:11025
connect=smtp.gmail.com:587

Yeah, you're right, I did try 587, and it works.
I just want to make sure, does 587 use SSL? Because the instruction from Gmail Help Center, the smtp port number is 465 and the SSL box is checked.

Again, thank you so much! :D

sded

  • Guest
The problem lies in that there is a tendency to use the terms TLS (Transport Layer Security) and SSL (Secure Socket Layer) interchangeably and they are not the same.  Most ISPs provide one or the other, gmail provides both.  The gmail instructions say to use port 587 for Thunderbird (TLS), port 465 for Outlook Express (SSL) et al.  And the protocol=smtp is to switch Stunnel between TLS and SSL.  But if everything works through Stunnel, don't touch it-there appear to be a few other inconsistencies also. ;)
« Last Edit: January 19, 2008, 04:23:55 AM by sded »

jra

  • Guest
Thanks a lot Tech & Sded for your help. Problem solved.  ;)