maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   Send all 'modest' (email) via my ssh tunnel. (https://talk.maemo.org/showthread.php?t=90615)

macey 2013-07-02 16:03

Send all 'modest' (email) via my ssh tunnel.
 
Quite often, when sending emails via a 'non-home' ISP, emails do not
get forwarded, emails disappear into the ether. My N900 is permanently connected to my home server (on network activation) using foward and reverse tunnels. I use these tunnels for all sorts of media streaming etc., I would like to send my emails via my server.
I know 'modest' is the N900 client. I have 'tsocks' installed.
I have all the relevent ports configued correctly To do this on my netbook, I just run 'tsocks evolution' & all my emails go via my server.
I am looking for the equivalent setup on my N900. I think what I want is
modest to start as 'tsocks modest' but I am not sure where/how to implement this....

Help much appreciated...

rfeese 2013-07-02 18:21

Re: Send all 'modest' (email) via my ssh tunnel.
 
I would think that the easiest way would be to create a specific port forwarding for SMTP and then configure modest to use that forwarded port for outgoing SMTP.

peterleinchen 2013-07-02 18:52

Re: Send all 'modest' (email) via my ssh tunnel.
 
You may try something like that from terminal in N900:
Code:

ssh -L localsmtpport:remotemailserver:remotesmtpport home.at.myServer
Of course you need a ssh server on your home running.
This should forward the selected port (to be configured in modest for one specific account) to the mail server and its smtp port via your home server.

Do not close the connection (terminal), as long as it is open it will work. Try out and if successful configure this in /etc/event.d/...

macey 2013-07-03 09:42

Re: Send all 'modest' (email) via my ssh tunnel.
 
[QUOTE=..................This should forward the selected port (to be configured in modest for one specific account) to the mail server and its smtp port via your home server.
[/QUOTE]

Just how do you do that?
On modest, if I go in to edit account settings and try to edit 'use connection-specific SMTP Servers', it will not accept localhost:9999 (my forwarded port is 9999). The field seems ro want an smtp type address.

reinob 2013-07-03 13:58

Re: Send all 'modest' (email) via my ssh tunnel.
 
Quote:

Originally Posted by macey (Post 1356454)
Just how do you do that?
On modest, if I go in to edit account settings and try to edit 'use connection-specific SMTP Servers', it will not accept localhost:9999 (my forwarded port is 9999). The field seems ro want an smtp type address.

In "outgoing server (SMTP)" type: localhost (or 127.0.0.1), and in port: 9999

macey 2013-07-03 14:14

Re: Send all 'modest' (email) via my ssh tunnel.
 
Quote:

Originally Posted by reinob (Post 1356508)
In "outgoing server (SMTP)" type: localhost (or 127.0.0.1), and in port: 9999

Please refer to earlier post, outgoing server (SMTP) will not accept localhost type addresses. In any case, if it did, how would I authenticate to my mail server, which is smtp.btinternet.com?
I need to authenticate to smtp.btintenet.com VIA localhost:9999 don't I? Can be on a connection by connection basis but not a requirement.

peterleinchen 2013-07-03 15:06

Re: Send all 'modest' (email) via my ssh tunnel.
 
Do not use "connection specific" smtp server configuration (if I understood you correctly), but direct configuration entries in modest.
Use 127.0,0.1 (localhost may not work) and 9999.

When you connect to your home ssh via
ssh -L 9999:smtp.btinternet.com:25 your.Server.ssh
then the local port 9999 will be forwarded to extern IP (smtp.btinternet.com) and extern port number 25. Of course this must be open accessible on your home server.

Authentication will just occur as normal, only forwarded/transported via your home server.

I did not do that, so this is just to be proven.
Do you have a SSH server on your home?

macey 2013-07-03 15:17

Re: Send all 'modest' (email) via my ssh tunnel.
 
Quote:

Originally Posted by peterleinchen (Post 1356527)
............Authentication will just occur as normal, only forwarded/transported via your home server.

I did not do that, so this is just to be proven.
Do you have a SSH server on your home?

That makes sense! Thanks. Yes, I do run a server. A raspberry Pi.
Thanks again, confident that this will work...
I will let you know.

peterleinchen 2013-07-03 15:28

Re: Send all 'modest' (email) via my ssh tunnel.
 
Quote:

Originally Posted by macey (Post 1356530)
Yes, I do run a server. A raspberry Pi.

Ah uh, sounds like you know what we are talking about :D

Quote:

Originally Posted by macey (Post 1356530)
I will let you know.

Please do so.

If it works, you may also try to configure this only for "specific connections". Never used that so I am/was unsure...
Later on you may also try to fetch mails via
-R 110:pop.btinternet.com:9090 home.ssh
and configuring modest to fetch from 127.0.0.1 and port 9090 ...

macey 2013-07-03 15:30

Re: Send all 'modest' (email) via my ssh tunnel.
 
:):)At last!.
Works a treat.
Thank you very much!:):)


All times are GMT. The time now is 19:43.

vBulletin® Version 3.8.8