Bug#302215: exim4-config: allow update-exim4.conf to choose default name for Maildir

Frederic LEHOBEY Frederic LEHOBEY <Frederic.Lehobey@free.fr>, 302215@bugs.debian.org
Wed, 30 Mar 2005 19:18:57 +0200


This is a multi-part MIME message sent by reportbug.

--===============0414910463==
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-15"
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Package: exim4-config
Version: 4.50-4
Severity: wishlist
Tags: patch

Hi,

Thanks for your work on exim4.  I have played a bit with you package
today and made a patch allowing to choose any other default name for
~/Maildir with update-exim4.conf.

The idea is to be able to do with exim4 things similar as what is
described here: http://www.ubuntulinux.org/wiki/MailStorageStandardisatio=
n .

The patch is small though (I believe) complete, including bits for the
man page and the README.

Best regards,
Fr=E9d=E9ric Lehobey


-- Package-specific info:
Exim version 4.50 #1 built 02-Mar-2005 07:41:23
Copyright (c) University of Cambridge 2004
Berkeley DB: Sleepycat Software: Berkeley DB 4.2.52: (December  3, 2003)
Support for: iconv() IPv6 GnuTLS
Lookups: lsearch wildlsearch nwildlsearch iplsearch cdb dbm dbmnz dsearch=
 nis nis0 passwd
Authenticators: cram_md5 plaintext
Routers: accept dnslookup ipliteral manualroute queryprogram redirect
Transports: appendfile/maildir/mailstore autoreply lmtp pipe smtp
Fixed never_users: 0
Configuration file is /var/lib/exim4/config.autogenerated

-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.8-2-k7
Locale: LANG=3Dfr_FR@euro, LC_CTYPE=3Dfr_FR@euro (charmap=3DISO-8859-15)

Versions of packages exim4-config depends on:
ii  adduser                 3.63             Add and remove users and gro=
ups
ii  debconf [debconf-2.0]   1.4.30.11        Debian configuration managem=
ent sy
ii  passwd                  1:4.0.3-31sarge1 change and administer passwo=
rd and

-- debconf information excluded

--===============0414910463==
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Disposition: attachment; filename="patch-exim4-maildirlocalname"
Content-Transfer-Encoding: quoted-printable

diff -ru exim4-4.50.orig/debian/README.Debian exim4-4.50/debian/README.De=
bian
--- exim4-4.50.orig/debian/README.Debian	2005-03-30 13:31:56.995952000 +0=
000
+++ exim4-4.50/debian/README.Debian	2005-03-30 13:59:25.338366808 +0000
@@ -378,12 +378,19 @@
 exim to change Reply-To, From, Sender and "MAIL FROM:" accordingly. The
 file includes examples.
=20
-Q: How to I setup exim4 to use Maildir and deliver to ~/Maildir instead
+Q: How do I setup exim4 to use Maildir and deliver to ~/Maildir instead
 of to /var/mail/username? I need this for courier or dovecot.
=20
 A: Add
 dc_localdelivery=3Dmaildir_home
 to /etc/exim4/update-exim4.conf.conf and run "invoke-rc.d exim4 reload".
=20
+Q: How can I change the default directory name for Maildir?
+
+A: Add
+dc_maildirlocalname=3D'myPreferredDirName'
+to /etc/exim4/update-exim4.conf.conf and run "invoke-rc.d exim4 reload".
+Mail will then be delivered to ~/myPreferredDirName.
+
=20
 # vim:tabstop=3D3:expandtab:shiftwidth=3D3:textwidth=3D73
diff -ru exim4-4.50.orig/debian/debconf/conf.d/transport/30_exim4-config_=
maildir_home exim4-4.50/debian/debconf/conf.d/transport/30_exim4-config_m=
aildir_home
--- exim4-4.50.orig/debian/debconf/conf.d/transport/30_exim4-config_maild=
ir_home	2005-03-30 13:31:56.878970000 +0000
+++ exim4-4.50/debian/debconf/conf.d/transport/30_exim4-config_maildir_ho=
me	2005-03-30 13:44:04.357377200 +0000
@@ -7,7 +7,7 @@
 maildir_home:
   debug_print =3D "T: maildir_home for $local_part@$domain"
   driver =3D appendfile
-  directory =3D $home/Maildir
+  directory =3D $home/DEBCONFmaildirlocalnameDEBCONF
   delivery_date_add
   envelope_to_add
   return_path_add
