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

Re: fetchmail and ssh



This can besolved by using expect and/or the preconnect option. 
It is described in a thread on debian-devel. So please
search in the mailing list archive of debian-devel for "fetchmail".

TIA,

Jens

Phil Nitschke <phil@caemrad.com.au> writes:

> Hi fetchmail/ssh guru's,
> 
> I connect to work with a ppp session from my Debian/GNU Linux box
> (running potato), and need to fetch my mail from my mail-server there
> (named "harpo"; running SunOS 4.1) using IMAP.
> 
> Previously I have had this working like so:
> 
>   /usr/bin/fetchmail --invisible --syslog --daemon 250 --timeout 90 \ 
>        --interface "ppp0/150.101.132.131" --silent                  \ 
>        --mda "/usr/bin/procmail -Yf- -d %s"                         \ 
>        --folder "/users/phil/.mail/home-xfer"                       \ 
>        harpo
> 
> I run this and then enter my password for my account at work when
> asked for it.
> 
> Now I want to extend this to use ssh, without any passphrase, so that
> I can start fetchmail from an ip-up.d script, and avoid having to
> enter any passwords at all.  I can now do `ssh harpo', and connect
> successfully. 
> 
> After reading the POP3 example in the fetchmail man-pages, I tried it
> like this:
> 
>   /usr/bin/fetchmail --invisible --syslog --daemon 250 --timeout 90 \
>     --silent --mda "/usr/bin/procmail -Yf- -d %s" \
>     --folder "/users/phil/.mail/home-xfer" --verbose harpo 
> 
> With this `~/.fetchmailrc' file:
> poll harpo
>   via localhost port 1234 with protocol imap
>   preconnect "ssh -f -L 1234:harpo:143 harpo sleep 20 < /dev/null >/dev/null";
> 
> However, there are two problems:
> 
> (1) I'm still prompted for a password, and 
> (2) I get this error:
> 
>      4.7.6 querying harpo (protocol IMAP) at Sat Mar 13 01:14:35 1999 
>      socket error while fetching from harpo
>      Query status=2
>      fetchmail: sleeping at Sat, 13 Mar 1999 01:14:40 +1030 (CST)
> 
> Can anyone suggest what I can do to get this going?
> 
> TIA,
> 
> -- 
> Phil.
> 
> 
> -- 
> Unsubscribe?  mail -s unsubscribe debian-user-request@lists.debian.org < /dev/null
> 

-- 
P.S.: Please vote against Spam! At
             http://www.politik-digital.de/spam/
(Sorry Europeans only)
---
Jens.Ritter@weh.rwth-aachen.de   grimaldi@debian.org
Key ID: 2048/E451C639 Jens Ritter
Key fingerprint: 5F 3D 43 1E 24 1E CC 48  1E 05 93 3A A7 10 73 37 


Reply to: