I'm never been a user of trays, but have a dummy setup of Pegasus that has admin user with some trays. Wrote a little linux script that extracts tray / folder info from HIERARCH.PM file.
test.sh script
clear
echo "Mail Folder"
mailfolder=$(head -n 1 HIERARCH.PM | cut -f 3 -d,)
echo $mailfolder
echo -e "\nTrays"
grep ^1 <HIERARCH.PM
echo -e "\nFolders in Trays (Not Main Folder)"
grep -v "$mailfolder" <HIERARCH.PM
echo -e "\nFolders in Trays in Main Folder"
grep "$mailfolder" <HIERARCH.PM
Contents of HIERARCH.PM
2,1,"29465149:My mailbox","","My mailbox"
0,0,"TOIWZPQ5:5262:copyself","29465149:My mailbox","Copies to self",0,20
0,0,"HZQ51LV0:5263:junk","29465149:My mailbox","Junk or suspicious mail"
0,0,"VHELKLHO:5264:main","29465149:My mailbox","Main Folder"
0,256,"W687FP0A:3598:FOL05032","29465149:My mailbox","Deleted Messages",0,20
1,1,"00F54113:test tray","29465149:My mailbox","test tray"
0,0,"9UTNJLRQ:1865:A","29465149:My mailbox","a"
0,0,"Y4GKTYBE:1866:JACKJILL","29465149:My mailbox","jack and jill"
0,0,"74NWUQDB:1867:MARYHAD","29465149:My mailbox","mary had a little lamb"
0,0,"2FVL1GA4:417B:T1","00F54113:test tray","t1"
0,0,"BSCQTIKQ:417C:T2","00F54113:test tray","t2"
1,0,"70BC6757: xx","00F54113:test tray","xx"
1,1,"6CE46759:tt","29465149:My mailbox","tt"
0,0,"HWVFDFEV:6A12:FOL071E1","29465149:My mailbox","tt1"
0,0,"Z4XUZ0ZK:6A13:FOL043AB","29465149:My mailbox","ttx"
0,0,"QORVA9N0:6A14:FOL0476B","6CE46759:tt","tttt"
Put space in : xx to avoid emoji??
Mail Folder
"29465149:My mailbox"
Trays
1,1,"00F54113:test tray","29465149:My mailbox","test tray"
1,0,"70BC6757: xx","00F54113:test tray","xx"
1,1,"6CE46759:tt","29465149:My mailbox","tt"
Folders in Trays (Not Main Folder)
0,0,"2FVL1GA4:417B:T1","00F54113:test tray","t1"
0,0,"BSCQTIKQ:417C:T2","00F54113:test tray","t2"
1,0,"70BC6757: xx","00F54113:test tray","xx"
0,0,"QORVA9N0:6A14:FOL0476B","6CE46759:tt","tttt"
Folders in Trays in Main Folder
2,1,"29465149:My mailbox","","My mailbox"
0,0,"TOIWZPQ5:5262:copyself","29465149:My mailbox","Copies to self",0,20
0,0,"HZQ51LV0:5263:junk","29465149:My mailbox","Junk or suspicious mail"
0,0,"VHELKLHO:5264:main","29465149:My mailbox","Main Folder"
0,256,"W687FP0A:3598:FOL05032","29465149:My mailbox","Deleted Messages",0,20
1,1,"00F54113:test tray","29465149:My mailbox","test tray"
0,0,"9UTNJLRQ:1865:A","29465149:My mailbox","a"
0,0,"Y4GKTYBE:1866:JACKJILL","29465149:My mailbox","jack and jill"
0,0,"74NWUQDB:1867:MARYHAD","29465149:My mailbox","mary had a little lamb"
1,1,"6CE46759:tt","29465149:My mailbox","tt"
0,0,"HWVFDFEV:6A12:FOL071E1","29465149:My mailbox","tt1"
0,0,"Z4XUZ0ZK:6A13:FOL043AB","29465149:My mailbox","ttx"
Don't know what output would be with HIERARCH.PM file that has lots of folders and trays?
Could make a CPP program that does the same with a little time.
I'm never been a user of trays, but have a dummy setup of Pegasus that has admin user with some trays. Wrote a little linux script that extracts tray / folder info from HIERARCH.PM file.
test.sh script
clear
echo "Mail Folder"
mailfolder=$(head -n 1 HIERARCH.PM | cut -f 3 -d,)
echo $mailfolder
echo -e "\nTrays"
grep ^1 <HIERARCH.PM
echo -e "\nFolders in Trays (Not Main Folder)"
grep -v "$mailfolder" <HIERARCH.PM
echo -e "\nFolders in Trays in Main Folder"
grep "$mailfolder" <HIERARCH.PM
Contents of HIERARCH.PM
2,1,"29465149:My mailbox","","My mailbox"
0,0,"TOIWZPQ5:5262:copyself","29465149:My mailbox","Copies to self",0,20
0,0,"HZQ51LV0:5263:junk","29465149:My mailbox","Junk or suspicious mail"
0,0,"VHELKLHO:5264:main","29465149:My mailbox","Main Folder"
0,256,"W687FP0A:3598:FOL05032","29465149:My mailbox","Deleted Messages",0,20
1,1,"00F54113:test tray","29465149:My mailbox","test tray"
0,0,"9UTNJLRQ:1865:A","29465149:My mailbox","a"
0,0,"Y4GKTYBE:1866:JACKJILL","29465149:My mailbox","jack and jill"
0,0,"74NWUQDB:1867:MARYHAD","29465149:My mailbox","mary had a little lamb"
0,0,"2FVL1GA4:417B:T1","00F54113:test tray","t1"
0,0,"BSCQTIKQ:417C:T2","00F54113:test tray","t2"
1,0,"70BC6757: xx","00F54113:test tray","xx"
1,1,"6CE46759:tt","29465149:My mailbox","tt"
0,0,"HWVFDFEV:6A12:FOL071E1","29465149:My mailbox","tt1"
0,0,"Z4XUZ0ZK:6A13:FOL043AB","29465149:My mailbox","ttx"
0,0,"QORVA9N0:6A14:FOL0476B","6CE46759:tt","tttt"
Put space in : xx to avoid emoji??
Mail Folder
"29465149:My mailbox"
Trays
1,1,"00F54113:test tray","29465149:My mailbox","test tray"
1,0,"70BC6757: xx","00F54113:test tray","xx"
1,1,"6CE46759:tt","29465149:My mailbox","tt"
Folders in Trays (Not Main Folder)
0,0,"2FVL1GA4:417B:T1","00F54113:test tray","t1"
0,0,"BSCQTIKQ:417C:T2","00F54113:test tray","t2"
1,0,"70BC6757: xx","00F54113:test tray","xx"
0,0,"QORVA9N0:6A14:FOL0476B","6CE46759:tt","tttt"
Folders in Trays in Main Folder
2,1,"29465149:My mailbox","","My mailbox"
0,0,"TOIWZPQ5:5262:copyself","29465149:My mailbox","Copies to self",0,20
0,0,"HZQ51LV0:5263:junk","29465149:My mailbox","Junk or suspicious mail"
0,0,"VHELKLHO:5264:main","29465149:My mailbox","Main Folder"
0,256,"W687FP0A:3598:FOL05032","29465149:My mailbox","Deleted Messages",0,20
1,1,"00F54113:test tray","29465149:My mailbox","test tray"
0,0,"9UTNJLRQ:1865:A","29465149:My mailbox","a"
0,0,"Y4GKTYBE:1866:JACKJILL","29465149:My mailbox","jack and jill"
0,0,"74NWUQDB:1867:MARYHAD","29465149:My mailbox","mary had a little lamb"
1,1,"6CE46759:tt","29465149:My mailbox","tt"
0,0,"HWVFDFEV:6A12:FOL071E1","29465149:My mailbox","tt1"
0,0,"Z4XUZ0ZK:6A13:FOL043AB","29465149:My mailbox","ttx"
Don't know what output would be with HIERARCH.PM file that has lots of folders and trays?
Could make a CPP program that does the same with a little time.
edited Jul 6 '23 at 9:00 pm