From: Matthias A. <mat...@gm...> - 2005-11-16 04:25:24
|
Derek Broughton <au...@po...> writes: > Due to "issues" with the $%^*!@# firewall at my client's site, I can't get > out to my mailbox, directly. So, I'm trying to use fetchmail via ssh in > two hops. This works from home: > poll pointerstop.ca with proto imap > plugin "ssh pointers@%h /usr/sbin/imapd" auth ssh > user "pointers" > > and this works (as user fetchmail) from the client's site: > ssh de...@io... \ > 'ssh poi...@po... /usr/sbin/imapd' > and seems to meet the criteria for a plugin: I can give it imap commands on > stdin and get results on stdout. The ssh keys are configured correctly so > that no passwords are requested. > > But this doesn't: > poll pointerstop.ca with proto imap > plugin "ssh de...@io... \ > 'ssh poi...@po... /usr/sbin/imapd'" > auth ssh > user "pointers" > > Syslog shows: > socket error while fetching from pointerstop.ca > > What am I doing wrong? Is there some really good reason why I can't > do it? Yes. Line breaks within strings are evil, regardless of the backslash. I'd say you have hit a bug in fetchmail's configuration file parser. You can see this when running "fetchmail --configdump | grep -w plugin" and I bet io.acad... doesn't like \n for a command. For the nonce, write the plugin command on a single line and it should work (I hope your mailer doesn't wrap this..., it's one line for poll, one for plugin, one for auth, one for user, totalling four (4)). poll pointerstop.ca with proto imap plugin "ssh de...@io... 'ssh poi...@po... /usr/sbin/imapd'" auth ssh user "pointers" And this is the --configdump excerpt as shown above: Original (the version you posted): "plugin":"ssh de...@io... \n 'ssh poi...@po... /usr/sbin/imapd'", ==== Revised (my version): "plugin":"ssh de...@io... 'ssh poi...@po... /usr/sbin/imapd'", This may come as a surprise, and is inconsistent with parsing outside strings where the backslash at the very end of a line will be silently ignored, and line feeds can be embedded with \n anyhow, so I'll change this for fetchmail 6.3.0. (Cc:ing fetchmail-devel so that Sunil can comment :-) -- Matthias Andree |