Dovecot and incoming server with strange results.

I only started using Dovecot recently and finally got it to function via internet and email clients. But I have a question. If setup Dovecot as IMAP server, the inbox is stuck in itself, I mean if I create a new folder in the inbox from within the email client, and then move one email message from the inbox to the folder, the email moves to the folder, then if I refresh and get new messages the server gets the original email and now there a duplicate email in the inbox and in the new folder. But, if I do the same thing with POP3, there is no issue and the folder functions correctly and no duplicates after moving email to folder with POP3. Why is this happening? Is it normal? How do I fix the IMAP to register the email moved to folder and not make duplicate? I am undecided which I will use for the final server, IMAP, POP3, etc. Of what I know of IMAP I would assume this problem would be more likely to happen with POP3 so I think its funny I am having a folder issue with IMAP.
 
POP3 typically downloads the messages locally and deletes them on the server, with IMAP everything stays on the server. Check if the account that dovecot runs on actually has write access to the mail folders, because it sounds like the service itself doesn't have the correct permissions to handle the mailboxes.
 
Ok I've tried to adjust permissions by adding the Dovecot run user to the owners group of the mail directory, and settings in conf file the following, mail_uid, mail_gid; and getting the same results. Is there something more in the config file I am missing?
 
Additionally I can't seem to delete emails either. So it seems it is a permission issue...
The directory I am using for the inbox is the default one that freebsd uses, /var/mail, etc...
 
Dovecot might be set up for IMAP, but are you sure sendmail (or whatever you are using) is not delivering to mbox format?
 
Dovecot might be set up for IMAP, but are you sure sendmail (or whatever you are using) is not delivering to mbox format?
Yes its likely mbox format; the default. So what format is required for IMAP to function best? I am not using postfix. I am using sendmail. Does sendmail offer different than mbox? I don't want to use a different delivery program. I don't want to use postfix!
 
Dovecot might be set up for IMAP, but are you sure sendmail (or whatever you are using) is not delivering to mbox format?
dovecot supports mbox format.
@OP
you can use sendmail + dovecot-lda / sendmail and use maildir
Code:
Mlocal,         P=/usr/local/libexec/dovecot/deliver, F=lsDFMAw5:/|@qSPhn9, S=EnvFromL/HdrFromL, R=EnvToL/HdrToL,
                T=DNS/RFC822/X-Unix,
                A=/usr/local/libexec/dovecot/deliver -d $u
replace Mlocal with the above in sendmail.cf
 
You may need procmail as well as sendmail so your mail get delivered in maildir format.

FEATURE(local_procmail)dnl
 
You may need procmail as well as sendmail so your mail get delivered in maildir format.

FEATURE(local_procmail)dnl
No. Definitely not going to be using procmail. Do I need maildir and mbox, is this required to function best? Can't just use mbox?
 
you don't need procmail. the dovecot package contains all you need.
Code:
pkg which /usr/local/libexec/dovecot/deliver
/usr/local/libexec/dovecot/deliver was installed by package dovecot-2.3.13
 
No. Definitely not going to be using procmail. Do I need maildir and mbox, is this required to function best? Can't just use mbox?
No you can't use both, that is what you are doing now, and why it is not working.
And you cannot use mbox if you want IMAP. You can't have the flexibility of IMAP with the inflexibility of mbox.
 
Back
Top