For some reason, if fetchmail reads its configuration from a standard
input "here-is" document rather than a file, it becomes incompatible
with the `plugin' feature, causing it to hang.
I had previously gotten the here-is doc method to work by using
`preconnect' to start the ssh session through a port forward rather
than via `plugin' (example not included), so I think use of the
here-is document is fine otherwise.
Please e-mail me if you have any further questions.
- Good luck and thanks for use of such a great program...
Scott Williams
----------------------------------------------------------------------
uname -a:
NetBSD scotts 1.5 NetBSD 1.5 (GENERIC) #1: Sun Nov 19 21:42:11 MET 2000
fvdl(_at_)sushi:/work/trees/netbsd-1-5/sys/arch/i386/compile/GENERIC
i386
----------------------------------------------------------------------
The following hangs with:
fetchmail: 5.8.3 querying public.james.com (protocol IMAP) at Sun May 20
13:20:37 2001
fetchmail: running /usr/bin/ssh -l scott %h /usr/local/imap/bin/imapd (host
public.james.com service imap)
----------------------------------------------------------------------
#!/usr/pkg/bin/bash
export PATH="/usr/pkg/bin:/sbin:/usr/sbin:/bin:/usr/bin"
fetchmail -v -v --nodetach -f - <<EOF
set no bouncemail
poll public.james.com with proto IMAP
plugin "/usr/bin/ssh -l scott %h /usr/local/imap/bin/imapd"
preauthenticate ssh
no dns
envelope "Envelope-to:"
options
fetchall
no keep
no mimedecode
expunge 10
EOF
----------------------------------------------------------------------
The following seems to work fine:
----------------------------------------------------------------------
#!/usr/pkg/bin/bash
export PATH="/usr/pkg/bin:/sbin:/usr/sbin:/bin:/usr/bin"
umask 077
FETCH_CONFIG=/tmp/fetchmail-config.tmp.$$
cat >$FETCH_CONFIG <<EOF
# set syslog
# set daemon 900
# set postmaster "jette"
set no bouncemail
poll public.james.com with proto IMAP
plugin "/usr/bin/ssh -l scott %h /usr/local/imap/bin/imapd"
preauthenticate ssh
no dns
envelope "Envelope-to:"
options
fetchall
no keep
# keep
no mimedecode
expunge 10
EOF
#fetchmail -f $FETCH_CONFIG
fetchmail -v -v --nodetach -f $FETCH_CONFIG
rm -fr $FETCH_CONFIG
----------------------------------------------------------------------