Community Discussions and Support
Mail folder sort problem

[quote user="Brian Fluet"]

This is normal.  What we are trying to confirm is that STATE.PMJ is being updated when you close a folder after making a change to its sort order  I'm guessing that it is since the normal updating at open and close appears to be working.  

[/quote]

Sorry - wrote that around midnight and woke during the night thinking the same.
Yes, closing the folder does change the STATE.PMJ timestamp

[quote user="Brian Fluet"]<p>This is normal.  What we are trying to confirm is that STATE.PMJ is being updated when you close a folder after making a change to its sort order  I'm guessing that it is since the normal updating at open and close appears to be working.   </p><p>[/quote]</p><p>Sorry - wrote that around midnight and woke during the night thinking the same. Yes, closing the folder does change the STATE.PMJ timestamp </p>

I cannot permanently change the sort order of a folder

e.g if I change from 'sort by subject' to 'sort by date' it will correctly show the messages in date order but on closing the folder and reopening it is back to subject order.

I cannot permanently change the sort order of a folder e.g if I change from 'sort by subject' to 'sort by date' it will correctly show the messages in date order but on closing the folder and reopening it is back to subject order.

If you are running in Preview mode check this settings:

Tools | Options | Incoming mail | Preview mode settings | Remember and apply each folder's sort mode separately

<p>If you are running in Preview mode check this settings:</p><p>Tools | Options | Incoming mail | Preview mode settings | Remember and apply each folder's sort mode separately </p>

Another thought is to make sure you don't have a grouped view enabled.  This setting is folder specific.

Another thought is to make sure you don't have a grouped view enabled.  This setting is folder specific.

I am not running in preview mode  or have grouped view enabled. Also the problem seems to apply to every folder  

I am not running in preview mode  or have grouped view enabled. Also the problem seems to apply to every folder  

Are your Pegasus Mail installed under any of those Windows limited access (e.g. %ProgramFolders%) directories? Do you have ativirus action over \.PMAIL and its sub-directories? Seems to me that Pmail is unable to write to its control files.

Are your Pegasus Mail installed under any of those Windows limited access (e.g. %ProgramFolders%) directories? Do you have ativirus action over \.PMAIL and its sub-directories? Seems to me that Pmail is unable to write to its control files.

-- Euler

Pegasus Mail 4.81.1154 Windows 7 Ultimate
IERenderer: 2.7.1.5 AttachMenu: 1.0.1.2
PMDebug: 2.5.8.34 BearHTML 4.9.9.6

Euler makes a good point.  The behaviour is indeed as if Pegasus Mail can't write to its configuration file.

Something else to try:

Open a folder (not the new mail folder) and configure its window size, column widths, and sort order to your liking.  Now go to the Folder pull-down menu and select "Default size and layout > Use this window's layout as default".  That will set the default folder layout.  Close then open the folder.  If the layout didn't stick go again to the Folder pull-down menu and select "Default size and layout > Apply default layout to this message and see if it changes. 

Also open and different folder and see if it opens with the default size and layout.  If not, try applying the default.  If both tests fail then its pretty certain that something is interfering with Pegasus Mail writes to its configuration files.

<p>Euler makes a good point.  The behaviour is indeed as if Pegasus Mail can't write to its configuration file.</p><p>Something else to try:</p><p>Open a folder (not the new mail folder) and configure its window size, column widths, and sort order to your liking.  Now go to the Folder pull-down menu and select "Default size and layout > Use this window's layout as default".  That will set the default folder layout.  Close then open the folder.  If the layout didn't stick go again to the Folder pull-down menu and select "Default size and layout > Apply default layout to this message and see if it changes.  </p><p>Also open and different folder and see if it opens with the default size and layout.  If not, try applying the default.  If both tests fail then its pretty certain that something is interfering with Pegasus Mail writes to its configuration files. </p>

Euler: The folder is C:\PMAIL\
 I'm not aware that there is antivirus action


Brian:, both tests failed

Thanks

 

<p>Euler: The folder is C:\PMAIL\  I'm not aware that there is antivirus action Brian:, both tests failed</p><p>Thanks </p><p> </p>

[quote user="Mike fox"]Brian:, both tests failed [/quote]

