Emptying the trash doesn't move emails out of a smart folder I came across a weird issue in Mail.
I have a smart folder for emails matching a number of specific senders.
I assumed that smart folders work like smart folder in the Finder that emails are not actually moved there but simply link to the original location. 
The smart folder worked fine. 

Now I moved a message to the trash (from its original location in the Inbox, not from the Smart Folder).
The message still shows in the Smart Folder, although now instead of "Inbox (Accountname)" it says "Trash" for the location of the message in the top right corner of the message.  OK, fine, not quite intuitive, but understandable. 

However, now I empty the Trash. 

The message still remains in the Smart Folder. It still says "Trash" as location, yet the entire trash is empty (the IMAP trash folder as well as On My Mac trash folder).   

Now I click to "delete" it (from within the Smart Folder by right clicking and choosing "Delete" from the context menu) and it disappears (it doesn't show up in the Trash either, thankfully, that would have been even more bizarre). 

Anyways.  Am I just not understanding how Smart Folders are work?  Or is there something wrong.
And after emptying the trash, where exactly is the actual (physical) location of my message (for purposes of troubleshooting)?
Your understanding is very correct and one of two things is the root of your confusion and the software not working dependably.


Spotlight is the database where all files get indexed. That indexing then shows which files are mail messages and which are responsive to an ad-hoc search within the mail app or a programmed search which is called a “smart mailbox”
Spotlight can’t work if the disk underneath has errors in the filesystem.


To triage or troubleshoot this, I would log out and then power off the Mac. If you have fast internet and a modern Mac, boot to internet recovery and run Disk Utility to repair the boot drive. This is best since you don’t want to trust your copy of Disk Utility to do a live check since you can’t fix all the things if you have corruption.


https://support.apple.com/en-us/HT201716


Next, consider rebuilding the spotlight database for your user account by placing your home folder into spotlight preferences as a private location not to be indexed.

Then do a second restart to let spotlight see your files freshly when you remove the privacy setting. If you have an SSD and less than 100 GB of data in your home folder, the search will need an hour or three to rebuild. Don’t worry if smart folders are not correct while spotlight shows a reindex in process.

Only after you’re sure things are good on the foundation, perhaps look at rebuilding the mailbox envelopes or vacuuming the index.


Mail search not finding messages but Spotlight does


Lastly, I should have put a first warning in - are your backups complete for this mac? Consider getting a good backup before you try to fix anything if you can’t afford to lose any files you have now on this mac.