Hello,
I am currently running fetchmail 5.9.11 on HP-UX11.00.
Fetchmail is starting using the following options :
$ fetchmail -d 120 -e 1 -l 2097152 -B 20 -a -t 60 --smtphost
localhost/4025 --nobounce -v -v \
-f fetchmailrc -L fetchmail.log
The fetchmailrc file contains the single following line :
$ cat fetchmailrc
poll "pop.dummypopserver.com" protocol POP3 port 110 username "username"
password "password" mimedecode forcecr
This kind of configuration used to work fine on a lot of POP servers
and for different email accounts until yesterday.
For the first time, i was faced with an email inbox that contains
this fake message with the X-IMAP header used by IMAP clients to
resynchronize their state from a previous session with the server
(if what i have read on some forums is accurate).
The problem that i have is that fetchmails retrieves this dummy
message and then, decides not to fetch it ('retained'):
see transact.c, function readheaders
/*
* The University of Washington IMAP server (the reference
* implementation of IMAP4 written by Mark Crispin) relies
* on being able to keep base-UID information in a special
* message at the head of the mailbox. This message should
* neither be deleted nor forwarded.
*/
if (num == 1 && !strncasecmp(line, "X-IMAP:", 7)) {
free(line);
free(msgblk.headers);
msgblk.headers = NULL;
return(PS_RETAINED);
}
Because of the -e 1 option given to fetchmail, it issues a QUIT
(this option cannot be changed as I need to protect myself from
line drops) and then reconnects and gets the same dummy message
again and again, never fetching the remaining messages.
My question is the following :
Is there a way, without changing/removing the -e 1 option,
to fetch emails using the POP3 protocol from a mail box in which
the first message is a "dummy X-IMAP message"?.
Another question would be : Is it normal that the POP protocol
shows this dummmy message or should it be hidden to the POP clients?
Below is an example of this fake message that i got by
connecting directly to the pop server :
==========================================================================
$ telnet pop.dummypopserver.com 110
Trying...
Connected to pop.dummypopserver.com.
Escape character is '^]'.
user username
pass password
+OK Example POP server (version 1.1, VS-2) at dummy-mail.com starting.
+OK Password required for username.
+OK username has 8 messages (21603 octets).
LIST
+OK 8 messages (21603 octets)
1 562
2 1056
3 1066
4 1069
5 1119
6 2818
7 2818
8 11095
.
RETR 1
+OK Message follows
Date: 19 Jun 2002 14:32:17 -0700
From: Mail System Internal Data
<MAILER-DAEMON(_at_)smtp-xx-yyy(_dot_)dummy-mail(_dot_)com>
Subject: DON'T DELETE THIS MESSAGE -- FOLDER INTERNAL DATA
Message-ID: <1024768908(_at_)smtp-xx-yyy(_dot_)dummy-mail(_dot_)com>
X-IMAP: 102449987 0000000009
X-UIDL: ZH=e94JW!!R;/e9=0Td9
Status: RO
This text is part of the internal format of your mail folder, and is not
a real message. It is created automatically by the mail system software.
If deleted, important folder data will be lost, and it will be re-created
with the data reset to initial values.
.
QUIT
+OK Pop server at root-mail.com signing off.
Connection closed by foreign host.
==========================================================================
Thank you for your help,
Regards.
Pierre-Michel
__________________________________________________________
Pierre-Michel ANSEL
mailto:pma(_at_)whitepajama(_dot_)com http://www.whitepajama.com
White Pajama Phone:(1) 510-259-2774
24610 Industrial Blvd Fax: (1) 510-723-1158
Hayward, CA, 94545
USA
__________________________________________________________