~ubuntu-dev/ubuntu/lucid/dovecot/lucid-201002101901

« back to all changes in this revision

Viewing changes to doc/wiki/LDA.txt

  • Committer: Chuck Short
  • Date: 2010-01-21 20:21:25 UTC
  • mfrom: (4.1.11 squeeze)
  • Revision ID: zulcss@ubuntu.com-20100121202125-pme73o491kfwj5nc
* Merge from debian testing, remaining changes:
  + Add new binary pkg dovecot-postfix that integrates postfix and dovecot
    automatically: (LP: #164837)
  + debian/control:
    - add new binary with short description
    - set Architecture all for dovecot-postfix (LP: #329878)
  + debian/dovecot-postfix.postinst:
    - create initial certificate symlinks to snakeoil.
    - set up postfix with postconf to:
      - use Maildir/ as the default mailbox.
      - use dovecot as the sasl authentication server.
      - use dovecot LDA (deliver).
      - use tls for smtp{d} services.
    - fix certificates paths in postfix' main.cf
    - add reject_unauth_destination to postfix' recipient restrictions
    - add reject_unknown_sender_domain to postfix' sender restriction
    - rename configuration name on remove, delete on purge
    - restart dovecot after linking certificates
    - handle use case when postfix is unconfigurated
  + debian/dovecot-postfix.dirs: create backup directory for postfix's config
    configuration
  + restart postfix and dovecot.
  + debian/dovecot-postfix.postrm:
    - remove all dovecot related configuration from postfix.
    - restart postfix and dovecot.
  + debian/dovecot-common.init:
    - check if /etc/dovecot/dovecot-postfix.conf exists and use it
      as the configuration file if so.
  + debian/patches/warning-ubuntu-postfix.dpatch
    - add warning about dovecot-postfix.conf in dovecot default
      configuration file
  + debian/patches/dovecot-postfix.conf.diff:
    - Ubuntu server custom changes to the default dovecot configuration for
      better interfation with postfix.
    - enable sieve plugin.
    - Ubuntu server custom changes to the default dovecot configuration for
      better integration with postfix:
      - enable imap, pop3, imaps, pop3s and managesieve by default.
      - enable dovecot LDA (deliver).
      - enable SASL auth socket in postfix private directory
   + debian/rules:
     - copy, patch and install dovecot-postfix.conf in /etc/dovecot/.
     - build architecure independent packages too
   + Use Snakeoil SSL certificates by default.
     - debian/control: Depend on ssl-cert.
     - debian/patches/ssl-cert-snakeoil.dpatch: Change default SSL cert
       paths to snakeoil.
     - debian/dovecot-common.postinst: Relax grep for SSL_* a bit.
   + Add autopkgtest to debian/tests/*.
   + Fast TearDown: Update the lsb init header to not stop in level 6.
   + Add ufw integration:
     - Created debian/dovecot-common.ufw.profile.
     - debian/rules: install profile.
     - debian/control: suggest ufw.
   + debian/{control,rules}: enable PIE hardening.
   + dovecot-imapd, dovecot-pop3: Replaces dovecot-common (<< 1:1.1). (LP: #254721)
   + debian/control: Update Vcs-* headers.
   + Add SMTP-AUTH support for Outlook (login auth mechanism)
* New upstream release.
* debian/patches/gold-fix.patch: Removed. Fixed upstream.
* Moved libexec to lib corrections in dovecot-managesieve.patch and
  dovecot-managesieve-dist.patch to dovecot-example.patch
* debian/patches/dovecot-mboxlocking.patch: Regenerated to avoid FTBFS
  when quilt isn't installed.
* debian/patches/quota-mountpoint.patch: Removed. Not needed anymore.
* debian/patches/dovecot-quota.patch: Removed. Quotas aren't properly
  enabled unless mail_plugins = quota imap_quota.
* debian/patches/gold-fix.patch: Fixed configure script to build even
  with binutils-gold or --no-add-needed linker flag (Closes: #554306)
* debian/dovecot-common.init: fixed LSB headers. Thanks to Pascal Volk.
  (Closes: #558040)
* debian/changelog: added CVE references to previous changelog entry.
* debian/rules: checked up the build system. It's not fragile anymore.
  (Closes: 493803)
* debian/dovecot-common.postinst: Now invoking dpkg-reconfigure
  on dovecot-common is enough to generate new certificates
  if the previous ones were removed. (Closes: #545582)
* debian/rules: No longer install convert-tool in /usr/bin.
  It isn't an user utility and it should stay in /usr/lib/dovecot
  like all other similar tool.
* New upstream release. (Closes: #557601)
* [SECURITY] Fixes local information disclosure and denial of service.
  (see: http://www.dovecot.org/list/dovecot-news/2009-November/000143.html
  and CVE-2009-3897)
* Added myself to uploaders.
* Switched to the new source format "3.0 (quilt)":
  - removed dpatch from build-depends
  - removed debian/README.source because now we use only standard
    dpkg features
  - regenerated all patches
* Prepared to switch to multi-origin source:
  - recreated dovecot-libsieve.patch and dovecot-managesieve-dist.patch
    starting from the upstream tarball
  - removed all autotools related build-depends and build-conflict
  - renamed dovecot-libsieve and dovecot-managesieve directories
    to libsieve and managesieve.
* debian/rules: Moved the configuration of libsieve and managesieve from
  the build phase to the configuration phase
* Added dovecot-dbg package  with debugging symbols.  Thanks Stephan Bosch.
  (Closes: #554710)
* Fixed some stray libexec'isms in the default configuration.
* New upstream release.
* debian/dovecot-common.init:
  - use $CONF when starting the daemon. (Closes: #549944)
  - always output start/stop messages. (Closes: #523810)

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
   '/usr/lib/sendmail', which doesn't necessarily work the same as
38
38
   '/usr/sbin/sendmail'.
39
39
 * 'auth_socket_path' specifies the UNIX socket to dovecot-auth where deliver
40
 
   can lookup userdb information when '-d' parameter is used.
 
40
   can lookup userdb information when '-d' parameter is used. See below how to
 
41
   configure Dovecot to create the socket.
41
42
 
42
43
Note that 'dovecot.conf' file must be world readable to enable deliver process
43
 
read it, while running with user priviledges.
 
44
read it, while running with user privileges.
44
45
 
45
46
Parameters
46
47
----------
48
49
Parameters accepted by deliver:
49
50
 
50
51
 * '-d <username>': Destination username. If given, the user information is
51
 
   looked up from dovecot-auth.
 
52
   looked up from dovecot-auth. Typically used with virtual users, but not
 
53
   necessarily with system users.
52
54
 * '-a <address>': Destination address (e.g. user+ext@domain). Default is the
53
55
   same as username. (v1.1+ only)
54
56
 * '-f <address>': Envelope sender address. Currently this is used only for
139
141
    # Note that we're setting a master socket. SMTP AUTH for Postfix and Exim
140
142
uses client sockets.
141
143
    master {
 
144
      # Typically under base_dir/, if not the directory must be created.
142
145
      path = /var/run/dovecot/auth-master
 
146
 
143
147
      # Auth master socket can be used to look up userdb information for
144
148
      # given usernames. This probably isn't very sensitive information
145
149
      # for most systems, but still try to restrict the socket access if
183
187
-------------
184
188
 
185
189
If you're using more than one UID for users, you're going to have problems
186
 
running deliver. Most MTAs won't let you run deliver as root, so for now you'll
187
 
need to make it setuid root. However *it's insecure to make deliver
188
 
setuid-root*, especially if you have untrusted users in your
189
 
system.*Setuid-root deliver can be used to gain root privileges*. You should
190
 
take extra steps to make sure that untrusted users can't run it and potentially
191
 
gain root privileges. You can do this by making sure only your MTA has
192
 
execution access to it. For example:
 
190
running deliver, as most MTAs won't let you run deliver as root. There are two
 
191
ways to work around this problem:
 
192
 
 
193
 1. Make deliver setuid-root.
 
194
 2. Use sudo to wrap the invocation of deliver.
 
195
 
 
196
Making deliver setuid-root:
 
197
---------------------------
 
198
 
 
199
Beware: *it's insecure to make deliver setuid-root*, especially if you have
 
200
untrusted users in your system.*Setuid-root deliver can be used to gain root
 
201
privileges*. You should take extra steps to make sure that untrusted users
 
202
can't run it and potentially gain root privileges. You can do this by making
 
203
sure only your MTA has execution access to it. For example:
193
204
 
194
205
---%<-------------------------------------------------------------------------
195
206
# chgrp secmail /usr/local/libexec/dovecot/deliver
198
209
-rwsr-x--- 1 root secmail 4023932 2009-01-15 16:23 deliver
199
210
---%<-------------------------------------------------------------------------
200
211
 
201
 
Then start deliver as a user that belongs to secmail group.
 
212
Then start deliver as a user that belongs to secmail group. Note that you have
 
213
to recreate these rights after each update of dovecot.
 
214
 
 
215
Using sudo:
 
216
-----------
 
217
 
 
218
Alternatively, you can use sudo to wrap the invocation of deliver. This has the
 
219
advantage that updates will not clobber the setuid bit, but note that *it is
 
220
just as insecure being able to run deliver via sudo as setuid-root*. Make sure
 
221
you only give your MTA the ability to invoke deliver via sudo.
 
222
 
 
223
First configure sudo to allow 'dovelda' user to invoke deliver by adding the
 
224
following to your '/etc/sudoers':
 
225
 
 
226
---%<-------------------------------------------------------------------------
 
227
Defaults:dovelda !syslog
 
228
dovelda          ALL=NOPASSWD:/usr/local/libexec/dovecot/deliver
 
229
---%<-------------------------------------------------------------------------
 
230
 
 
231
Then configure your MTA to invoke deliver as user 'dovelda' and via sudo:
 
232
 
 
233
---%<-------------------------------------------------------------------------
 
234
/usr/bin/sudo /usr/local/libexec/dovecot/deliver
 
235
---%<-------------------------------------------------------------------------
 
236
 
 
237
instead of just plain '/usr/local/libexec/dovecot/deliver'.
202
238
 
203
239
Problems with deliver
204
240
---------------------
242
278
protocol lda {
243
279
 ..
244
280
  # remember to give proper permissions for these files as well
245
 
  log_path = /var/log/dovecot-deliver.log
 
281
  log_path = /var/log/dovecot-deliver-errors.log
246
282
  info_log_path = /var/log/dovecot-deliver.log
247
283
}
248
284
---%<-------------------------------------------------------------------------
257
293
  # You can also override the default syslog_facility:
258
294
  #syslog_facility = mail
259
295
}
 
296
Dovecot
260
297
---%<-------------------------------------------------------------------------
261
298
 
262
299
Plugins
266
303
 * Virtual quota can be enforced using <Quota plugin> [Quota.txt].
267
304
 * Sieve language support can be added with <Sieve plugin> [LDA.Sieve.txt]. 
268
305
 
269
 
(This file was created from the wiki on 2009-07-10 04:42)
 
306
(This file was created from the wiki on 2009-10-16 04:42)