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

fetchmail and ssh



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.


Reply to: