fetchmail and imap help

Neil Watson tlug-neil-8agRmHhQ+n2CxnSzwYWP7Q at public.gmane.org
Sun Oct 16 14:39:11 UTC 2011


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

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. 

-- 
Neil Watson
Linux/UNIX Consultant
http://watson-wilson.ca
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list