they fix imapd yet?

other before (this email was downloaded again, after in webmail I random click on old emails in webmail)

Code:
From [email][email protected][/email] Tue Aug 30 14:30:37 2005
Return-path: <[email protected]>
Envelope-to: [email][email protected][/email]
Delivery-date: Tue, 30 Aug 2005 14:30:37 +0200
Received: from mail by serveur.hollinae.com with spam-scanned (Exim 4.52)
	id 1EA5G8-0005Vu-FR
	for [email][email protected][/email]; Tue, 30 Aug 2005 14:30:37 +0200
Received: from jbmc-software.com ([216.194.67.119])
	by serveur.hollinae.com with esmtps (TLSv1:DES-CBC3-SHA:168)
	(Exim 4.52)
	id 1EA5G8-0005Vn-0Q
	for [email][email protected][/email]; Tue, 30 Aug 2005 14:30:36 +0200
Received: from apache by jbmc-software.com with local (Exim 4.50)
	id 1EA5Cw-0003pb-SX
	for [email][email protected][/email]; Tue, 30 Aug 2005 06:27:18 -0600
To: [email][email protected][/email]
Subject: Reply to post 'AwStats plugin for DA [Still in BETA]'
From: "DirectAdmin Forums Mailer" <[email protected]>
Message-Id: <[email protected]>
Date: Tue, 30 Aug 2005 06:27:18 -0600
X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on 
	serveur.hollinae.com
X-Spam-Level: 
X-Spam-Status: No, score=0.0 required=5.0 tests=AWL autolearn=ham 
	version=3.0.3
Status: O
X-Status: 
X-Keywords:                  
X-UID: 15


After

Code:
From [email][email protected][/email] Tue Aug 30 14:30:37 2005
Return-path: <[email protected]>
Envelope-to: [email][email protected][/email]
Delivery-date: Tue, 30 Aug 2005 14:30:37 +0200
Received: from mail by serveur.hollinae.com with spam-scanned (Exim 4.52)
	id 1EA5G8-0005Vu-FR
	for [email][email protected][/email]; Tue, 30 Aug 2005 14:30:37 +0200
Received: from jbmc-software.com ([216.194.67.119])
	by serveur.hollinae.com with esmtps (TLSv1:DES-CBC3-SHA:168)
	(Exim 4.52)
	id 1EA5G8-0005Vn-0Q
	for [email][email protected][/email]; Tue, 30 Aug 2005 14:30:36 +0200
Received: from apache by jbmc-software.com with local (Exim 4.50)
	id 1EA5Cw-0003pb-SX
	for [email][email protected][/email]; Tue, 30 Aug 2005 06:27:18 -0600
To: [email][email protected][/email]
Subject: Reply to post 'AwStats plugin for DA [Still in BETA]'
From: "DirectAdmin Forums Mailer" <[email protected]>
Message-Id: <[email protected]>
Date: Tue, 30 Aug 2005 06:27:18 -0600
X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on 
	serveur.hollinae.com
X-Spam-Level: 
X-Spam-Status: No, score=0.0 required=5.0 tests=AWL autolearn=ham 
	version=3.0.3
Status: RO
X-Status: 
X-Keywords:                 
X-UID: 15
 
The first before/after looks like the UID changed and that would cause it to be redownloaded. The second one, I only see the Status changing. That shouldn't have caused it to be redownload with the patch. When I have more time I will see what else can cause this.
 
toml said:
The first before/after looks like the UID changed and that would cause it to be redownloaded.

I think X-UID changed because I received an other email, and it's like an index ? All my mails, when i receive new emails, have +1 on its X-UID
 
I just noticed that Outlook has a debug option to trace the POP3 protocol. I will give that a try and see why it thinks it needs to redownload the messages. It has to be the uidl that changed, and that is what that patch was supposed to fiix. I will let you know what I find.
 
toml said:
I just noticed that Outlook has a debug option to trace the POP3 protocol. I will give that a try and see why it thinks it needs to redownload the messages. It has to be the uidl that changed, and that is what that patch was supposed to fiix. I will let you know what I find.

I can confirm the same problems on a NON-DA server with courrier-imap, QMAIL, pop3d
 
One more try :-)

OK, try this patch, it does two things. The first is to ignore all X- headers, since imap and other things will modify them. The other thing it does, is always marks the IMAP system message as uidl 0, so that it won't keep downloading that message. That particular message changes constantly and would be downloaded almost every time. I tested with Outlook Express and it was not redownloading my messages that I was reading with Squirrelmail (although I think any IMAP client would have sufficed).

Please let me know if this one works.

Thanks,

Tom
 

Attachments

This one is just a little more complete. As I said before it always returns the same uidl for the IMAP message, so it should only download it once, plus it should take care of all the headers I might have missed before. It does have to be applied to an original extra.c, so if you already patched, you would need to unpatch it first before applying this one.
 
Do we need to patch this ourself always , or is DA gone change this in their source code ???

Because i need to pathc this on a debian(3.1) box , and if i follow all the steps it gives a error patching the file, asking for the location:

root@localhost:/usr/src/misc/da_vm-pop3d-1.1.7f# patch -p0 < vmpop3d.patch
missing header for unified diff at line 11 of patch
can't find file to patch at input line 11
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -urN da_vm-pop3d-1.1.7f.orig/extra.c da_vm-pop3d-1.1.7f/extra.c ---
|da_vm-pop3d-1.1.7f.orig/extra.c 2005-01-17 11:13:17.000000000 -0700 +++
|da_vm-pop3d-1.1.7f/extra.c 2005-09-03 10:20:52.000000000 -0700 @@ -255,6
|+255,7 @@
| unsigned int max_count = 0;
| /* start with 1 because first line of mbox is From */
| int empty_line = 1, line_count = 0, len = 0; + int imap_header = 0;
|
| struct md5_ctx md5context;
|
--------------------------
File to patch:
 
