Help with Dovecot, Postfix and whacky results. [solved]
Daevid Vincent
daevid at daevid.com
Thu Jun 4 19:24:05 UTC 2009
I got this working finally by (ironically) removing some lines in
/etc/postfix/main.cf
43 # http://www.postfix.org/postconf.5.html#mail_spool_directory
44 #
45 # [dv] I want to use "mbox" format, not Maildir/ format
46 #
47 #home_mailbox = Maildir/
48 # if we don't specify a mailbox, it will be in /var/spool/mail/user
49 #
http://beginlinux.com/server_training/mail-server/1043-postfix-mailbox-chang
es
50 #home_mailbox = Mailbox
51 # we want to have each user saved in their own directory for easy
maintenance
52 mail_spool_directory = /var/mail
And then in /etc/dovecot/dovecot.conf
226 mail_location = mbox:~/mail:INBOX=/var/mail/%u
restarted both:
/etc/init.d/postfix restart
/etc/init.d/dovecot restart
And things are working fine.
I even got Roundcube (which is really neat!) to work and Atmail Open (after
some hacking of the login page).
I thought about using "Maildir/" at this juncture, but I have 10 years worth
of mail in mbox format and I was worried about converting and all that. I
figure I'll fight one fire now and maybe when I do a re-install to Ubuntu
9.10 or something I'll re-investigate mail again. Don't fix what ain't broke
right? I did try to get the /var/spool/mail/%u to be in /home/%u/Mailbox but
it started to be a pain with EXPORT and all sorts of other "non-default"
settings so I just backed it out. It did give me a greater understanding of
how all of this works and is layed out. Thanks to everyone who added some
insight.
http://daevid.com
> -----Original Message-----
> From: ubuntu-users-bounces at lists.ubuntu.com
> [mailto:ubuntu-users-bounces at lists.ubuntu.com] On Behalf Of
> Derek Broughton
> Sent: Wednesday, June 03, 2009 7:30 AM
> To: ubuntu-users at lists.ubuntu.com
> Subject: Re: Help with Dovecot, Postfix and whacky results.
>
> Daevid Vincent wrote:
>
> > I don't understand what's happening here.
> >
> > Installed packages in question:
> > dovecot 1.1.4-0ubuntu1.2
> > postfix 2.5.5-1
> ...
> > I have *my* user account "daevid" and everything works
> fantastic. I use
> > Outlook, Evolution, Alpine, Roundcube, and things are great!
> >
> > $ ll /var/spool/mail
> > -rw-rw---- 1 daevid mail 1202532 2009-06-02 15:00 daevid
> >
> > $ ll /home/daevid/mail
>
> That one is probably not relevant - ~/mail is used by your
> mail client not
> dovecot and postfix (unless you actually have postfix
> dropping the mail
> there... which, below, it seems you might, via procmail)
>
> > So then I added another user to my system and that user
> can't get mail via
> > ANY of the clients mentioned above!!?? WTF? Plus a new
> directory Maildir
> > is added to their home folder (and this is where new mail
> is showing up vs
> > the /var/spool/mail dir that my mail shows in):
>
> That's not a problem. Dovecot looks in all the usual
> suspects, including
> /var/mail/$USER, /var/spool/mail/$USER and /home/$USER/Maildir.
> var/spool/mail should just be a symlink to /var/mail.
> >
> > root@:/var/spool/mail# ll
> > -rw-rw---- 1 daevid mail 1202532 2009-06-02 15:00 daevid
> > -rw-rw---- 1 mike mail 0 2009-05-20 13:11 mike
> ...
> > If I send a test message from Alpine ON my server to this
> new account, it
> > will show up in this folder (and not in /var/spool/mail as
> *my* mail does.
> > huh?
>
> Postfix configuration problem. :-( You appear to have
> "daevid" being
> delivered in "mbox" format and "mike" as "maildir". iirc,
> postfix uses
> /var/mail/ by default if you want mbox, but puts maildir
> deliveries in the
> user's directory - I _really_ don't know postfix though.
>
> I can't tell you how to make postfix behave, but I'm fairly
> sure that if you
> just delete /var/spool/mail/mike, which isn't being used
> anyway, dovecot
> will find his ~/Maildir directory (stop and restart dovecot).
>
> > So what really baffles me is that I don't understand why
> one account would
> > work fine and the other wouldn't? Shouldn't this be an all
> or nothing
> > situation? And how do I fix it so that other accounts work
> like mine does?
>
> You might not really want to - I've waffled for a decade on
> whether I want
> mail in /var/mail (convenient for backup up all users' mail) or
> /home/$USER/Maildir (more convenient for getting a user's
> mail backed up
> with the rest of his data). atm, I'm on the user's Maildir
> side of the
> fence, but I wouldn't be surprised if next year I'm back to
> /var/mail :-)
>
> > I do use procmail in my account, but I don't see any
> setting that tells it
> > to redirect to /var/spool/mail
> > http://www.daevid.com/content/examples/procmail.php
>
> I don't know procmail, either, but typically deliveries to
> .../filename go
> to an mbox and deliveries to .../filename/ go to a Maildir (I
> think qmail
> introduced that convention).
> --
> derek
>
>
>
> --
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>
More information about the ubuntu-users
mailing list