Re: .fetchmailrc tricks (was Re: fetchmail: blatantly violates RFC's ...)
On Thu, Feb 11, 1999 at 08:37:13AM -0500, Daniel Martin wrote:
> > The above is a little strange IMO, but it works.
>
> It can even get stranger if you don't have passwordless access: (for
> example, if you're dealing with an admin who has turned off
> passwordless ssh because it interferes with the way they disable
> expired accounts)
>
> poll jhunix.hcf.jhu.edu via localhost port 4802 proto imap
> user dtm12 with password MyPassWD is martind here
> preconnect "expect -c \x27log_user 0; spawn -noecho ssh -L 4802:localhost:143 jhunix.hcf.jhu.edu sh -c \x22echo ready;sleep 20\x22; expect \x22dtm12@jhunix.hcf.jhu.edu*password: \x22; send \x22MyPassWD\x5Cr\x22; expect \x22ready\x22; if [fork]!=0 {exit;} disconnect; set timeout -1; expect eof;\x27"
>
> Yes, that's all one line. I'm probably escaping more things than I
> need to there, but it works too...
Just write a shell script already, eesh! =>
--
Anticipation is the sweetest form of torture...
Reply to: