|
From: Ratan N. <nal...@ya...> - 2006-04-21 05:31:52
|
Hi
I read the FAQ, man pages and tried several settings to solve a
simple problem "how to retain Seen flag when fetching mail with
fetchmail" and met with complete failure.
The problem is that when I read the mail on the server using
elm, mailx, or squrrelmail, they all agree on what message is
previously read and what is not. However, when I fetch the mail
using fetchmail, those status bits are disappearing. I am
attaching my .fetchmailrc, the contents of the mailbox before
the fetchmail, output of "fetchmail -v -v", and the mailbox
after the mail is fetched. Any help is welcome.
Thanks!
Ratan
============== .fetchmairc ===========
set postmaster "ratan"
set bouncemail
set no spambounce
set properties ""
defaults mda "/usr/bin/procmail -d %T"
poll bitter
plugin "env -u DISPLAY /home/ratan/bin/%h exec
/usr/local/bin/imapd" auth ssh;
user 'ratan' there is 'ratan' here
expunge 10
options fetchall
mda "cat >> /home/ratan/TEST"
======= mailbox before fetchmail =====
$ cat /var/mail/ratan
>From ra...@cu... Thu Apr 20 10:03:13 2006
Return-Path: <ra...@cu...>
Received: (from ratan@localhost)
by bitter.cup.hp.com (8.11.1/8.11.1) id k3KH3D606424
for ratan; Thu, 20 Apr 2006 10:03:13 -0700 (PDT)
Date: Thu, 20 Apr 2006 10:03:13 -0700 (PDT)
From: Ratan Nalumasu <ra...@cu...>
Message-Id: <200...@bi...>
To: ra...@bi...
Subject: mark this message as seen
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Status: RO
asdfasdf
>From ra...@cu... Thu Apr 20 10:03:22 2006
Return-Path: <ra...@cu...>
Received: (from ratan@localhost)
by bitter.cup.hp.com (8.11.1/8.11.1) id k3KH3Mm06429
for ratan; Thu, 20 Apr 2006 10:03:22 -0700 (PDT)
Date: Thu, 20 Apr 2006 10:03:22 -0700 (PDT)
From: Ratan Nalumasu <ra...@cu...>
Message-Id: <200...@bi...>
To: ra...@bi...
Subject: NEW message
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Status: O
========== fetchmail -v -v =======
$ fetchmail -v -v
fetchmail: 6.2.5.2 querying bitter (protocol auto) at Thu 20 Apr
2006 10:06:13 AM PDT: poll started
fetchmail: 6.2.5.2 querying bitter (protocol IMAP) at Thu 20 Apr
2006 10:06:13 AM PDT: poll started
fetchmail: running env -u DISPLAY /home/ratan/bin/%h exec
/usr/local/bin/imapd (host bitter service 143)
fetchmail: IMAP< * PREAUTH [CAPABILITY IMAP4REV1 LITERAL+ IDLE
NAMESPACE MAILBOX-REFERRALS BINARY UNSELECT SCAN SORT
THREAD=REFERENCES THREAD=ORDEREDSUBJECT MULTIAPPEND]
Pre-authenticated user ratan bitter.cup.hp.com IMAP4rev1
2004.352 at Thu, 20 Apr 2006 10:06:17 -0700 (PDT)
fetchmail: IMAP> A0001 CAPABILITY
fetchmail: IMAP< * CAPABILITY IMAP4REV1 LITERAL+ IDLE NAMESPACE
MAILBOX-REFERRALS BINARY UNSELECT SCAN SORT THREAD=REFERENCES
THREAD=ORDEREDSUBJECT MULTIAPPEND SASL-IR LOGIN-REFERRALS
STARTTLS LOGINDISABLED
fetchmail: IMAP< A0001 OK CAPABILITY completed
fetchmail: Protocol identified as IMAP4 rev 1
fetchmail: selecting or re-polling default folder
fetchmail: IMAP> A0002 SELECT "INBOX"
fetchmail: IMAP< * 0 EXISTS
fetchmail: IMAP< * 2 EXISTS
fetchmail: IMAP< * NO Mailbox vulnerable - error creating
/var/mail/ratan.lock: No such file or directory
fetchmail: IMAP< * 0 RECENT
fetchmail: IMAP< * OK [UIDVALIDITY 1124412405] UID validity
status
fetchmail: IMAP< * OK [UIDNEXT 25193] Predicted next UID
fetchmail: IMAP< * FLAGS (\Answered \Flagged \Deleted \Draft
\Seen)
fetchmail: IMAP< * OK [PERMANENTFLAGS (\* \Answered \Flagged
\Deleted \Draft \Seen)] Permanent flags
fetchmail: IMAP< * OK [UNSEEN 2] first unseen message in
/home/ratan/mail/mbox
fetchmail: IMAP< A0002 OK [READ-WRITE] SELECT completed
fetchmail: 2 messages waiting after first poll
fetchmail: IMAP> A0003 EXPUNGE
fetchmail: IMAP< A0003 OK No messages deleted, so no update
needed
fetchmail: 2 messages waiting after expunge
2 messages for ratan at bitter.
fetchmail: IMAP> A0004 FETCH 1:2 RFC822.SIZE
fetchmail: IMAP< * 1 FETCH (RFC822.SIZE 491)
fetchmail: IMAP< * 2 FETCH (RFC822.SIZE 467)
fetchmail: IMAP< A0004 OK FETCH completed
fetchmail: IMAP> A0005 FETCH 1 RFC822.HEADER
fetchmail: IMAP< * 1 FETCH (RFC822.HEADER {481}
reading message ra...@bi...:1 of 2 (481 header
octets)
About to rewrite Return-Path: <ra...@cu...>
Rewritten version is Return-Path: <ra...@cu...>
About to rewrite From: Ratan Nalumasu <ra...@cu...>
Rewritten version is From: Ratan Nalumasu <ra...@cu...>
About to rewrite To: ra...@bi...
Rewritten version is To: ra...@bi...
fetchmail: about to deliver with: cat >> /home/ratan/TEST
#
fetchmail: IMAP< )
fetchmail: IMAP< A0005 OK FETCH completed
fetchmail: IMAP> A0006 FETCH 1 BODY.PEEK[TEXT]
fetchmail: IMAP< * 1 FETCH (BODY[TEXT] {10}
(10 body octets) *
fetchmail: IMAP< )
fetchmail: IMAP< A0006 OK FETCH completed
flushed
fetchmail: IMAP> A0007 STORE 1 +FLAGS (\Seen \Deleted)
fetchmail: IMAP< * 1 FETCH (FLAGS (\Seen \Deleted))
fetchmail: IMAP< A0007 OK STORE completed
fetchmail: IMAP> A0008 FETCH 2 RFC822.HEADER
fetchmail: IMAP< * 2 FETCH (RFC822.HEADER {467}
reading message ra...@bi...:2 of 2 (467 header
octets)
About to rewrite Return-Path: <ra...@cu...>
Rewritten version is Return-Path: <ra...@cu...>
About to rewrite From: Ratan Nalumasu <ra...@cu...>
Rewritten version is From: Ratan Nalumasu <ra...@cu...>
About to rewrite To: ra...@bi...
Rewritten version is To: ra...@bi...
fetchmail: about to deliver with: cat >> /home/ratan/TEST
#
fetchmail: IMAP< )
fetchmail: IMAP< A0008 OK FETCH completed
fetchmail: IMAP> A0009 FETCH 2 BODY.PEEK[TEXT]
fetchmail: IMAP< * 2 FETCH (BODY[TEXT] "")
(0 body octets)
fetchmail: IMAP< A0009 OK FETCH completed
flushed
fetchmail: IMAP> A0010 STORE 2 +FLAGS (\Seen \Deleted)
fetchmail: IMAP< * 2 FETCH (FLAGS (\Seen \Deleted))
fetchmail: IMAP< A0010 OK STORE completed
fetchmail: selecting or re-polling default folder
fetchmail: IMAP> A0011 EXPUNGE
fetchmail: IMAP< * 1 EXPUNGE
fetchmail: IMAP< * 1 EXPUNGE
fetchmail: IMAP< * 0 EXISTS
fetchmail: IMAP< * 0 RECENT
fetchmail: IMAP< A0011 OK Expunged 2 messages
fetchmail: 0 messages waiting after re-poll
fetchmail: IMAP> A0012 LOGOUT
fetchmail: IMAP< * BYE bitter.cup.hp.com IMAP4rev1 server
terminating connection
fetchmail: IMAP< A0012 OK LOGOUT completed
fetchmail: 6.2.5.2 querying bitter (protocol IMAP) at Thu 20 Apr
2006 10:06:15 AM PDT: poll completed
fetchmail: 6.2.5.2 querying bitter (protocol auto) at Thu 20 Apr
2006 10:06:15 AM PDT: poll completed
fetchmail: not swapping UID lists, no UIDs seen this query
fetchmail: Deleting fetchids file.
fetchmail: normal termination, status 0
fetchmail: Deleting fetchids file.
======= contents of /home/ratan/TEST file as a result of
fetchmail ========
$ cat TEST
Return-Path: <ra...@cu...>
Received: from bitter.cup.hp.com [15.13.188.97]
by localhost with IMAP (fetchmail-6.2.5.2)
for ratan@localhost (single-drop); Thu, 20 Apr 2006
10:06:15 -0700 (PDT)
Received: (from ratan@localhost)
by bitter.cup.hp.com (8.11.1/8.11.1) id k3KH3D606424
for ratan; Thu, 20 Apr 2006 10:03:13 -0700 (PDT)
Date: Thu, 20 Apr 2006 10:03:13 -0700 (PDT)
From: Ratan Nalumasu <ra...@cu...>
Message-Id: <200...@bi...>
To: ra...@bi...
Subject: mark this message as seen
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
asdfasdf
Return-Path: <ra...@cu...>
Received: from bitter.cup.hp.com [15.13.188.97]
by localhost with IMAP (fetchmail-6.2.5.2)
for ratan@localhost (single-drop); Thu, 20 Apr 2006
10:06:15 -0700 (PDT)
Received: (from ratan@localhost)
by bitter.cup.hp.com (8.11.1/8.11.1) id k3KH3Mm06429
for ratan; Thu, 20 Apr 2006 10:03:22 -0700 (PDT)
Date: Thu, 20 Apr 2006 10:03:22 -0700 (PDT)
From: Ratan Nalumasu <ra...@cu...>
Message-Id: <200...@bi...>
To: ra...@bi...
Subject: NEW message
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
|