fetchmail and imap help
Andrej Marjan
andrej-igvx78u1SeH3fQ9qLvQP4Q at public.gmane.org
Mon Oct 17 15:30:11 UTC 2011
On a general note, why not just copy the spool file locally and then inject
it locally? Why spin up an IMAP server just to, in effect, copy
/var/spool/mail/neil locally and then run procmail on it?
On Sun, Oct 16, 2011 at 10:39 AM, Neil Watson <tlug-neil-8agRmHhQ+n2CxnSzwYWP7Q at public.gmane.org>wrote:
> My goal is to have fetchmail get email from a remote imap server (Dovecot)
> over ssh. Here's what I have done:
> In my remote account I created dovecot.conf:
> listen = 127.0.0.1
> protocols = imap
> ssl = no
> mail_location = /var/spool/mail/%u
> listen = 127.0.0.1:1143
>
Probably doesn't matter but you have two listen settings there.
> auth default {
> mechanisms=plain
> passdb pam {
> } userdb passwd {
> } user=root
> } base_dir = /home/neil/tmp/
> login_dir = /home/neil
> login_user = neil
> login_chroot = no
>
> Install public ssh key to mail server. Add command to key before
> "ssh..."
> command="/usr/sbin/dovecot -c /home/neil/dovecot.conf --exec-mail
> imap",no-port-forwarding,no-agent-forwarding
> On client install procmail and fetchmail. Fetchmailrc:
> poll 127.0.0.1 with proto IMAP preauth ssh and port 1143:
> plugin "ssh check-mail > /dev/null"
> mda '/usr/bin/procmail -d %T'
>
> There seems to be some issues with deleting and fetching that are too
> random for me to pin down.
> fetchmail: IMAP> A0003 EXPUNGE
> fetchmail: IMAP< A0003 OK Expunge completed.
> fetchmail: IMAP> A0004 SEARCH UNSEEN
> fetchmail: IMAP< * SEARCH
> fetchmail: IMAP< A0004 OK Search completed (0.000 secs).
> 3 messages (3 seen) for neil at 127.0.0.1.
> skipping message neil-savSHZN5Fh8qMp+WYRx65w at public.gmane.org:1 not flushed
> skipping message neil-savSHZN5Fh8qMp+WYRx65w at public.gmane.org:2 not flushed
> skipping message neil-savSHZN5Fh8qMp+WYRx65w at public.gmane.org:3 not flushed
> fetchmail: IMAP> A0005 LOGOUT
> fetchmail: IMAP< * BYE Logging out
> fetchmail: IMAP< A0005 OK Logout completed.
> fetchmail: 6.3.18 querying 127.0.0.1 (protocol IMAP) at Sat 15 Oct 2011
> 03:45:23 PM EDT: poll completed
> fetchmail: normal termination, status 1
>
> and this:
> neil at pluto:~$ fetchmail -a
> 3 messages for neil at 127.0.0.1.
> reading message neil-savSHZN5Fh8qMp+WYRx65w at public.gmane.org:1 of 3 (600 header octets) (8 body octets)
> flushed
> fetchmail: mail expunge mismatch (0 actual != 1 expected)
> fetchmail: client/server synchronization error while fetching from
> neil-savSHZN5Fh8qMp+WYRx65w at public.gmane.org
> fetchmail: Query status=7 (ERROR)
>
> Any and all suggestions welcome.
>
It seems like there are a ton of automation steps in there without
intermediate testing. Do all the constituent parts work individually? For
instance, if you ssh into the remote host by hand, forwarding port 1143, and
then run dovecot by hand, does that work with fetchmail? How about other
IMAP clients?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gtalug.org/pipermail/legacy/attachments/20111017/049ae704/attachment.html>
More information about the Legacy
mailing list