Debian

Available patches from Ubuntu

To see Ubuntu differences wrt. to Debian, write down a grep-dctrl query identifying the packages you're interested in:
grep-dctrl -n -sPackage Sources.Debian
(e.g. -FPackage linux-ntfs or linux-ntfs)

Modified packages are listed below:

Debian ( Changelog | PTS | Bugs ) Ubuntu ( Changelog | txt | LP | Bugs ) | Diff from Ubuntu

Source: dovecot

dovecot (1:2.2.24-1ubuntu1) yakkety; urgency=medium * Merge with Debian; Remaining Changes: + Add autopkgtest to debian/tests/*. + Drop build dependency on libstemmer-dev (universe) + Use Snakeoil SSL certificates by default - d/control: Depend on ssl-cert + add lsb base dependency to ensure debian/dovecot-core.dovecot.init is working correctly + Add ufw integration: - d/dovecot-core.ufw.profile: new ufw profile. - d/rules: install profile in dovecot-core. - d/control: dovecot-core - suggest ufw. + Add apport hook: - d/rules, d/source_dovecot.py + Remove lintian override for drac + Add mail-stack-delivery - add package in d/rules, d/control - add d/*mail-stack-delivery* maintainer scripts and default conf - d/mail-stack-delivery.preinst: Move previously installed backups and config files to a new package namespace. * Added Changes: - Disable dovecot-lucene plugin as it had various issues, has universe dependencies and is deprecated in favor of solr anyway (LP: #1524526). - Fixup the autopkgtests we add to work with recent dovecot versions - d/mail-stack-delivery.README.Debian clarified use of configuration files - handle conffile removal of /etc/init/dovecot.conf (due to dropping upstart). Can be removed once no upgrade path from <yakkety is left. * Dropped Changes: - Add upstart job (that means we no more add it now) - no more needed upgrade handling of mail-stack-delivery related to 2.1.7-7 and 1.2.9-1ubuntu8 (both out of scope of any possible paths now) - d/dovecot-core.dirs: Added usr/share/doc/dovecot-core (was only left in changelog) - ntpdate Recommends (was missing in former Changelog, now superseded by timesyncd which is available by default) - adding of d/docs for dh_installdocs -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Tue, 21 Jun 2016 16:31:29 +0200

Modifications :
  1. Download patch debian/mail-stack-delivery.postinst

    --- 1:2.2.24-1/debian/mail-stack-delivery.postinst 1970-01-01 00:00:00.000000000 +0000 +++ 1:2.2.24-1ubuntu1/debian/mail-stack-delivery.postinst 2016-08-18 02:01:05.000000000 +0000 @@ -0,0 +1,91 @@ +#!/bin/sh + +set -e + +POSTFIX_BCKFILE="/var/backups/mail-stack-delivery/main.cf-backup" + +set_postfix_option() { + opt="$1" + # Backup the existion value of the option + postconf $(echo ${opt} | cut -d= -f1) >> ${POSTFIX_BCKFILE} || true + # Set the new value of the option + postconf -e "${opt}" + echo -n '.' +} + +if [ "$1" = "configure" ]; then + # Create initial symlinks for certificates + SSL_CERT=$( (grep -m 1 "ssl_cert_file" /etc/dovecot/conf.d/10-ssl.conf || echo '/etc/dovecot/dovecot.pem') | cut -d'=' -f2) + SSL_KEY=$( (grep -m 1 "ssl_key_file" /etc/dovecot/conf.d/10-ssl.conf || echo '/etc/dovecot/private/dovecot.pem') | cut -d'=' -f2) + + if [ ! -e "${SSL_KEY}" ]; then + ln -s /etc/ssl/private/ssl-cert-snakeoil.key ${SSL_KEY} + fi + if [ ! -e "${SSL_CERT}" ]; then + ln -s /etc/ssl/certs/ssl-cert-snakeoil.pem ${SSL_CERT} + fi + # Configure postfix either on new install + # or if the postfix backup file is no longer there + # (only deleted when the pkg is removed) + if [ -f "/etc/postfix/main.cf" ]; then + if [ -e "$POSTFIX_BCKFILE" ]; then + cp $POSTFIX_BCKFILE ${POSTFIX_BCKFILE}-$(date +%Y%m%d%H%M) + fi + if [ -z "$2" -o ! -e "$POSTFIX_BCKFILE" ]; then + if which postconf >/dev/null; then + # Setup postfix + echo 'Mail stack delivery changes some postfix settings.' + echo 'Old values are stored in '$POSTFIX_BCKFILE'.' + echo 'Feel free to revert any of them when the process is done.' + echo -n 'Configuring postfix for mail-stack-delivery integration: ' + set_postfix_option "home_mailbox = Maildir/" + set_postfix_option "smtpd_sasl_auth_enable = yes" + set_postfix_option "smtpd_sasl_type = dovecot" + set_postfix_option "smtpd_sasl_path = private/dovecot-auth" + set_postfix_option "smtpd_sasl_authenticated_header = yes" + set_postfix_option "smtpd_sasl_security_options = noanonymous" + set_postfix_option "smtpd_sasl_local_domain = \$myhostname" + set_postfix_option "broken_sasl_auth_clients = yes" + set_postfix_option "smtpd_recipient_restrictions = reject_unknown_sender_domain, reject_unknown_recipient_domain, reject_unauth_pipelining, permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination" + set_postfix_option "smtpd_sender_restrictions = reject_unknown_sender_domain" + set_postfix_option "mailbox_command = /usr/lib/dovecot/deliver -c /etc/dovecot/dovecot.conf -m \"\${EXTENSION}\"" + set_postfix_option "smtpd_tls_cert_file = ${SSL_CERT}" + set_postfix_option "smtpd_tls_key_file = ${SSL_KEY}" + set_postfix_option "smtpd_use_tls = yes" + set_postfix_option "smtp_use_tls = yes" + set_postfix_option "smtpd_tls_received_header = yes" + set_postfix_option "smtpd_tls_mandatory_protocols = SSLv3, TLSv1" + set_postfix_option "smtpd_tls_mandatory_ciphers = medium" + set_postfix_option "smtpd_tls_auth_only = yes" + set_postfix_option "tls_random_source = dev:/dev/urandom" + echo ' done.' + fi + fi + else + echo "" + echo "Postfix not configured. Run" + echo "sudo dpkg-reconfigure postfix and choose" + echo "the type of mail server. Then run" + echo "sudo dpkg-reconfigure mail-stack-delivery to" + echo "finish mail-stack-delivery installation." + echo "" + fi + + if [ -x "/etc/init.d/dovecot" ]; then + if [ -x /usr/sbin/invoke-rc.d ]; then + invoke-rc.d dovecot restart + else + service dovecot restart + fi + fi + if [ -x "/etc/init.d/postfix" ]; then + if [ -x /usr/sbin/invoke-rc.d ]; then + invoke-rc.d postfix restart + else + service postfix restart + fi + fi + +fi + +#DEBHELPER#
  2. Download patch debian/mail-stack-delivery.README.Debian

    --- 1:2.2.24-1/debian/mail-stack-delivery.README.Debian 1970-01-01 00:00:00.000000000 +0000 +++ 1:2.2.24-1ubuntu1/debian/mail-stack-delivery.README.Debian 2016-08-18 02:01:05.000000000 +0000 @@ -0,0 +1,24 @@ +Introduction +------------------- + +Mail-stack-delivery will not install any binary or library files. This package +contains only configuration file /etc/dovecot/mail-stack-delivery.conf with +configuration prerpared by Ubuntu Server Team. + +The matching configuration for dovecot is placed in: + /etc/dovecot/conf.d/99-mail-stack-delivery.conf + +During installation of package, it modifies postfix's configuration and +stores original version of /etc/postfix/main.cf in /var/backup/mail-stack-delivery. + +Features of mail-stack-delivery: +---------------------------- + +- IMAP4rev1 and POP3, including support for TLS and SSL +- SMTP, including support for TLS and SSL +- support for sieve scripting +- managesieve for managing sieve scripts directly on server +- dovecot MDA, including extensions separated with '+' +- Maildir storage engine +- SASL authentication (plain and login) +- support only for medium and high TLS/SSL ciphers
  3. Download patch debian/tests/testlib_dovecot.py

    --- 1:2.2.24-1/debian/tests/testlib_dovecot.py 1970-01-01 00:00:00.000000000 +0000 +++ 1:2.2.24-1ubuntu1/debian/tests/testlib_dovecot.py 2016-08-18 02:01:05.000000000 +0000 @@ -0,0 +1,112 @@ +#!/usr/bin/python +''' + Packages required: dovecot-imapd dovecot-pop3d +''' + +import subprocess, shutil, grp, os, os.path, sys, time + +class Dovecot: + def get_mailbox(self): + return self.mailbox + + def __init__(self,user,config=None): + '''Create test scenario. + + dovecot is configured for all protocols (imap[s] and pop3[s]), a test + user is set up, and /var/mail/$user contains an unread and a read mail. + ''' + + self.old_version = False + if config == None: + config=''' +protocols = imap pop3 +log_timestamp = "%Y-%m-%d %H:%M:%S " +mail_privileged_group = mail +managesieve_notify_capability = mailto +managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date index ihave duplicate mime foreverypart extracttext +mmap_disable = yes +ssl = yes +ssl_cert = </etc/dovecot/dovecot.pem +ssl_key = </etc/dovecot/private/dovecot.pem +auth_mechanisms = PLAIN +mail_location = mbox:~/mail:INBOX=/var/mail/%u +service auth { + user = root +} +protocol pop3 { + pop3_uidl_format = %08Xu%08Xv +} +userdb { + driver = passwd +} +passdb { + driver = passwd-file + args = username_format=%n scheme=PLAIN /etc/dovecot/test.passwd +} +''' + + # make sure that /etc/inetd.conf exists to avoid init script errors + self.created_inetdconf = False + if not os.path.exists('/etc/inetd.conf'): + open('/etc/inetd.conf', 'a') + self.created_inetdconf = True + + # configure and restart dovecot + if not os.path.exists('/etc/dovecot/dovecot.conf.autotest'): + shutil.copyfile('/etc/dovecot/dovecot.conf', '/etc/dovecot/dovecot.conf.autotest') + cfgfile = open('/etc/dovecot/dovecot.conf', 'w') + cfgfile.write(config) + cfgfile.close() + + file('/etc/dovecot/test.passwd','w').write('%s:{plain}%s\n' % (user.login, user.password) ) + + # restart will fail if dovecot is not already running + subprocess.call(['/etc/init.d/dovecot', 'stop'], stdout=subprocess.PIPE) + # systemd rate limit will kill it without a bit of sleep (max 5 in 10 sec) + time.sleep(3) + assert subprocess.call(['/etc/init.d/dovecot', 'start'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) == 0 + + # create test mailbox with one new and one old mail + self.mailbox = '/var/mail/' + user.login + self.orig_mbox = \ +'''From test1@test1.com Fri Nov 17 02:21:08 2006 +Date: Thu, 16 Nov 2006 17:12:23 -0800 +From: Test User 1 <test1@test1.com> +To: Dovecot tester <dovecot@test.com> +Subject: Test 1 +Status: N + +Some really important news. + +From test2@test1.com Tue Nov 28 11:29:34 2006 +Date: Tue, 28 Nov 2006 11:29:34 +0100 +From: Test User 2 <test2@test2.com> +To: Dovecot tester <dovecot@test.com> +Subject: Test 2 +Status: R + +More news. + +Get cracking! +''' + open(self.mailbox, 'w').write(self.orig_mbox) + os.chown(self.mailbox, user.uid, grp.getgrnam('mail')[2]) + os.chmod(self.mailbox, 0660) + + def __del__(self): + # restore original configuration and restart dovecot + os.rename('/etc/dovecot/dovecot.conf.autotest', '/etc/dovecot/dovecot.conf') + # quiesce, default configuration has no protocols + subprocess.call(['/etc/init.d/dovecot', 'restart'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) + + if self.created_inetdconf: + os.unlink('/etc/inetd.conf') + + def get_ssl_fingerprint(self): + pem = '/etc/ssl/certs/dovecot.pem' + if not os.path.exists(pem): + pem = '/etc/ssl/certs/ssl-cert-snakeoil.pem' + + sp = subprocess.Popen(['openssl','x509','-in',pem,'-noout','-md5','-fingerprint'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, close_fds=True) + return sp.communicate(None)[0].split('=',1)[1].strip() +
  4. Download patch debian/tests/general
  5. Download patch debian/tests/control

    --- 1:2.2.24-1/debian/tests/control 2016-05-09 07:45:11.000000000 +0000 +++ 1:2.2.24-1ubuntu1/debian/tests/control 2016-08-18 02:01:05.000000000 +0000 @@ -4,3 +4,9 @@ Restrictions: needs-root Tests: systemd Depends: dovecot-core, systemd-sysv + +# the old Ubuntu tests +Tests: general +Restrictions: needs-root +Features: no-build-needed +Depends: python, dovecot-imapd, dovecot-pop3d, dovecot-managesieved, mail-stack-delivery
  6. Download patch debian/rules

    --- 1:2.2.24-1/debian/rules 2016-05-09 07:45:11.000000000 +0000 +++ 1:2.2.24-1ubuntu1/debian/rules 2016-08-18 02:01:05.000000000 +0000 @@ -57,8 +57,6 @@ sieve_files = usr/bin/sieve* \ solr_files = usr/lib/dovecot/modules/lib??_fts_solr_* -lucene_files = usr/lib/dovecot/modules/lib??_fts_lucene_* - dev_files = usr/include/* \ usr/lib/dovecot/dovecot-config @@ -77,7 +75,7 @@ override_dh_auto_configure: --with-solr \ --with-ioloop=best \ --with-libwrap \ - --with-lucene \ + --without-lucene \ --with-lz4 \ --prefix=/usr \ --sysconfdir=/etc \ @@ -143,6 +141,14 @@ override_dh_install: | perl -ne '/"(.+)\(.+\)"/ && print $$1' \ | tr '[A-Z]' '[a-z]' > $(PKG_DIR:PKG=dev)/usr/share/dovecot/dovecot-abi + install -m644 debian/dovecot-core.ufw.profile debian/dovecot-core/etc/ufw/applications.d/dovecot-core + + # Install apport hook + install -D -m 644 debian/source_dovecot.py $(CURDIR)/debian/dovecot-core/usr/share/apport/package-hooks/dovecot-core.py + + mkdir -p $(CURDIR)/debian/mail-stack-delivery/etc/dovecot/conf.d/ + cp $(CURDIR)/debian/99-mail-stack-delivery.conf $(CURDIR)/debian/mail-stack-delivery/etc/dovecot/conf.d/ + override_dh_installpam: dh_installpam -pdovecot-core --name=dovecot
  7. Download patch debian/dovecot-core.maintscript

    --- 1:2.2.24-1/debian/dovecot-core.maintscript 1970-01-01 00:00:00.000000000 +0000 +++ 1:2.2.24-1ubuntu1/debian/dovecot-core.maintscript 2016-08-18 02:01:05.000000000 +0000 @@ -0,0 +1 @@ +rm_conffile /etc/init/dovecot.conf 1:2.2.22-1ubuntu4
  8. Download patch debian/control

    --- 1:2.2.24-1/debian/control 2016-05-09 07:45:11.000000000 +0000 +++ 1:2.2.24-1ubuntu1/debian/control 2016-08-18 02:01:05.000000000 +0000 @@ -1,7 +1,8 @@ Source: dovecot Section: mail Priority: optional -Maintainer: Dovecot Maintainers <jaldhar-dovecot@debian.org> +Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> +XSBC-Original-Maintainer: Dovecot Maintainers <jaldhar-dovecot@debian.org> Uploaders: Jaldhar H. Vyas <jaldhar@debian.org>, Fabio Tranchitella <kobold@debian.org>, Joel Johnson <mrjoel@lixil.net>, Marco Nenciarini <mnencia@debian.org>, Jelmer Vernooij <jelmer@debian.org>, Apollon Oikonomopoulos <apoikos@debian.org> Build-Depends: debhelper (>= 9), dpkg-dev (>= 1.16.1), @@ -23,11 +24,9 @@ Build-Depends: debhelper (>= 9), libwrap0-dev, dh-systemd, lsb-release, - libclucene-dev (>= 2.3), liblzma-dev, liblz4-dev, libexttextcat-dev, - libstemmer-dev, autotools-dev, dh-exec Standards-Version: 3.9.7 @@ -37,11 +36,13 @@ Vcs-Browser: https://anonscm.debian.org/ Package: dovecot-core Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, libpam-runtime (>= 0.76-13.1), openssl, adduser, ucf (>= 2.0020) -Suggests: ntp, dovecot-gssapi, dovecot-sieve, dovecot-pgsql, dovecot-mysql, dovecot-sqlite, dovecot-ldap, dovecot-imapd, dovecot-pop3d, dovecot-lmtpd, dovecot-managesieved, dovecot-solr, dovecot-lucene +Depends: ${shlibs:Depends}, ${misc:Depends}, libpam-runtime (>= 0.76-13.1), openssl, adduser, ucf (>= 2.0020), ssl-cert, lsb-base +Suggests: ntp, dovecot-gssapi, dovecot-sieve, dovecot-pgsql, dovecot-mysql, dovecot-sqlite, dovecot-ldap, dovecot-imapd, dovecot-pop3d, dovecot-lmtpd, dovecot-managesieved, dovecot-solr, ufw Provides: dovecot-common, dovecot-abi-${dovecot:ABI-Version} -Replaces: dovecot-common (<< 1:2.0.14-2~), mailavenger (<< 0.8.1-4) -Breaks: dovecot-common (<< 1:2.0.14-2~), mailavenger (<< 0.8.1-4) +Replaces: dovecot-common (<< 1:2.0.14-2~), mailavenger (<< 0.8.1-4), + dovecot-lucene (<<1:2.2.24~) +Breaks: dovecot-common (<< 1:2.0.14-2~), mailavenger (<< 0.8.1-4), + dovecot-lucene (<<1:2.2.24~) Description: secure POP3/IMAP server - core files Dovecot is a mail server whose major goals are security and extreme reliability. It tries very hard to handle all error conditions and verify @@ -206,18 +207,6 @@ Description: secure POP3/IMAP server - S . This package provides Solr full text search support for Dovecot. -Package: dovecot-lucene -Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, dovecot-core (= ${binary:Version}) -Description: secure POP3/IMAP server - Lucene support - Dovecot is a mail server whose major goals are security and extreme - reliability. It tries very hard to handle all error conditions and verify - that all data is valid, making it nearly impossible to crash. It supports - mbox/Maildir and its own dbox/mdbox formats, and should also be pretty - fast, extensible, and portable. - . - This package provides Lucene full text search support for Dovecot. - Package: dovecot-dbg Section: debug Priority: extra @@ -231,3 +220,18 @@ Description: secure POP3/IMAP server - d fast, extensible, and portable. . This package contains debug symbols for Dovecot. + +Package: mail-stack-delivery +Architecture: all +Depends: dovecot-core, dovecot-imapd, dovecot-pop3d, dovecot-managesieved, + postfix, ${misc:Depends} +Replaces: dovecot-postfix (<< 1:1.2.12-0ubuntu1~) +Description: mail server delivery agent stack provided by Ubuntu server team + Ubuntu's mail stack provides fully operational delivery with + safe defaults and additional options. Out of the box it supports IMAP, + POP3 and SMTP services with SASL authentication and Maildir as default + storage engine. + . + This package contains configuration files for dovecot. + . + This package modifies postfix's configuration to integrate with dovecot
  9. Download patch debian/mail-stack-delivery.dirs

    --- 1:2.2.24-1/debian/mail-stack-delivery.dirs 1970-01-01 00:00:00.000000000 +0000 +++ 1:2.2.24-1ubuntu1/debian/mail-stack-delivery.dirs 2016-08-18 02:01:05.000000000 +0000 @@ -0,0 +1,2 @@ +var/backups +var/backups/mail-stack-delivery
  10. Download patch debian/99-mail-stack-delivery.conf

    --- 1:2.2.24-1/debian/99-mail-stack-delivery.conf 1970-01-01 00:00:00.000000000 +0000 +++ 1:2.2.24-1ubuntu1/debian/99-mail-stack-delivery.conf 2016-08-18 02:01:05.000000000 +0000 @@ -0,0 +1,48 @@ +# Some general options +protocols = imap pop3 sieve +disable_plaintext_auth = yes +ssl = yes +ssl_cert = </etc/dovecot/dovecot.pem +ssl_key = </etc/dovecot/private/dovecot.pem +ssl_cipher_list = ALL:!LOW:!SSLv2:ALL:!aNULL:!ADH:!eNULL:!EXP:RC4+RSA:+HIGH:+MEDIUM +mail_location = maildir:~/Maildir +auth_username_chars = abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890.-_@ + +# IMAP configuration +protocol imap { + mail_max_userip_connections = 10 + imap_client_workarounds = delay-newmail +} + +# POP3 configuration +protocol pop3 { + mail_max_userip_connections = 10 + pop3_client_workarounds = outlook-no-nuls oe-ns-eoh +} + +# LDA configuration +protocol lda { + postmaster_address = postmaster + mail_plugins = sieve + quota_full_tempfail = yes + deliver_log_format = msgid=%m: %$ + rejection_reason = Your message to <%t> was automatically rejected:%n%r +} + +# Plugins configuration +plugin { + sieve=~/.dovecot.sieve + sieve_dir=~/sieve +} + +# Authentication configuration +auth_mechanisms = plain login + +service auth { + # Postfix smtp-auth + unix_listener /var/spool/postfix/private/dovecot-auth { + mode = 0660 + user = postfix + group = postfix + } +}
  11. Download patch debian/dovecot-core.ufw.profile

    --- 1:2.2.24-1/debian/dovecot-core.ufw.profile 1970-01-01 00:00:00.000000000 +0000 +++ 1:2.2.24-1ubuntu1/debian/dovecot-core.ufw.profile 2016-08-18 02:01:05.000000000 +0000 @@ -0,0 +1,23 @@ +[Dovecot POP3] +title=Secure mail server (POP3) +description=Dovecot is a mail server whose major goals are security and extreme + reliability. +ports=110/tcp + +[Dovecot Secure POP3] +title=Secure mail server (POP3S) +description=Dovecot is a mail server whose major goals are security and extreme + reliability. +ports=995/tcp + +[Dovecot IMAP] +title=Secure mail server (IMAP) +description=Dovecot is a mail server whose major goals are security and extreme + reliability. +ports=143/tcp + +[Dovecot Secure IMAP] +title=Secure mail server (IMAPS) +description=Dovecot is a mail server whose major goals are security and extreme + reliability. +ports=993/tcp
  12. Download patch debian/dovecot-core.lintian-overrides

    --- 1:2.2.24-1/debian/dovecot-core.lintian-overrides 2016-05-09 07:45:11.000000000 +0000 +++ 1:2.2.24-1ubuntu1/debian/dovecot-core.lintian-overrides 2016-08-18 02:01:05.000000000 +0000 @@ -7,7 +7,6 @@ dovecot-core: hardening-no-fortify-funct dovecot-core: hardening-no-fortify-functions usr/lib/dovecot/libdovecot-login.so.0.0.0 dovecot-core: hardening-no-fortify-functions usr/lib/dovecot/libdovecot-sql.so.0.0.0 dovecot-core: hardening-no-fortify-functions usr/lib/dovecot/modules/auth/libauthdb_imap.so -dovecot-core: hardening-no-relro usr/lib/dovecot/modules/drac.so dovecot-core: hardening-no-fortify-functions usr/lib/dovecot/modules/lib05_pop3_migration_plugin.so dovecot-core: hardening-no-fortify-functions usr/lib/dovecot/modules/lib10_quota_plugin.so dovecot-core: hardening-no-fortify-functions usr/lib/dovecot/modules/lib11_trash_plugin.so
  13. Download patch debian/dovecot-core.dirs

    --- 1:2.2.24-1/debian/dovecot-core.dirs 2016-05-09 07:45:11.000000000 +0000 +++ 1:2.2.24-1ubuntu1/debian/dovecot-core.dirs 2016-08-18 02:01:05.000000000 +0000 @@ -1,5 +1,7 @@ etc/dovecot/conf.d etc/dovecot/private +etc/ssl/certs +etc/ufw/applications.d usr/sbin usr/share/dovecot/protocols.d var/lib/dovecot
  14. Download patch debian/mail-stack-delivery.preinst

    --- 1:2.2.24-1/debian/mail-stack-delivery.preinst 1970-01-01 00:00:00.000000000 +0000 +++ 1:2.2.24-1ubuntu1/debian/mail-stack-delivery.preinst 2016-08-18 02:01:05.000000000 +0000 @@ -0,0 +1,56 @@ +#!/bin/sh + +set -e + +# Prepare to move a conffile without triggering a dpkg question +prep_mv_conffile() { + PKGNAME="$1" + CONFFILE="$2" + if [ -e "$CONFFILE" ]; then + md5sum="`md5sum \"$CONFFILE\" | sed -e \"s/ .*//\"`" + old_md5sum="`dpkg-query -W -f='${Conffiles}' $PKGNAME | sed -n -e \"\\\\' $CONFFILE'{s/ obsolete$//;s/.* //p}\"`" + if [ "$md5sum" = "$old_md5sum" ]; then + rm -f "$CONFFILE" + else + if [ -e "$CONFFILE" ]; then + if [ "$CONFFILE" = "/etc/dovecot/conf.d/01-dovecot-postfix.conf" ]; then + mv -f "$CONFFILE" "/etc/dovecot/conf.d/01-mail-stack-delivery.conf" + fi + if [ "$CONFFILE" = "/etc/dovecot/auth.d/01-dovecot-postfix.auth" ]; then + mv -f "$CONFFILE" "/etc/dovecot/auth.d/01-mail-stack-delivery.auth" + fi + fi + fi + fi +} +case "$1" in +install|upgrade) + # Check if mail-stack-delivery.conf had any customizations + if [ -f "/usr/share/dovecot/mail-stack-delivery.conf" ]; then + if [ -f "/etc/dovecot/mail-stack-delivery.conf" ]; then + mv /etc/dovecot/mail-stack-delivery.conf /etc/dovecot/mail-stack-delivery.conf.bak + DIR=`mktemp -d` + egrep -v ^protocol /etc/dovecot/mail-stack-delivery.conf.bak > $DIR/mail-stack-delivery-custom.conf + egrep -v ^protocol /usr/share/dovecot/mail-stack-delivery.conf > $DIR/mail-stack-delivery.conf + if diff -qur $DIR/mail-stack-delivery-dist.conf $DIR/mail-stack-delivery-custom.conf 1>/dev/null 2>&1; then + rm -f /etc/dovecot/mail-stack-delivery.conf.bak + else + awk ' /^auth default/ {flag=1;next} /^}/{flag=0} flag { print }' /etc/dovecot/mail-stack-delivery.conf.bak > /etc/dovecot/auth.d/01-mail-stack-delivery.auth + awk ' /^## Dovecot conf/{flag=1} /^auth default/{flag=0} flag { print }' /etc/dovecot/mail-stack-delivery.conf.bak > /etc/dovecot/conf.d/01-mail-stack-delivery.conf + awk ' /^# If you wish to use another authentication server than dovecot-auth/{flag=1} flag { print }' /etc/dovecot/mail-stack-delivery.conf.bak >> /etc/dovecot/conf.d/01-mail-stack-delivery.conf + fi + rm -rf $DIR + fi + fi + ;; + + abort-upgrade) + ;; + + *) + echo "preinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER#
  15. Download patch debian/tests/testlib.py

    --- 1:2.2.24-1/debian/tests/testlib.py 1970-01-01 00:00:00.000000000 +0000 +++ 1:2.2.24-1ubuntu1/debian/tests/testlib.py 2016-08-18 02:01:05.000000000 +0000 @@ -0,0 +1,101 @@ +'''Common classes and functions for package tests.''' + +import string, random, crypt, subprocess, pwd, signal, time + +class TimedOutException(Exception): + def __init__(self, value = "Timed Out"): + self.value = value + def __str__(self): + return repr(self.value) + +def timeout(secs, f, *args): + def handler(signum, frame): + raise TimedOutException() + + old = signal.signal(signal.SIGALRM, handler) + result = None + signal.alarm(secs) + try: + result = f(*args) + finally: + signal.alarm(0) + signal.signal(signal.SIGALRM, old) + + return result + +def random_string(length): + '''Return a random string, consisting of ASCII letters, with given + length.''' + + s = '' + maxind = len(string.letters)-1 + for l in range(length): + s += string.letters[random.randint(0, maxind)] + return s.lower() + +def login_exists(login): + '''Checks whether the given login exists on the system.''' + + try: + pwd.getpwnam(login) + return True + except KeyError: + return False + +def cmd(command, input = None, stderr = subprocess.STDOUT): + '''Try to execute given command (array) and return its stdout, or return + a textual error if it failed.''' + + try: + sp = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=stderr, close_fds=True) + except OSError, e: + return [127, str(e)] + + out = sp.communicate(input)[0] + return [sp.returncode,out] + +class TestUser: + '''Create a temporary test user and remove it again in the dtor.''' + + def __init__(self, login=None, home=True): + '''Create a new user account with a random password. + + By default, the login name is random, too, but can be explicitly + specified with 'login'. By default, a home directory is created, this + can be suppressed with 'home=False'.''' + + self.login = None + + if login: + if login_exists(login): + raise ValueError, 'login name already exists' + else: + while(True): + login = random_string(8) + if not login_exists(login): + break + + self.salt = random_string(2) + self.password = random_string(8) + self.crypted = crypt.crypt(self.password, self.salt) + + if home: + assert subprocess.call(['useradd', '-p', self.crypted, '-m', login]) == 0 + else: + assert subprocess.call(['useradd', '-p', self.crypted, login]) == 0 + + self.login = login + p = pwd.getpwnam(self.login) + self.uid = p[2] + self.gid = p[3] + + def __del__(self): + '''Remove the created user account.''' + + if self.login: + # seems to already have gone here + try: + import subprocess + except: + pass + assert subprocess.call(['userdel', '-r', self.login]) == 0
  16. Download patch debian/source_dovecot.py

    --- 1:2.2.24-1/debian/source_dovecot.py 1970-01-01 00:00:00.000000000 +0000 +++ 1:2.2.24-1ubuntu1/debian/source_dovecot.py 2016-08-18 02:01:05.000000000 +0000 @@ -0,0 +1,39 @@ +#!/usr/bin/python + +'''Dovecot Apport interface + +Copyright (C) 2010 Canonical Ltd/ +Author: Chuck Short <chuck.short@canonical.com> + +This program is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by the +Free Software Foundation; either version 2 of the License, or (at your +option) any later version. See http://www.gnu.org/copyleft/gpl.html for +the full text of the license. +''' + +from apport.hookutils import * + +def add_info(report, ui): + response = ui.yesno("The output of dovecot -n may help developers diagnose your bug more quickly, however, it may contain sensitive information. Do you want to include it in your bug report?") + + if response == None: #user canceled + raise StopIteration + + elif response == True: + report['DovecotConf'] = root_command_output(['/usr/sbin/dovecot', '-n']) + + + elif response == False: + ui.information("The contents of dovecot -n will NOT be includeded in the bug report") + + packages=['dovecot-common', 'dovecot-core', 'dovecot-dev', 'dovecot-pop3d', 'dovecot-imapd', 'mail-stack-delivery', 'dovecot-postfix'] + versions = '' + for package in packages: + try: + version = package.get_version(package) + except: + version = 'N/A' + versions += '%s %s\n' %(package, version) + report['DovecotInstalledVersions'] = versions +
  17. Download patch debian/mail-stack-delivery.postrm

    --- 1:2.2.24-1/debian/mail-stack-delivery.postrm 1970-01-01 00:00:00.000000000 +0000 +++ 1:2.2.24-1ubuntu1/debian/mail-stack-delivery.postrm 2016-08-18 02:01:05.000000000 +0000 @@ -0,0 +1,35 @@ +#!/bin/sh +set -e + +POSTFIX_BCKFILE="/var/backups/mail-stack-delivery/main.cf-backup" + +PATH=/usr/sbin:$PATH +export PATH + +if [ "$1" = "remove" -o "$1" = "purge" ]; then + # Restore postfix configuration + if [ "$1" = "remove" ]; then + if which postconf >/dev/null && [ -f "${POSTFIX_BCKFILE}" ]; then + while read line; do + postconf -e "$line" + done < "${POSTFIX_BCKFILE}" + rm -f "${POSTFIX_BCKFILE}" + fi + fi + if [ -x "/etc/init.d/dovecot" ]; then + if [ -x /usr/sbin/invoke-rc.d ]; then + invoke-rc.d dovecot restart + else + service dovecot restart + fi + fi + if [ -x "/etc/init.d/postfix" ]; then + if [ -x /usr/sbin/invoke-rc.d ]; then + invoke-rc.d postfix restart + else + service postfix restart + fi + fi +fi + +#DEBHELPER#
  1. dovecot