maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [N900] Make modest only download e-mail updates from certain connections. (https://talk.maemo.org/showthread.php?t=86590)

sixwheeledbeast 2012-09-04 17:05

[N900] Make modest only download e-mail updates from certain connections.
 
Well, the questions all in the thread title really.

It would be ideal from a security POV not to have modest download mail from every AP on my device.

Would it be possible to only allow modest to update from say my home and work connections.

sifo 2012-09-04 17:18

Re: [N900] Make modest only download e-mail updates from certain connections.
 
looking forward for a solution, as i really need this :)

./sifo

reinob 2012-09-05 07:56

Re: [N900] Make modest only download e-mail updates from certain connections.
 
This was actually possible with Symbian :)

Anyway, one possibility (which I haven't tested) would be to use an ifup script (or use dbuscron or dbusscripts) to kill modest if the active connection is not present in a given list (of "authorized" SSIDs).

peterleinchen 2012-09-05 21:44

Re: [N900] Make modest only download e-mail updates from certain connections.
 
I would propose also an ifup script checking the ssid and then look to get the automatic checks set to NULL (do not know yet, nothing in phone_control, maybe check with gconf). As just killing modest will not help, it will arise out of the ashes and update again.

reinob 2012-09-06 07:35

Re: [N900] Make modest only download e-mail updates from certain connections.
 
He, I actually wrote about this already (here: http://talk.maemo.org/showpost.php?p...9&postcount=12).

The ifup/dbus script would decide which update_interval to apply (don't know if "0" means "disabled", but it can be easily tested), and then execute:

$ gconftool -s /apps/modest/update_interval -t int $INTERVAL

I'll test the gconftool entry (manually). The dbus/ifup scripting should be "easy" enough..

reinob 2012-09-06 07:43

Re: [N900] Make modest only download e-mail updates from certain connections.
 
OK. No need to touch the update_interval.

The script would do something like this:

1. decide whether to enable or disable automatic updates
2. set AUTO_UPDATE accordingly ("true" or "false")
3. execute
$ gconftool -s /apps/modest/auto_update -t bool $AUTO_UPDATE

(optional)
4. if/as wished, set a custom update_interval according to the AP/SSID
$ gconftool -s /apps/modest/update_interval -t int $MINUTES

Note that this will not affect Nokia Messaging in any way, in case you're using it (I use standard IMAP for some accounts and Nokia Messaging for other accounts).

vi_ 2012-09-06 09:59

Re: [N900] Make modest only download e-mail updates from certain connections.
 
Quote:

Originally Posted by peterleinchen (Post 1261807)
I would propose also an ifup script checking the ssid and then look to get the automatic checks set to NULL (do not know yet, nothing in phone_control, maybe check with gconf). As just killing modest will not help, it will arise out of the ashes and update again.

I came here to say this. Well done pete.

I use this to change wifi power on certain networks:

Code:

cat /etc/network/if-up.d/50_wifiscripts
#!/bin/sh
essid=$(iwgetid -s)

if [ "$essid" == "home" ]; then
        iwconfig wlan0 txpower 4
        echo $essid
elif [ "$essid" == "work" ]; then
        iwconfig wlan0 txpower 6
fi

Combine the above with a gconf toggle as suggested and done.

peterleinchen 2012-09-06 19:58

Re: [N900] Make modest only download e-mail updates from certain connections.
 
Quote:

Originally Posted by vi_ (Post 1262075)
I came here to say this. Well done pete.

Uh oh, I feel honored. :D

But in fact input came from reinob.
Take above ifup script from vi_ and combine with reinob's finding about modest's gconf settings and you are done.
Nice one. But as I always use secured IMAP accounts, I do not feel the need to use...

Quote:

Originally Posted by vi_ (Post 1262075)
Code:

essid=$(iwgetid -s)

Just keep in mind when using vi_s proposal, that 'iwgetid -s' strips blanks and special chars from your SSID. So either take care or use 'iwgetid -r'.

sixwheeledbeast 2012-09-06 20:19

Re: [N900] Make modest only download e-mail updates from certain connections.
 
Quote:

Originally Posted by peterleinchen (Post 1262352)
But as I always use secured IMAP accounts, I do not feel the need to use...

I never even thought about this.
I use POP with secure authentication, so I shouldn't need to worry about it. :)

Useful to know it's possible if I wanted to.
Thanks all.

peterleinchen 2012-09-06 20:35

Re: [N900] Make modest only download e-mail updates from certain connections.
 
Ah, cmon.
Now you do need to use it! ;)

It is not only about secure authentication, but also about secure connection. Depending on if you need only your password protected or also whole data transfer.


All times are GMT. The time now is 08:05.

vBulletin® Version 3.8.8