If this is on Windows 10 (which is very likely now) you may have been struck by this issue, and unfortunaley you can not add Pegasus Mail to the White List Apps being an exception for controlled folder access since it isn't a so called "modern app", so there's only the choice to completely turn off Controlled Folder Access completely. I've just encountered this issue as well :-/

There may be a way around this but I've not had the time to discuss it with David Harris yet since he needs to implement it. I promise I'll do it later today, though, I've already bookmarked the proper source some days ago.

<p>[quote user="Mike fox"]Brian:, both tests failed [/quote]</p><p>If this is on Windows 10 (which is very likely now) you may have been struck by <a mce_href="https://www.winhelponline.com/blog/error-file-not-found-save-files-desktop-windows-10-controlled-folder-access/" target="_blank" href="https://www.winhelponline.com/blog/error-file-not-found-save-files-desktop-windows-10-controlled-folder-access/">this issue</a>, and unfortunaley you can not add Pegasus Mail to the White List Apps being an exception for <i>controlled folder access</i> since it isn't a so called "modern app", so there's only the choice to completely turn off <i>Controlled Folder Access</i> completely. I've just encountered this issue as well :-/</p><p>There may be a way around this but I've not had the time to discuss it with David Harris yet since he needs to implement it. I promise I'll do it later today, though, I've already bookmarked the proper source some days ago. </p>
			Michael
--
IERenderer's Homepage
PGP Key ID (RSA 2048): 0xC45D831B
S/MIME Fingerprint: 94C6B471 0C623088 A5B27701 742B8666 3B7E657C

Brian, this is indeed using Windows 10, however Controlled Folder Access is OFF

Brian, this is indeed using Windows 10, however Controlled Folder Access is OFF

Mike,

These settings are saved on STATE.PMJ file on your mailbox directory. Below a sample of two sorting states over the same Pmail folder:

[quote]

3LMCKVNP:3995:FOL05F9F=77,49,756,313,"220,290,114,256,52,0" (by date, unread before read, apply timezone)

3LMCKVNP:3995:FOL05F9F=77,49,756,313,"220,290,114,257,52,0" (by subject, unread before read, apply timezone)

[/quote]

Anyway, Michael just presented us with a pinch of mustard. Here we go trying to figure how W10 works...

<p>Mike,</p><p>These settings are saved on STATE.PMJ file on your mailbox directory. Below a sample of two sorting states over the same Pmail folder:</p><p>[quote]</p><p>3LMCKVNP:3995:FOL05F9F=77,49,756,313,"220,290,114,<u>256</u>,52,0" (by date, unread before read, apply timezone) </p><p>3LMCKVNP:3995:FOL05F9F=77,49,756,313,"220,290,114,<u>257</u>,52,0" (by subject, unread before read, apply timezone)</p><p>[/quote] </p><p>Anyway, Michael just presented us with a pinch of mustard. Here we go trying to figure how W10 works... </p>

-- Euler

Pegasus Mail 4.81.1154 Windows 7 Ultimate
IERenderer: 2.7.1.5 AttachMenu: 1.0.1.2
PMDebug: 2.5.8.34 BearHTML 4.9.9.6

[quote user="Euler GERMAN"]Anyway, Michael just presented us with a pinch of mustard. Here we go trying to figure how W10 works... [/quote]

Just another note on this so people better understand the context of this issue: The idea behind this on MS' side was to protect contents created by users from being attacked by ransomware.

The reason why it caused troubles for my Pegasus Mail setup was that it didn't let me set up Pegasus Mail the way I had it running on my Windows 7 machine - well, not quite, it actually did let me do so until after a certain update: I had my mailbox folders located in the "My Documents" Windows folder and Pegasus Mail's public folders in the "Public Documents" Windows folder. Only after this recent Windows update it stopped working throwing an out of disk space error when shutting down Pegasus Mail and not allowing even Nortpad to save modified simple plain text files in these folders anymore.

Sorry for kind of hijacking this thread, this is meant to be just an FYI for future cases in supporting users!

