On Sun, Jul 06, 2003 at 11:08:40PM -0400, Emma Jane Hogbin wrote: | I'm in the process of setting up port forwarding to bypass my spam-crazy | ISP. I've got everything working, but I'd like to try putting the port | forwarding information into .fetchmailrc. | | Right now I run from the command line: | ssh my.mail.host -L 8025:localhost:25 | works great. Except I now have a terminal window that I can't close.
Unless you background it :-). | http://www.tldp.org/HOWTO/mini/Secure-POP+SSH-2.html | suggests forking ssh into the background with the following: | ssh -C -f popserver -L 11110:popserver:110 sleep 5 | does this mean that I'm doing port forwarding for 5 seconds? Yes. The assumption is that fetchmail will be done popping the mail within the 5 seconds, so that is long enough for the ssh process to exist. [...] | | I'd like to be able to have fetchmail set up my OUTGOING SMTP port | forwarding. This part I don't understand. fetchmail isn't related to outgoing smtp at all. It is only for retrieving mail from an existing pop/imap mailbox. | Here are my config files: | poll mailbox41.utcc.utoronto.ca | user 'ej.hogbin' there with password '*****' is 'ej.hogbin' fetchall | preconnect "ssh -f home.samurai.com -L 8025:localhost:25 sleep 1000" If you want to tunnel the POP connection, you need to tell fetchmail to connect to the local end of the tunnel. For example, this works : poll localhost protocol pop3 port 1234 user "dhudson" , password "***". is "dman" here. options fetchall , stripcr , mda "/usr/sbin/sendmail %T" , preconnect "ssh -f -L 1234:localhost:110 popserver sleep 15" then I have this crontab entry to go with it : # Every 10 minutes 0,10,20,30,40,50 * * * * fetchmail --silent | But I don't want to have to enter my password.... Use public key authentication. PubkeyAuthentication is part of ssh and not directly related to fetchmail, which is why you won't find an explanation of it in fetchmail docs. Look for ssh docs to find info. -D -- Reckless words pierce like a sword, but the tongue of the wise brings healing. Proverbs 12:18 http://dman13.dyndns.org/~dman/
pgp00000.pgp
Description: PGP signature