[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

.fetchmailrc tricks (was Re: fetchmail: blatantly violates RFC's ...)



Joseph Carter <knghtbrd@debian.org> writes:

> On Thu, Feb 11, 1999 at 12:18:46PM +0100, Stephane Bortzmeyer wrote:
> > - allows you to use SSH (fetchmail cannot),
> 
> poll <my mailserver> via localhost protocol pop3 port 1234:
>         username knghtbrd is knghtbrd
>         password <my passwd> fetchall no mimedecode;
>         preconnect "ssh -l knghtbrd -C -f -L 1234:mail.novare.net:110
> mail.novare.net sleep 20 </dev/null >/dev/null";
> 
> 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...


Reply to: