[Dovecot] [Urgent] Email Retrieval from remote servers doesn't use Dovecot

William Blunn bill+dovecot at blunn.org
Thu Jun 30 16:36:21 EEST 2011


On 30/06/2011 14:08, Shazia Javed wrote:
> Thank you for the reply. Now I have relatively better understanding of Dovecot and email service components (MUA, MTA, MRA, etc). However, I am still struggling with the relevant conceptual understanding, and need your help:
>
> I have installed 'getmail' as I read that it offers ease-of-use and is relatively more secure. So far I have managed to download emails from Inbox and Sent folder. All the downloaded emails go to single folder 'new' from 'Maildir' directory. Please tell me if there is a way (configuration) to download emails in respective folders.

"getmail" appears to support delivery to an arbitrary Maildir folder. 
See "getmail" documentation.

You might want to read up about Maildir to see how it works. In 
particular you need to know that mail is delivered to a directory "new" 
(the delivery process involves the directory "tmp", but the message 
isn't considered delivered until it reaches the directory "new"), but 
gets moved to a folder "cur" when the Maildir is looked at. So mail 
could be in either directory "new" or "cur".

(The design of Maildir attempts to address various problems, and only 
partially succeeds, and in other cases makes things worse than they 
would have been otherwise. But despite its flaws, it still has some 
strengths, such as reliability, (relative) simplicity, wide support, and 
the ease by which a message store can be queried/interrogated.)

> Also, is there any need for Dovecot now? As I see it, I have managed to download emails from remote servers in maildir format using getmail. How and why would Dovecot fit in? Will Dovecot (via deliver and sieve) assist in segregated email storage (i.e. INBOX in 'new', DRAFTS in '.draft/new' etc).

It might be handy to have Dovecot installed as it would mean you could 
"see into" the mail folders using an IMAP client such as Thunderbird. 
This will probably make it easier to get a handle on which messages are 
in which folders than trying to look in the Maildir directories directly.

IMAP has a special folder called "INBOX" which appears as the Inbox in 
most IMAP clients.

Under Maildir, in the default location, INBOX can be found at 
~/Maildir/{new,cur,tmp}

Other folders are mapped into directories, for example
the mail folder "Sent" will appear at ~/Maildir/.Sent/{new,cur,tmp}

Nested mail folders are flattened into a single directory level in the 
filesystem, with the folder levels separated by dots, so
the mail folder "Projects/PJ1" will appear at 
~/Maildir/.Projects.PJ1/{new,cur,tmp}

(The above is the default way for Maildir to work. However, Dovecot can 
be configured to map IMAP folders into Maildir directories in other ways.)

Bill


More information about the dovecot mailing list