<p>[quote user="Euler GERMAN"]Anyway, Michael just presented us with a pinch of mustard. Here we go trying to figure how W10 works... [/quote]</p><p>Just another note on this so people better understand the context of this issue: The idea behind this on MS' side was to protect contents created by users from being attacked by ransomware. </p><p>The reason why it caused troubles for my Pegasus Mail setup was that it didn't let me set up Pegasus Mail the way I had it running on my Windows 7 machine - well, not quite, it actually <i>did</i> let me do so until after a certain update: I had my mailbox folders located in the "My Documents" Windows folder and Pegasus Mail's public folders in the "Public Documents" Windows folder. Only after this recent Windows update it stopped working throwing an out of disk space error when shutting down Pegasus Mail and not allowing even Nortpad to save modified simple plain text files in these folders anymore.</p><p>Sorry for kind of hijacking this thread, this is meant to be just an FYI for future cases in supporting users! </p>
			Michael
--
IERenderer's Homepage
PGP Key ID (RSA 2048): 0xC45D831B
S/MIME Fingerprint: 94C6B471 0C623088 A5B27701 742B8666 3B7E657C

[quote user="Euler GERMAN"]

Mike,

These settings are saved on STATE.PMJ file on your mailbox directory. Below a sample of two sorting states over the same Pmail folder:

[quote]

3LMCKVNP:3995:FOL05F9F=77,49,756,313,"220,290,114,256,52,0" (by date, unread before read, apply timezone)

3LMCKVNP:3995:FOL05F9F=77,49,756,313,"220,290,114,257,52,0" (by subject, unread before read, apply timezone)

[/quote]

Anyway, Michael just presented us with a pinch of mustard. Here we go trying to figure how W10 works...

[/quote]

 Euler

Are you suggesting that I make a change to STATE.PMJ to switch to the required sort.

If so I assume the examples you give are specific to your system so are there any fixed numbers or strings in the examples you give that I should be looking for.


[quote user="Euler GERMAN"]<p>Mike,</p><p>These settings are saved on STATE.PMJ file on your mailbox directory. Below a sample of two sorting states over the same Pmail folder:</p><p>[quote]</p><p>3LMCKVNP:3995:FOL05F9F=77,49,756,313,"220,290,114,<u>256</u>,52,0" (by date, unread before read, apply timezone) </p><p>3LMCKVNP:3995:FOL05F9F=77,49,756,313,"220,290,114,<u>257</u>,52,0" (by subject, unread before read, apply timezone)</p><p>[/quote] </p><p>Anyway, Michael just presented us with a pinch of mustard. Here we go trying to figure how W10 works... </p><p>[/quote]</p><p> Euler Are you suggesting that I make a change to STATE.PMJ to switch to the required sort.</p><p> If so I assume the examples you give are specific to your system so are there any fixed numbers or strings in the examples you give that I should be looking for. </p>

[quote user="Mike fox"][quote user="Euler GERMAN"]

Mike,

These settings are saved on STATE.PMJ file on your mailbox directory. Below a sample of two sorting states over the same Pmail folder:

[quote]

3LMCKVNP:3995:FOL05F9F=77,49,756,313,"220,290,114,256,52,0" (by date, unread before read, apply timezone)

3LMCKVNP:3995:FOL05F9F=77,49,756,313,"220,290,114,257,52,0" (by subject, unread before read, apply timezone)

[/quote]

Anyway, Michael just presented us with a pinch of mustard. Here we go trying to figure how W10 works...

[/quote]

 Euler

Are you suggesting that I make a change to STATE.PMJ to switch to the required sort.

If so I assume the examples you give are specific to your system so are there any fixed numbers or strings in the examples you give that I should be looking for.[/quote]

Heavens, no! Please forgive me if I gave you this impression. In fact I'm against hacking Pegasus Mail configuration files despite they are mostly plain text files.

First I'd have to know exactly what those numbers mean. Some are quite easy to figure: window dimensions and column spacing, but that I underlined is clearly a bitsum. I'd need to know how the properties were mapped prior to play with it. Yes, it can be hacked but I'm really not in the mood.[;)]

So, to clarify the thing, my only intention was to point a way to see if Pegasus Mail is writing settings to the file correctly or not. I did this:

  1. Save a copy of STATE.PMJ file
  2. Open a Pmail folder and change a sort order
  3. Close that folder. Settings should be written to STATE.PMJ
  4. Compare your current STATE.PMJ with its previous saved copy (I used WinMerge)
  5. If a difference exist it should be highlighted

