[Dovecot] Purging /var/mail/username ?

Curtis Maloney cmaloney at cardgate.net
Fri Dec 24 00:22:38 EET 2004


Michael Hipp wrote:
> Johannes Berg wrote:
> 
> I'm using postfix for mta. It has been running since the box was built.
> 

I use Dovecot with Postfix.  Mail is delivered, for my users, to ~/.imap
To do this, just put into main.cf:
	home_mailbox = .imap/
or, in your case:
	home_mailbox = mail/

note: the trailing / means it's in Maildir format.  leave it off for mbox

> Before I installed Dovecot, I had no ~/mail. (There's no "dot" in it as 
> I mistakenly indicated in my first post). My mail just accumulated in 
> /var/mail/michael and sat there. I activated Dovecot and ~/mail appeared 
> and I could get at it via IMAP. So I assumed Dovecot was reading 
> /var/mail/michael and "delivering" it to ~/mail.
> 
> Is this not the case?
> 

As others have mentioned, Dovecot does not deliver mail.  It only gives access 
to mail that's been delivered.  Postfix delivers the mail.

> So, in normal circumstances, who is responsible for keeping /var/mail 
> from filling up?
> 

I believe someone else already mentioned, you can have your regular IMAP 
folders in ~/mail, and the INBOX in /var/mail, by setting default_mail_env in 
the Dovecot config:
	default_mail_env=mbox:~/mail:INBOX=/var/mail/%u
This is one of the example options in the default Dovecot config file.

> Sorry for all the dum-dum questions.

We all had to start somewhere.

So, either 1) All mail in ~/mail:
	In Postfix's main.cf, add the line "home_mailbox =  mail" ( or mail/ if you 
want Maildir, not mbox... easier imho)
	In Dovecot's config, set:  default_mail_env=mbox:~/mail ( replace mbox with 
maildir for ... well, you get the idea :)
2) Inbox in /var/mail, other mail in ~/mail
	In Dovecot's config, set:  default_mail_env=mbox:~/mail:INBOX=/var/mail/%u

Now, I believe the 1.0test series can have a mbox format inbox, and Maildir 
format folders... but I'm not clear on the correct setting for that.

> 
> Thank you all,
> Michael
> 

--
Curtis Maloney
cmaloney at cardgate.net



More information about the dovecot mailing list