Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 01 Apr 2006 15:56:57 +0100
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        gerard@seibercom.net
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Saving in MAILDIR format with Sendmail
Message-ID:  <442E94B9.8070203@infracaninophile.co.uk>
In-Reply-To: <200604010929.01704.gerard@seibercom.net>
References:  <200604010929.01704.gerard@seibercom.net>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig69EE8F1C25FAAB08A1C687B4
Content-Type: text/plain; charset=ISO-8859-15
Content-Transfer-Encoding: quoted-printable

Gerard Seibert wrote:
> I presently have Sendmail as my MTA. The mail in /var/mail is in MBOX=20
> format. I wanted to change it to MAILDIR format.
>=20
> 1) Is it possible for Sendmail to save in MAILBOX format directly?
>=20
> 2) If not, can ProcMail be used in this scenario? If so, how would I=20
> configure it? I Googled and noticed something about ending directory=20
> paths in '/' but I did not really understand what it was referring to.
>=20
> 3) If someone has a better solution, I would love to hear it.

It's not actually sendmail that saves the messages on final delivery,
but the local mail delivery process that sendmail hands the message off t=
o.

By default that is mail.local(8) which only supports the Berkeley mbox
format.  So in order to make sendmail deliver e-mails Maildir style, you
will need to substitute a different local delivery agent.  procmail(1) is=

a possibility, as it handles both mbox and Maildir formats.

To make procmail the default delivery agent, add

    FEATURE(local_procmail)dnl

to your /etc/mail/`hostname`.mc file and generate and install a new
sendmail.cf in the usual way[1].

Now you can set up a ${HOME}/.procmailrc for each e-mail user specifying
delivery to a Maildir setup by default:

   :0
   /var/mail/username/

(Procmail assumes Maildir format if the mailbox name ends in a trailing
'/' character, indicating that it is actually a directory rather than a
plain file.)

Remember to create the directories and set ownership and permissions
first.  It might be better to deliver the mail to somewhere under each
user's home directory rather than under /var/mail.  Undoubtedly there wil=
l
be a method of making that style of delivery the default without having t=
o
have individual .procmailrc files in each user account, but that you'll
have to google for.

	Cheers,

	Matthew

[1] cd /etc/mail ; make && make install && make restart

--=20
Dr Matthew J Seaman MA, D.Phil.                       7 Priory Courtyard
                                                      Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey         Ramsgate
                                                      Kent, CT11 9PW


--------------enig69EE8F1C25FAAB08A1C687B4
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFELpS+8Mjk52CukIwRA8IdAJ9J0kXtjEtT+VFyXn0OTA8XDKUWwQCfa96g
Qs24OnJuby7XIhkOTdDFRwM=
=/Zqg
-----END PGP SIGNATURE-----

--------------enig69EE8F1C25FAAB08A1C687B4--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?442E94B9.8070203>