~ubuntu-branches/ubuntu/quantal/dovecot/quantal

« back to all changes in this revision

Viewing changes to debian/dovecot-postfix.preinst

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short, Scott Kitterman
  • Date: 2010-06-22 10:33:51 UTC
  • mfrom: (1.13.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20100622103351-ifbmnklp8kxrhb30
Tags: 1:1.2.12-0ubuntu1
* New upstream release:
  - deliver: Don't crash when a message with Auto-submitted: header gets
   rejected.
  - lib-storage: Fixed header searches to work correctly when there are
    multiple headers with same name.
  - dict client: Disconnect from dict server after 1 second of idling.
  - dict: If process crashed, it wasn't automatically restarted
  - dict file: If dict file's group permissions equal world permissions,
    don't try to change its gid.
  - maildir: Fixed a memory leak when copying with hardlinks.
  - maildir: Expunging last messages may have assert-crashed if their
    filenames had just changed.
 * Update sieve patch to 0.1.17
 * debian/dovecot-common.postinst: Add warning about expired certificate.
   (Debian Bug: #576455)
 * Silence lintian warnings.

 [Scott Kitterman]
 * Rename dovecot-postfix to mail-stack-delivery per server-maverick-mail-
   integration spec.
   - Update debian/rules
   - Convert existing package to a dummy package and add new binary in debian/control
   - Update maintainer scripts.
   - Move previously installed backups and config files to new package name
     space in preinst
   - Add new debian/mail-stack-delivery.prerm to handle downgrades
   - Rename debian/dovecot-postfix.* to debian/mail-stack-delivery.*

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh
2
 
 
3
 
set -e
4
 
 
5
 
# Check if dovecot-postfix.conf had any customizations
6
 
if [ -f "/usr/share/dovecot/dovecot-postfix.conf" ]; then
7
 
       if [ -f "/etc/dovecot/dovecot-postfix.conf" ]; then
8
 
               mv /etc/dovecot/dovecot-postfix.conf /etc/dovecot/dovecot-postfix.conf.bak
9
 
               DIR=`mktemp -d`
10
 
               egrep -v ^protocol /etc/dovecot/dovecot-postfix.conf.bak > $DIR/dovecot-postfix-custom.conf
11
 
               egrep -v ^protocol /usr/share/dovecot/dovecot-postfix.conf > $DIR/dovecot-postfix-dist.conf
12
 
               if diff -qur $DIR/dovecot-postfix-dist.conf $DIR/dovecot-postfix-custom.conf 1>/dev/null 2>&1; then
13
 
                       rm -f /etc/dovecot/dovecot-postfix.conf.bak
14
 
               else
15
 
                       awk ' /^auth default/ {flag=1;next} /^}/{flag=0} flag { print }' /etc/dovecot/dovecot-postfix.conf.bak > /etc/dovecot/auth.d/01-dovecot-postfix.auth
16
 
                       awk ' /^## Dovecot conf/{flag=1} /^auth default/{flag=0} flag { print }' /etc/dovecot/dovecot-postfix.conf.bak > /etc/dovecot/conf.d/01-dovecot-postfix.conf
17
 
                       awk ' /^# If you wish to use another authentication server than dovecot-auth/{flag=1} flag { print }' /etc/dovecot/dovecot-postfix.conf.bak >> /etc/dovecot/conf.d/01-dovecot-postfix.conf
18
 
               fi
19
 
               rm -rf $DIR
20
 
       fi
21
 
       
22
 
fi
23
 
 
24
 
#DEBHELPER#