diff -ru exim4-4.50.orig/debian/debconf/update-exim4.conf exim4-4.50/debi=
an/debconf/update-exim4.conf
--- exim4-4.50.orig/debian/debconf/update-exim4.conf	2005-03-30 13:31:56.=
883969000 +0000
+++ exim4-4.50/debian/debconf/update-exim4.conf	2005-03-30 13:41:52.66139=
8032 +0000
@@ -91,6 +91,7 @@
 [ "x${CFILEMODE}" =3D "x" ] && CFILEMODE=3D644
 [ "x${dc_use_split_config}" =3D "x" ] && dc_use_split_config=3D'false'
 [ "x${dc_localdelivery}" =3D "x" ] && dc_localdelivery=3D'mail_spool'
+[ "x${dc_maildirlocalname}" =3D "x" ] && dc_maildirlocalname=3D'Maildir'
 [ "x${UPEX4C_comments}" =3D "x" ] && UPEX4C_comments=3D"${ue4c_keepcomme=
nts:-no}"
=20
 mailname=3D`cat /etc/mailname | head -n 1`
@@ -337,6 +338,7 @@
 		-e "s=C4DEBCONFreturn_pathDEBCONF=C4${DEBCONFreturn_pathDEBCONF}=C4g" =
\
 		-e "s=C4DEBCONF_hardcode_primary_hostname_DEBCONF=C4${hardcode_primary=
_hostname}=C4g" \
 		-e "s=C4DEBCONFlocaldeliveryDEBCONF=C4${dc_localdelivery}=C4g" \
+		-e "s=C4DEBCONFmaildirlocalnameDEBCONF=C4${dc_maildirlocalname}=C4g" \
 		-e "s=C4DEBCONFrewriteemailaddresses_mailnameDEBCONF=C4${dc_rewriteema=
iladdresses_mailname}=C4g" \
 	| removecomments \
 		>> ${UPEX4C_outputfile}.tmp
@@ -361,6 +363,7 @@
 		-e "s=C4DEBCONFreturn_pathDEBCONF=C4${DEBCONFreturn_pathDEBCONF}=C4g" =
\
 		-e "s=C4DEBCONF_hardcode_primary_hostname_DEBCONF=C4${hardcode_primary=
_hostname}=C4g" \
 		-e "s=C4DEBCONFlocaldeliveryDEBCONF=C4${dc_localdelivery}=C4g" \
+		-e "s=C4DEBCONFmaildirlocalnameDEBCONF=C4${dc_maildirlocalname}=C4g" \
 		-e "s=C4DEBCONFrewriteemailaddresses_mailnameDEBCONF=C4${dc_rewriteema=
iladdresses_mailname}=C4g" \
 		< /etc/exim4/exim4.conf.template \
 	| removecomments \
diff -ru exim4-4.50.orig/debian/manpages/update-exim4.conf.8 exim4-4.50/d=
ebian/manpages/update-exim4.conf.8
--- exim4-4.50.orig/debian/manpages/update-exim4.conf.8	2005-03-30 13:31:=
56.974956000 +0000
+++ exim4-4.50/debian/manpages/update-exim4.conf.8	2005-03-30 14:32:20.17=
3146288 +0000
@@ -172,6 +172,11 @@
 transport for local delivery, i.e. usually mail_spool or maildir_home. I=
t
 defaults to mail_spool if dc_localdelivery is unset.
 .TP
+.I DEBCONFmaildirlocalnameDEBCONF
+is replaced by the contents of dc_maildirlocalname in
+/etc/exim4/update\-exim4.conf.conf. It defaults to Maildir if unset. Its
+use is relevant only when dc_localdelivery is set to maildir_home.=20
+.TP
 .I DEBCONFrewriteemailaddresses_mailnameDEBCONF
 is replaced with this rewriting rule:
 .br
@@ -239,8 +244,14 @@
 .TP
 .I dc_localdelivery
 name of the default transport for local mail delivery. Defaults to mail_=
spool
-if unset, use maildir_home for delivery to ~/Maildir/. This setting
-does not correspond to a Debconf question and needs to be set manually.
+if unset, use maildir_home for delivery to ~/Maildir/ or directory name =
set
+in dc_maildirlocalname. This setting does not correspond to a Debconf
+question and needs to be set manually.
+.TP
+.I dc_maildirlocalname
+name of the Maildir directory in users home. Defaults to Maildir if unse=
t.
+This setting does not correspond to a Debconf question and needs to be s=
et
+manually. Like \(lqdc_maildirlocalname=3D'.Maildir'\(rq.
 .TP
 .I ue4c_keepcomments
 Boolean option that controls whether

--===============0414910463==--