more details alternativeserver-side files for headers the main limitation of the prior section' technique is that it addressed only deletions of already fetched emails to catch other kinds of inbox synchronization errorswe would have to also record headers fetched when the index list page was constructed since the index list page uses url query parameters to record stateadding large header texts as an additional parameter on the urls is not likely viable option in principlethe header text of all mails in the list could be embedded in the index page as single hidden fieldbut this might add prohibitive size and transmission overheads as perhaps more complete approacheach time the mail index list page is generated in onviewpswdsubmit pyfetched headers of all messages could be saved in flat file on the serverwith generated unique name (possibly from timeprocess idand usernamethat file' name could be passed along with message numbers in pages as an extra hidden field or query parameter on deletionsthe header' filename could be used by onviewpageaction py to load the saved headers from the flat fileto be passed to the safe delete call in mailtools on fetchesthe header file could also be used for general synchronization tests to avoid loading and displaying the wrong mail some sort of aging scheme would be required to delete the header save files eventually (the index page script might clean up old files)and we might also have to consider multiuser issues this scheme essentially uses server-side files to emulate pymailgui' in-process memorythough it is complicated by the fact that users may back up in their browser-deleting from view pages fetched with earlier list pagesattempting to refetch from an earlier list page and so on in generalit may be necessary to analyze all possible forward and backward flows through pages (it is essentially state machineheader save files might also be used to detect synchronization errors on fetches and may be removed on deletions to effectively disable actions in prior page statesthough header matching may suffice to ensure deletion accuracy alternativedelete on load as final alternativemail clients could delete all email off the server as soon as it is downloadedsuch that deletions wouldn' impact pop identifiers (microsoft outlook may use this scheme by defaultfor instancehoweverthis requires additional mechanisms for storing deleted email persistently for later accessand it means you can view fetched mail only on the machine to which it was downloaded since both pymailgui and pymailcgi are intended to be used on variety of machinesmail is kept on the pop server by default processing fetched mail