Multiple retrievals of the same emails



Hi,

I hope someone can help me. Entourage just downloaded all my emails (about
2000) from the server - emails from December that I had already retrieved on
my computer. Why did it do that?!

It's the second or third time it's happened. I have to then organize by
unread - and delete all the emails it just got (and screen the ones that are
from the last 10mins).

Any ideas?

Cheers,
Alastair

On 4/7/05 6:44 PM, in article
1112913861.908060.113940@xxxxxxxxxxxxxxxxxxxxxxxxxxxx, "gg@xxxxxxxxx"
<gg@xxxxxxxxx> wrote:

> The script corrects most of my munged mail... but there are some
> problems:
>
> The first - the time picked up is that in the last received header,
> which is generally the time that the mail hit the first MTA. This is
> great if the broken part of the date is the sent time, but in my case
> the sent time was fine - the received time was b0rked. When Entourage
> crashes with the imap server connected (dovecot 0.99.11), it begins
> re-receiving all of the email but uses the current time as the received
> time. Oddly enough, this became evident after a number of crashes of
> the script on a large group of emails. Examination of the event log led
> to the identification of an apparent flaw in the script:
>
> The header of a typical email that caused a crash, munged for privacy:
>
> Received: from pu.ogauud.com (ns.ogauud.com [x.x.x.x])
> by ogud.com (8.12.11/8.12.11) with ESMTP id j2AGv5qW008089;
> Thu, 10 Mar 2005 11:57:05 -0500 (EST)
> (envelope-from ogauud@xxxxxxxxxx)
>
> resulting in:
>
> "Invalid date and time Thu, 10 Mar 2005 11:57:05 -0500 (EST)
> (envelope-from ogauud@xxxxxxxxxx)."
>
> Another:
>
> Received: by mailagent1.ientrymail.com (PowerMTA(TM) v2.0r1) id
> h5hp7m03us84; Mon, 7 Mar 2005 10:25:47 -0500 (envelope-from
> <1.31684.3132363334303333.1.b@xxxxxxxxxxxxxxxxx>)
>
> Resulting in:
>
> "Invalid date and time Mon, 7 Mar 2005 10:25:47 -0500 (envelope-from
> <1.31684.3132363334303333.1.b@xxxxxxxxxxxxxxxxx>)."
>
> Examining the emails themselves showed clearly that the script was
> looking at the last instance of the Received header (correctly
> obviously, according to Barry's 1.0 script), which is generally the
> first MTA the email hit on it's way out - so more likely the sent
> time, and not the received time in my system. And of course, the odd
> data appended to the headers were the result of non-standard
> configuration of the sending MTA. While my inbound SMTP imap server may
> also be misconfigured, at least it will be consistent ;-). And
> naturally it will have the correct received time. Sort of (more later).
>
>
> So I solved both problems by modifying:
>
> repeat with aHeader in theHeaders
> if aHeader starts with "Received:" then copy contents of
> aHeader to receivedHeader
> end repeat
>
> with
>
> repeat with aHeader in theHeaders
> if aHeader starts with "Received:" then copy contents of
> aHeader to receivedHeader
> if contents of receivedHeader is not "" then exit repeat
> end repeat
>
> That results in the first Received header time being picked up. OK, all
> consistent with Barry.
>
> The next problem (which highlighted a more significant issue) is that
> the script fails when it hits a timestamp that includes that odd
> appendix (envelope-from ogauud@xxxxxxxxxx). I solved that by modifying:
>
> set AppleScript's text item delimiters to {";"}
> set theDate to (last text item of receivedHeader)
> set time received of theMess to date theDate
>
> to
>
> set AppleScript's text item delimiters to {";", "("}
> set theDate to (last text item of receivedHeader)
> set time received of theMess to date theDate
>
> However, it became evident that for some reason the script is not able
> to deal with timezones in the time stamp. So:
>
> Received: from mail pickup service by smtp1.bellevue.com with Microsoft
> SMTPSVC;
> Thu, 7 Apr 2005 12:18:27 -0000 (UTC)
>
> results in the time being corrected to 12:18:27 rather than 05:18:27
> which is correct for my local timezone. I am unable to find any
> references in the Apple Scripting man pages to indicate a mechanism to
> handle timestamps that include an offset. My imap server is set to UTC
> so all timestamps show -0000 (UTC).
>
> In any case, the script solved almost all the problems, and at least
> brought the time stamps within range (+7 hours) ;-)). Thanks!
>

.



Relevant Pages

  • Re: OT: spammers are using my domain again
    ... our virtual hosting servers and boom 150 returned emails from the ... Server load wasn't jumping ... Its a simple script that is written in php and can use a DB to retrieve ... they do anything) and the other hosting company that the file was ...
    (Fedora)
  • connection drops while script running
    ... I have a pretty basic emailing script that sends a relatively small number ... of html emails. ... The emails are compiled, personalised from a mysql db subscribers list, ... a php.ini on an individual directory basis on this server), ...
    (comp.lang.php)
  • Re: deleting emails from server for Exchange accounts
    ... which are normally available for IMAP and POP accounts to leave a copy ... on the server are no where to be seen for Exchange accounts. ... I'll have to tweak how it the script functions but boy does it irk me ... but didn't move any emails to it. ...
    (microsoft.public.mac.office.entourage)
  • Re: URLs mysteriously altered in HTML email
    ... I did argue against HTML emails but the customer is always right eh? ... on the domain server and one to the subscription page (for unsubscribing, ... when the script is operated from my customer's ...
    (comp.lang.php)
  • Re: Reading remote Session ID
    ... require that the IP that makes the request for the page be the same ... capability of the user, if it's a script the js will fail, so require ... I am using the free version of SPAMfighter for private users. ... It has removed 1384 spam emails to date. ...
    (alt.php)