I missed the OP's second post to the thread; my resplies are below:
When an e-mail message arrives, all copies for the os user are stored in /home/$USER/Maildir/new?
Messages are always stored in the
new subdirectory until they're read; then they're moved to the
cur directory. I've never seen a message in the
tmp directory. The original specification was designed by Dan Bernstein, the author of Qmail. I've never seen documentation for use of the
tmp directory; perhaps Dovecot and other IMAP servers use it on a transient basis while otherwise manipulating the files.
When an e-mail message arrives, all copies for the virtual e-mail user are stored in /home/$USER/imap/$DOMAIN/$EMAILUSER/Maildir/.INBOX.Sent/cur?
Same as above; stored in
new until they're read; then moved to
cur.
When a client comes in POP3, he is getting a filtered messages from /home/$USER/Maildir/new, or /home/$USER/imap/$DOMAIN/$EMAILUSER/Maildir/.INBOX.Sent/cur?
I'm not sure what you mean by
filtered. Exactly what a client sees is dependent on the client software being used.
POP3 clients, if properly configured, should download all email not previously downloaded, from both
cur and
new and then notify Dovecot that they've downloaded the emails. At that point, all downloaded emails should be moved from
new to
cur, unless the POP3 client is set to delete all downloaded emails from the server, in which case they'll be deleted (and not saved anywhere on the server).
When you delete a message in webmail, are you also deleting it from POP mail?
While DirectAdmin often refers to mailboxes as POP3 email boxes, Dovecot makes no physical distinction at the mailbox level. Older DirectAdmin installations may still include the UebiMiau webmail client, often simply called
webmail. At the time DirectAdmin was first developed it didn't unclude any IMAP functionality, and UebiMiau was the only generally recognized and accepted webmail client which could be configured to use POP3, so it was the only choice. (While UebiMiau is configurable to use IMAP it was never set up for IMAP in DirectAdmin).
The original POP3 server used by DirectAdmin didn't use the same email structure at all; it used the
mbox structure, and a discussion of
mbox is beyond the scope of this thread, so for the following let's presume only Dovecot is being used; Dovecot uses the same email subdirectory structure whether being accessed by POP3 or by IMAP.
UebiMiau as a POP client signals Dovecot that the new email has been downloaded, which causes it to move any email in the
neew directory to the
cur directory, and then UebiMiau displays the contents of the
cur directory. With UebiMiau when you move an email to a different folder, the email will be moved to a proprietary subdirectory structure that only UebiMiau has access to, and neither other POP3 nor IMAP clients will be able to see it.
Other webmail clients use IMAP, and all IMAP clients view, retrieve, store, and otherwise manage email directly on the server. If you move an email to a different folder (subdirectory), you should see it there in any other IMAP client, whether on desktop, laptop, or even cellphone.
I'm not clear on the relationship between $USER/Maildir and imap/$DOMAIN/$EMAILUSER/Maildir.
As I've already written, the former is for the
user who owns the domain, and the latter for virtual email accounts only.
I hope this now answers all the questions. If I've missed anything please bring it to my attention.
Thanks.
Jeff