is it possible to ssh one distant machine, create a tunnel (smtp for ex) and then back to mail application, use this tunnel to send emails (wifi via smtp and tunnel)?

Rk: i can do the tunnel ssh -N -f [email protected] -L1025:mailhost.math.jussieu.fr:25 sleep 60 for example, but i don't even know (i suspect this is yes) if it stays open when i go back to mail...

Thanks for any help,