Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 36766 - net-mail/sendmail defaults to maildir not mbox
Summary: net-mail/sendmail defaults to maildir not mbox
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Net-Mail Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-29 17:04 UTC by Jan Schubert
Modified: 2004-06-28 20:48 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Schubert 2003-12-29 17:04:21 UTC
The ebuilds mention that sendmail defaults to using mbox, but this is not true in my experience. On a quite new system it defaults to using maildir. A reason is most likely that mbox is not set by default, maybe this has changed in the past. Setting USE="mbox" enables mbox support in sendmail, if not set maildir is used.

Also, i got litte headache with virtual/mta which seems to default to ssmtp. Just trying to get this fixed and come back here.
Comment 1 Chris Ditri 2004-03-03 06:06:10 UTC
I am likewise struggling with this.  No matter what I pass in my USE variable, it compiles with maildir -- which, of course, I do not want.

Is there a work-around until this is fixed?

I posted on this issue here:  http://forums.gentoo.org/viewtopic.php?t=144194&highlight=
Comment 2 Grant Goodyear (RETIRED) gentoo-dev 2004-03-03 09:44:36 UTC
Hmmm.  There may well be some bugs in the sendmail ebuild, as the sendmail
build system is pretty ugly.  We also really do need to yank the incorrect
line about the ebuild using mbox support by default (which is no longer true).

Until this gets fixed, the workaround is to know that that sendmail itself
doesn't actually understand the maildir format (which is the Gentoo default).
If you look at the ebuild you'll see that the differences between having "mbox"
in USE and not having it are (a) the config files that are placed in 
/etc/mail which call procmail (which does understand maildir) to deliver mail,
and (b) a PDEPEND on procmail so that procmail will exist for mail delivery.
If you already have the procmail-enabled sendmail, then instead of messing with
the sendmail configs (which are notoriously ugly), it's much simpler to edit 
/etc/procmailrc to read:
  DEFAULT=/var/spool/mail/$LOGNAME
Comment 3 Chris 2004-03-03 15:13:15 UTC
Okay... I got it now...

It is not a problem with sendmail.  It is a problem with procmail.  Something is wrong there with the ebuild ignoring the mbox use flag. I am not an ebuilder, so my knowledge there is limited, but I got around it by changing this code in the ebuild:
=======================<snip>=========================================
 if [ -z "`use mbox`" ];
        then
                echo "# Use maildir-style mailbox in user's home directory" > ${S}/procmailrc
                echo 'DEFAULT=$HOME/.maildir/' >> ${S}/procmailrc
                cd ${S}
                patch -p1 <${FILESDIR}/gentoo-maildir2.diff
        else
                echo '# Use mbox-style mailbox in /var/spool/mail' > ${S}/procmail
                echo 'DEFAULT=/var/spool/mail/$LOGNAME' >> ${S}/procmailrc
        fi
 ===============</snip>==========================================

to this:

==================<snip>=========================================
  echo '# Use mbox-style mailbox in /var/spool/mail' > ${S}/procmail
        echo 'DEFAULT=/var/spool/mail/$LOGNAME' >> ${S}/procmailrc
====================</snip>======================================

thereby forcing procmail to use maildir.  I'm sure a real ebuilder could fix this in a jiffy, but no me!

Hope it helps.

G
Comment 4 Cory Visi (RETIRED) gentoo-dev 2004-06-14 14:33:30 UTC
I believe this bug isn't relevant anymore.

The current stable sendmail ebuild does not even touch procmailrc anymore. It properly PDEPENDs on procmail only if mbox _isn't_ specified, and only changes the sendmail config files (sendmail.cf, sendmail.mc) based on the mbox flag.

The only difference is that the current stable version states in pkg_postinst() that the ebuild defaults to mbox, which is misleading.  The ebuild really defaults to maildir, but maildir is really handled by procmail.  These einfo lines are removed in the latest unstable ebuild.

I think this should be closed... Jan can you weigh in?
Comment 5 Cory Visi (RETIRED) gentoo-dev 2004-06-28 20:48:20 UTC
Jan, if you think we need to reopen this, please let me know.