OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio

IPB

Welcome Guest ( Log In | Register )

2 Pages V   1 2 >  
Reply to this topicStart new topic
> Gmail Thru Qtmail Using Stunnel, How-to
nilch
post Aug 8 2005, 08:44 AM
Post #1





Group: Members
Posts: 668
Joined: 3-December 03
From: US
Member No.: 1,034



At last after a lot of googling, OE Forum posts and the help frm there and generally trial-and error methods I have been able to get this seemingly simple thing up and running.

So for those who are trying to figure out the steps in details (that was what was missing from the posts here - no particulars)...

1) Install Stunnel from the ipk available (at Killefiz for example)

2) Since this installation doesn't seem to create a Stunnel directory and the corresponding stunnel.conf file anywhere create it manually
a) create /etc/stunnel directory
cool.gif create stunnel.conf file inisde the /etc/stunnel directory (use VI and QZed)

the stunnel.conf file contents as I have it now...
###################
client = yes
debug=debug

# Configure the secured POP3 services
[pop3s]
accept = 127.0.0.1:110
connect=pop.gmail.com:995
###################


3) Edit the /etc/inietd.conf file and add a line to enable pop thru stunnel

pop3 stream tcp nowait root /usr/sbin/tcpd /usr/sbin/stunnel /etc/stunnel/stunnel.conf -r pop.gmail.com:995 -c

This is to make the tcpd service accept and connect thru stunnel (located in /usr/sbin) and make stunnel use the stunnel.conf file in /etc/stunnel with switches -r -c (maybe this is redundandant since the connect IP and port is already defined in stunnel.conf. I havent yet tried it without the -r switch.

After making the change to inetd.conf file restart the inetd service from the terminal
> su
> killall -hup inetd

4) Setup the gmail account in QtMail
The Incoming details are as
-----------------------------------
Choose account type : POP3
Username : whatever@gmail.com
Password : ******** (use your password here)
Server : 127.0.0.1
Port : 110


Now after connecting , and starting QtMail, I am able to receive all my Gmail emails on my Zaurus as pop mail.
Note : Gmail must already be configued to have POP mail service enabled (go to settings in Gmail)

I still haven't tried the outgoing mail using the smtp.gmail.com server at port 465, but at least I have incoming working.

Thanks to all who helped in the forums and at least gave helpful pointers.
Hope this helps and please correct me anyone if I am using redundant switches or settings anywhere...

EDIT : I need to add that on the default Sharp ROM, you also need to install openssl for stunnel to work. Thanks to a much later post by inode0, I remembered that openssl is also a requirement. Since I had it installed already from previously, I missed that. Thanks to inode0 for the helpful pointer.
Go to the top of the page
 
+Quote Post
bam
post Aug 8 2005, 12:22 PM
Post #2





Group: Members
Posts: 1,213
Joined: 9-June 05
From: Gobi Desert, Mongolia
Member No.: 7,306



cool, wonder if it'll work with KopieMail. BTW I have sylpheed working on both outgoing and incoming(outgoing will give an error, just ignore it) the mail does go thru. Unless of course you can figure out the error and correct it smile.gif
Go to the top of the page
 
+Quote Post
inode0
post Aug 9 2005, 08:27 AM
Post #3





Group: Members
Posts: 97
Joined: 15-December 04
Member No.: 5,933



QUOTE(nilch @ Aug 8 2005, 04:44 PM)
3) Edit the /etc/inietd.conf file and add a line to enable pop thru stunnel

pop3      stream      tcp      nowait    root    /usr/sbin/tcpd    /usr/sbin/stunnel /etc/stunnel/stunnel.conf -r pop.gmail.com:995 -c

I'm running stunnel-4.11 as a daemon and it works fine for both incoming and outgoing gmail using qtmail.

Thanks for the post reminding me to set this up.

John
Go to the top of the page
 
+Quote Post
bam
post Aug 9 2005, 12:26 PM
Post #4





Group: Members
Posts: 1,213
Joined: 9-June 05
From: Gobi Desert, Mongolia
Member No.: 7,306



thats it trying this for kopimail.....will come back later with results
Go to the top of the page
 
+Quote Post
bam
post Aug 11 2005, 12:16 AM
Post #5





Group: Members
Posts: 1,213
Joined: 9-June 05
From: Gobi Desert, Mongolia
Member No.: 7,306



QUOTE(inode0 @ Aug 9 2005, 08:27 AM)
QUOTE(nilch @ Aug 8 2005, 04:44 PM)
3) Edit the /etc/inietd.conf file and add a line to enable pop thru stunnel

pop3       stream      tcp      nowait     root    /usr/sbin/tcpd    /usr/sbin/stunnel /etc/stunnel/stunnel.conf -r pop.gmail.com:995 -c

I'm running stunnel-4.11 as a daemon and it works fine for both incoming and outgoing gmail using qtmail.

Thanks for the post reminding me to set this up.

John
*




so how about putting up a how-to on this, I'm curious if I can get this to work with ko/pi then I can quit using sylpheed.
Go to the top of the page
 
+Quote Post
inode0
post Aug 11 2005, 09:41 AM
Post #6





Group: Members
Posts: 97
Joined: 15-December 04
Member No.: 5,933



QUOTE(bam @ Aug 11 2005, 08:16 AM)
so how about putting up a how-to on this, I'm curious if I can get this to work with ko/pi then I can quit using sylpheed.