Another approach would be trying to find which application is "using" a particular file, the STATE.PMJ in this case. If you have the Process Explorer (Sysinternals/Microsoft Technet) application on hand this is quite easy:

  1. Run  procexp.exe
  2. Key in Ctrl + F
  3. Inform the full path of STATE.PMJ, say C:\Pmail\MAIL\USERNAME\state.pmj in the Handle or DLL substring field, and click Search button
  4. One, more than one or none application will be listed, if any. If any application other than Pegasus Mail (or none) appear here you found your culprit.
[quote user="Mike fox"][quote user="Euler GERMAN"]<p>Mike,</p><p>These settings are saved on STATE.PMJ file on your mailbox directory. Below a sample of two sorting states over the same Pmail folder:</p><p>[quote]</p><p>3LMCKVNP:3995:FOL05F9F=77,49,756,313,"220,290,114,<u>256</u>,52,0" (by date, unread before read, apply timezone) </p><p>3LMCKVNP:3995:FOL05F9F=77,49,756,313,"220,290,114,<u>257</u>,52,0" (by subject, unread before read, apply timezone)</p><p>[/quote] </p><p>Anyway, Michael just presented us with a pinch of mustard. Here we go trying to figure how W10 works... </p><p>[/quote]</p><p> Euler Are you suggesting that I make a change to STATE.PMJ to switch to the required sort.</p><p> If so I assume the examples you give are specific to your system so are there any fixed numbers or strings in the examples you give that I should be looking for.[/quote]</p><p>Heavens, no! Please forgive me if I gave you this impression. In fact I'm against hacking Pegasus Mail configuration files despite they are mostly plain text files.</p><p>First I'd have to know exactly what those numbers mean. Some are quite easy to figure: window dimensions and column spacing, but that I underlined is clearly a bitsum. I'd need to know how the properties were mapped prior to play with it. Yes, it can be hacked but I'm really not in the mood.[;)]</p><p>So, to clarify the thing, my only intention was to point a way to see if Pegasus Mail is writing settings to the file correctly or not. I did this:</p><ol><li>Save a copy of STATE.PMJ file</li><li>Open a Pmail folder and change a sort order</li><li>Close that folder. Settings should be written to STATE.PMJ</li><li>Compare your current STATE.PMJ with its previous saved copy (I used WinMerge)</li><li>If a difference exist it should be highlighted</li></ol><p>Another approach would be trying to find which application is "using" a particular file, the STATE.PMJ in this case. If you have the Process Explorer (Sysinternals/Microsoft Technet) application on hand this is quite easy:</p><ol><li>Run  procexp.exe</li><li>Key in Ctrl + F</li><li>Inform the full path of STATE.PMJ, say C:\Pmail\MAIL\USERNAME\state.pmj in the Handle or DLL substring field, and click Search button</li><li>One, more than one or none application will be listed, if any. If any application other than Pegasus Mail (or none) appear here you found your culprit. </li></ol>

-- Euler

Pegasus Mail 4.81.1154 Windows 7 Ultimate
IERenderer: 2.7.1.5 AttachMenu: 1.0.1.2
PMDebug: 2.5.8.34 BearHTML 4.9.9.6

Euler

I ran the Process Explorer but it came up with 0 items found

 Mike

<p>Euler I ran the Process Explorer but it came up with 0 items found</p><p> Mike </p>

Mike, can you tell whether sort order changes are being recorded in STATE.PMJ?  You should see its time stamp change as soon as you make a sort order change and then close that folder.

Thinking out load to all...  We know that interference from third party sources like AV and syncing can cause problems but that seems to have been ruled out here.  Could a corrupted STATE.PMJ file prevent sort order and folder layout changes from sticking? 

Mike, I'm interested to hear from others about this but your comfort level and Pmail complexity are major considerations around rebuilding STATE.PMJ.  It isn't difficult, but would result in the loss of folder window layouts, folder open/close filter assignments, and identity assignments (all recoverable by restoring a saved copy of the existing STATE.PMJ file).  IMHO it's worth a try if you don't use identities or folder open/close filters and don't mind creating a new default folder window layout and/or reconfiguring each folders layout when you next open it.  