Last edited:
jerry2005 said:

root@localhost:/usr/src/misc/da_vm-pop3d-1.1.7f# patch -p0 < vmpop3d.patch
The patch command should not be executed in the the da_vm-pop3d-1.1.7f directory. You should be in /usr/src/misc when using the command.
 
Same problem:



root@localhost:/usr/src/misc# patch -p0 < vmpop3d.patch
missing header for unified diff at line 11 of patch
can't find file to patch at input line 11
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -urN da_vm-pop3d-1.1.7f.orig/extra.c da_vm-pop3d-1.1.7f/extra.c ---
|da_vm-pop3d-1.1.7f.orig/extra.c 2005-01-17 11:13:17.000000000 -0700 +++
|da_vm-pop3d-1.1.7f/extra.c 2005-09-03 10:20:52.000000000 -0700 @@ -255,6
|+255,7 @@
| unsigned int max_count = 0;
| /* start with 1 because first line of mbox is From */
| int empty_line = 1, line_count = 0, len = 0; + int imap_header = 0;
|
| struct md5_ctx md5context;
|
--------------------------
File to patch:
 
I tested the patch prior to uploading it. You can always patch by hand. It is not that much code to change. Where you see a line beginning with a - it means that line was deleted, lines with + mean that line was added. All other lines are there for finding the correct placement for the code, if the line numbers don't match up. The file that was patched was the extra.c.
 
Okay next attempt:

root@localhost:/usr/src/misc# patch -p0 < vmpop3d.patch
missing header for unified diff at line 11 of patch
can't find file to patch at input line 11
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -urN da_vm-pop3d-1.1.7f.orig/extra.c da_vm-pop3d-1.1.7f/extra.c ---
|da_vm-pop3d-1.1.7f.orig/extra.c 2005-01-17 11:13:17.000000000 -0700 +++
|da_vm-pop3d-1.1.7f/extra.c 2005-09-03 10:20:52.000000000 -0700 @@ -255,6
|+255,7 @@
| unsigned int max_count = 0;
| /* start with 1 because first line of mbox is From */
| int empty_line = 1, line_count = 0, len = 0; + int imap_header = 0;
|
| struct md5_ctx md5context;
|
--------------------------
File to patch: /usr/src/misc/da_vm-pop3d-1.1.7f/extra.c
patching file /usr/src/misc/da_vm-pop3d-1.1.7f/extra.c
patch: **** malformed patch at line 16: /* we have the imap header message */ +
} +


again he asked for the file location so i give him the target location /usr/src/misc/da_vm-pop3d-1.1.7f/extra.c but i am worried about that last line :

patch: **** malformed patch at line 16: /* we have the imap header message */ +
} +


Is this a error message ? if so what do i need to do to solve it.
 
Last edited:
Which patch file did you download in this thread? The first one had some problems due to tabs and spaces being different, the second one I know worked, since I tested before posting. As I said, there are only a few lines that need changing, it can be done by hand.

Just make sure that you downloaded the one from this page, and not page 2 in the thread. I just updated that download in page 2 to be the same as this one, just so if it is downloaded, it should stilll work.
 
I am still fighting with this patch:

root@localhost:/usr/src/misc# patch -p0 < vmpop3d.patch
patching file da_vm-pop3d-1.1.7f/extra.c
Hunk #1 FAILED at 255.
Hunk #2 FAILED at 283.
Hunk #3 succeeded at 331 (offset 4 lines).
Hunk #4 succeeded at 347 (offset 4 lines).
2 out of 4 hunks FAILED -- saving rejects to file da_vm-pop3d-1.1.7f/extra.c.rej


Output of the extra.c.rej:


***************
*** 255,260 ****
unsigned int max_count = 0;
/* start with 1 because first line of mbox is From */
int empty_line = 1, line_count = 0, len = 0;

struct md5_ctx md5context;

--- 255,261 ----
unsigned int max_count = 0;
/* start with 1 because first line of mbox is From */
int empty_line = 1, line_count = 0, len = 0;
+ int imap_header = 0;

struct md5_ctx md5context;

***************
*** 282,287 ****
while (strchr(buf, '\n') == NULL)
fgets(buf, FREAD_SIZE, mbox); /* get all of From line */

if (num_messages > 0) { /* another message */
md5_finish_ctx(&md5context, messages[num_messages - 1].uidl);
}
--- 283,292 ----
while (strchr(buf, '\n') == NULL)
fgets(buf, FREAD_SIZE, mbox); /* get all of From line */

+ if(!imap_header && strstr(buf,"MAILER-DAEMON")) {
+ imap_header = 1; /* we have the imap header message */
+ }
+
if (num_messages > 0) { /* another message */
md5_finish_ctx(&md5context, messages[num_messages - 1].uidl);
}

Dont look at the spaces because copy paste destroys that.....

I am now gone adjust the extra.c file manually .... and try to compile , but i dont think its gone work....
 
Adjusted it manually and it did compile succesfully , now testing..


Okay i have now the test results:

On the client side outlook or something the first time a user downloads his mail he gets all his mail duplicate, but this user leaves a copy on the server for 30 days , so all the mails beeing re-downloaded again. After this i tested it by reading mail threw webmail , download it with outlook , and again webmail. So far no problems.

Can someone confirm this behavior that all remaining e-mails are downloaded again ?
 
Last edited:
Back
Top