Ok, I'll try to fill in the gaps assuming you have stunnel configured for normal use.

In stunnel.conf (or whatever configuration file you want to use for this) I have

[gmail-pop3s]
accept = localhost:10110
connect = pop.gmail.com:995

[gmail-smtps]
accept = localhost:10025
connect = smtp.gmail.com:587
protocol = smtp

Then configure the email client to talk to the local ports 10110 and 10025 for incoming and ougoing mail. For qtmail I use the following setting for outgoing

SMTP server: 127.0.0.1
SMTP port: 10025
with authentication set to match incoming settings.

For incoming I use

Account type: POP3
Server: 127.0.0.1
Port: 10110

If you are using tcpwrappers with this you'll need to allow access from 127.0.0.1 to the services defined above. If you get it working and want to start stunnel at boot I add a symlink from /etc/rc.d/rc5.d/S99local to /etc/rc.d/rc.local and add this to rc.local
CODE
# Gmail via stunnel ...
if [ -x /usr/sbin/stunnel ]; then
 /usr/sbin/stunnel /etc/stunnel/stunnel.conf
fi

or you can just start stunnel from the command line when you want to do mail.

Hope this helps. Hope I haven't forgotten anything too important. Let me know how it goes.

John
Go to the top of the page
 
+Quote Post
nilch
post Aug 11 2005, 11:50 AM
Post #7





Group: Members
Posts: 668
Joined: 3-December 03
From: US
Member No.: 1,034



Thanks for the SMTP section...

Good news - now that I have Gmail working fine, I just saved myself a bunch of money by switching to geico, uh, sorry Gmail wink.gif

... and I cancelled my previous paid ISP POP email service and a dial-up which I never used.
smile.gif
Go to the top of the page
 
+Quote Post
bam
post Aug 11 2005, 12:31 PM
Post #8





Group: Members
Posts: 1,213
Joined: 9-June 05
From: Gobi Desert, Mongolia
Member No.: 7,306



has anyone got this to work with kopi? Followed the above instructions and no-go.
Go to the top of the page
 
+Quote Post
inode0
post Aug 11 2005, 12:37 PM
Post #9





Group: Members
Posts: 97
Joined: 15-December 04
Member No.: 5,933



QUOTE(bam @ Aug 11 2005, 08:31 PM)
has anyone got this to work with kopi? Followed the above instructions and no-go.

Can you turn on debugging in stunnel and post the errors you are receiving and maybe we can help? Can you telnet to ports 10110 and 10025 and let us know what you get?

John
Go to the top of the page
 
+Quote Post
bam
post Aug 11 2005, 08:04 PM
Post #10





Group: Members
Posts: 1,213
Joined: 9-June 05
From: Gobi Desert, Mongolia
Member No.: 7,306



how do I do that? I am a n00b, big time.
Go to the top of the page
 
+Quote Post
inode0
post Aug 12 2005, 07:42 AM
Post #11





Group: Members
Posts: 97
Joined: 15-December 04
Member No.: 5,933



QUOTE(bam @ Aug 12 2005, 04:04 AM)
how do I do that? I am a n00b, big time.


As root,

# touch /var/log/stunnel

Add

output = /var/log/stunnel
debug = 7

to your stunnel.conf file and restart stunnel. You should see something written to /var/log/stunnel at this point.

# telnet localhost 10110

and

# telnet localhost 10025

and check for output both on the terminal and in /var/log/stunnel. Usually this will at least tell us if stunnel is configured properly.

John
Go to the top of the page
 
+Quote Post
bam
post Aug 12 2005, 11:29 AM
Post #12





Group: Members
Posts: 1,213
Joined: 9-June 05
From: Gobi Desert, Mongolia
Member No.: 7,306



i dont even think its running, can you point me to some tutorials?
Go to the top of the page
 
+Quote Post
inode0
post Aug 12 2005, 12:01 PM
Post #13





Group: Members
Posts: 97
Joined: 15-December 04
Member No.: 5,933



QUOTE(bam @ Aug 12 2005, 07:29 PM)
i dont even think its running, can you point me to some tutorials?

Check the stunnel website for lots of information and examples.

John
Go to the top of the page
 
+Quote Post
nilch
post Aug 12 2005, 12:26 PM
Post #14





Group: Members
Posts: 668
Joined: 3-December 03
From: US
Member No.: 1,034



Are you trying to run Stunnel as a daemon or as a Inetd Service ?

Based on that you can understand if its running or not. As a inetd service it won't show up "running" when you do a ps command.

You might , from the command line do
/usr/sbin/tcpd /usr/sbin/stunnel /etc/stunnel/stunnel.conf

and see if the pop server is accepting connection thru stunnel
(provided you have made the /etc/stunnel/stunnel.conf file already)



QUOTE(bam @ Aug 12 2005, 02:29 PM)
i dont even think its running, can you point me to some tutorials?
*
Go to the top of the page
 
+Quote Post
bam
post Aug 12 2005, 06:04 PM
Post #15





Group: Members
Posts: 1,213
Joined: 9-June 05
From: Gobi Desert, Mongolia
Member No.: 7,306



I would like to run it as a daemon
so the command line should be
stunnel /path/to/stunnel.conf -L
right? Or am I wrong?
Is giving me a illeagal option fault
Go to the top of the page
 
+Quote Post

2 Pages V   1 2 >
Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 18th December 2014 - 04:28 AM