<p>Mike, can you tell whether sort order changes are being recorded in STATE.PMJ?  You should see its time stamp change as soon as you make a sort order change and then close that folder. </p><p>Thinking out load to all...  We know that interference from third party sources like AV and syncing can cause problems but that seems to have been ruled out here.  Could a corrupted STATE.PMJ file prevent sort order and folder layout changes from sticking?  Mike, I'm interested to hear from others about this but your comfort level and Pmail complexity are major considerations around rebuilding STATE.PMJ.  It isn't difficult, but would result in the loss of folder window layouts, folder open/close filter assignments, and identity assignments (all recoverable by restoring a saved copy of the existing STATE.PMJ file).  IMHO it's worth a try if you don't use identities or folder open/close filters and don't mind creating a new default folder window layout and/or reconfiguring each folders layout when you next open it.   </p>

Mike & Brian,

Looking into my state.pmj I realize it is a plain INI file, that is, it has sections indicated by Names inside square brackets and no spaces, Keys that are any sequence of ASCII characters terminated by an equal (=) sign, and followed by their assigned Values, also ASCII characters terminated by a CRLF. Some Keys=Values may be commented by a hashtag (#). I'm wondering if a small corruption like a lack of "=" or a faulty line terminator could lead Pmail to a read error. The line contents could be properly written but the lack of the proper terminator could fool the reading. Just a guess.

Some text editors like Notepad3 can indicate graphically if a line terminates in CRLF, CR or just LF, and of course one can use a regex search to pinpoint a line missing an equal sign.

<p>Mike & Brian,</p><p>Looking into my state.pmj I realize it is a plain INI file, that is, it has sections indicated by Names inside square brackets and no spaces, Keys that are any sequence of ASCII characters terminated by an equal (=) sign, and followed by their assigned Values, also ASCII characters terminated by a CRLF. Some Keys=Values may be commented by a hashtag (#). I'm wondering if a small corruption like a lack of "=" or a faulty line terminator could lead Pmail to a read error. The line contents could be properly written but the lack of the proper terminator could fool the reading. Just a guess.</p><p>Some text editors like Notepad3 can indicate graphically if a line terminates in CRLF, CR or just LF, and of course one can use a regex search to pinpoint a line missing an equal sign. </p>

-- Euler

Pegasus Mail 4.81.1154 Windows 7 Ultimate
IERenderer: 2.7.1.5 AttachMenu: 1.0.1.2
PMDebug: 2.5.8.34 BearHTML 4.9.9.6

Mike, just one more question: this non-stick sort thing occurs on a single folder or for all folders you have?

Mike, just one more question: this non-stick sort thing occurs on a single folder or for all folders you have?

-- Euler

Pegasus Mail 4.81.1154 Windows 7 Ultimate
IERenderer: 2.7.1.5 AttachMenu: 1.0.1.2
PMDebug: 2.5.8.34 BearHTML 4.9.9.6

Brian

Before trying a new default folder (in case it makes a difference)- my findings are

- the time-stamp changes merely if I open and close  the Pegasus program (without any changes)

- in answer to Euler's question, the non-stick occurs on every folder


Brian Before trying a new default folder (in case it makes a difference)- my findings are - the time-stamp changes merely if I open and close  the Pegasus program (without any changes) - in answer to Euler's question, the non-stick occurs on every folder

[quote user="Mike fox"]Brian

Before trying a new default folder (in case it makes a difference)- my findings are

- the time-stamp changes merely if I open and close  the Pegasus program (without any changes)[/quote]

This is normal.  What we are trying to confirm is that STATE.PMJ is being updated when you close a folder after making a change to its sort order  I'm guessing that it is since the normal updating at open and close appears to be working.  

In my previous post I hinted at rebuilding STATE.PMJ.  I'm feeling more strongly about that now but would like to know more about your Pmail complexity per that post before recommending doing so.

<p>[quote user="Mike fox"]Brian Before trying a new default folder (in case it makes a difference)- my findings are - the time-stamp changes merely if I open and close  the Pegasus program (without any changes)[/quote]</p><p>This is normal.  What we are trying to confirm is that STATE.PMJ is being updated when you close a folder after making a change to its sort order  I'm guessing that it is since the normal updating at open and close appears to be working.   </p><p>In my previous post I hinted at rebuilding STATE.PMJ.  I'm feeling more strongly about that now but would like to know more about your Pmail complexity per that post before recommending doing so. </p>
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft