<font face="courier new,monospace">I developed a simple utility that allows me to download<br>some of my gmail into seperate files on my filesystem<br>using Net::IMAP::Simple.  I can select the 'mailbox'<br>and download everything in it.<br>

<br>The trouble is that when you $imap_sess->select($mailbox);<br>in Gmail 'mailbox' ==' 'tag', so it actually selects all<br>messages with that 'tag' instead.  But deleted messages<br>are not really 'moved' to another mailbox, or are marked<br>

(in IMAP terms) as 'deleted', they simply receive another<br>tag called 'Trash'.<br> if your messages have a tag on them, AND<br>you delete them; they will also receive the tag 'Trash'.<br><br>So when I select the mailbox (aka. tag) 'mybox',<br>

I will get all those messages, but all the 'deleted' ones<br>(with the additional 'Trash' tag, also get selected<br>because they have both tags: 'mybox' AND 'Trash'.<br><br>Can anyone suggest a simple mechanism for 'mybox' and not 'Trash'?<br>

<br>(I tried getting the UIDs, and performing a exclusionary<br>masking process between the two sets, but the unique IDs<br>I was seeing didn't seem overly unique.)<br><br>TIA<br>Fulko<br><br></font>