Well, what the OP seemed to want was the location of his mail files, wasn't it? And nobody was answering that.
Here's an IMAP problem that I have. It may well be that there's an easy solution, but if so I haven't found it. I admit I haven't looked very hard, because I have a "hybrid" solution that works for me.
For various reasons, it's important for me to have a local mail store on my various Macs, as well as the ability to access my IMAP accounts from any machine, anywhere. I also need to use rules to place emails in folders.
When I switched my accounts to IMAP a year or so ago, I discovered that if my rules downloaded emails from the IMAP server to Mac-A, then when Mac-B accessed the IMAP store later, the downloaded emails were not available there. So for example, if Mac-A and Mac-B were all synched up, so that their local stores were identical (which I do with Chronosync), and go off on a field trip and use Mac-B there (with rules) then when I get back to base and access my IMAP store with Mac-A, the messages downloaded via rules into Mac-B aren't on the server.
My workaround has been to disable rules on Mac-B (and Mac-C, and the others), and leave the messages on the IMAP server. Back at base, I fire up the rules, the messages go where I want them to, I resynch the mail stores before my next trip, and I'm good.
I do not want to keep 100% of my mail on the IMAP server. I do understand that it's possible to create folders on the IMAP server, and leave everything there. But there are good reasons why I don't want to do that.
Am I missing something basic here?