~ubuntu-branches/ubuntu/saucy/postfix/saucy

« back to all changes in this revision

Viewing changes to debian/source.apport

  • Committer: Bazaar Package Importer
  • Author(s): LaMont Jones, Scott Kitterman, Friedemann Stoyan, Wietse Venema, LaMont Jones
  • Date: 2011-08-20 13:48:59 UTC
  • mfrom: (1.1.31 upstream) (39.1.3 oneiric)
  • Revision ID: james.westby@ubuntu.com-20110820134859-qdvjklj481539yvg
Tags: 2.8.4-1
[Scott Kitterman]

* Switch to debhelper 7, use dh_prep instead of dh_clean -k

[Friedemann Stoyan]

* create chroots with the right ca_path.  Closes: #627266

[Wietse Venema]

* Upstream fix release
  - Performance: a high load of DSN success notification requests
    could slow down the queue manager.
  - Bugfix (introduced Postfix 2.3 and Postfix 2.7): the Milter
    client reported some "file too large" errors as temporary
    errors.
  - Bugfix (introduced in Postfix 1.1, duplicated in Postfix
    2.3, unrelated mistake in Postfix 2.7): the local(8) delivery
    agent ignored table lookup errors in mailbox_command_maps,
    mailbox_transport_maps, fallback_transport_maps and (while
    bouncing mail to alias) alias owner lookup.
  - Bugfix (introduced Postfix 2.6 with master_service_disable)
    loop control error when parsing a malformed master.cf file.
  - Bugfix (introduced: Postfix 2.7): "sendmail -t" reported
    "protocol error" after queue file write error.
  - Linux kernel version 3 support.
  - Workaround: some Spamhaus RHSBL rejects lookups with "No
    IP queries" even if the name has an alphanumerical prefix.
    We play safe, and skip both RHSBL and RHSWL queries for
    names ending in a numerical suffix.

[LaMont Jones]

* apport, fix FTBFS on linux 3.0 - From ubuntu.
* SASL vs multiarch.  Closes: #638443, #638045
* Update init.d script to handle multi_instance setups.  Closes: #560682
* Do not try to update resolv.conf when main.cf does not exist.  LP: #530323
* Better handle bad map names in postmap -u.  LP: #647647
* Drop apport usage, since debian lacks it and failing to build is bad.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/python
 
2
#
 
3
#    postfix apport package hook
 
4
#
 
5
#    Copyright (C) 2011 Canonical Ltd. All Rights Reserved.
 
6
#    Author: Clint Byrum <clint.byrum@canonical.com>
 
7
#
 
8
#    This program is free software: you can redistribute it and/or modify
 
9
#    it under the terms of the GNU General Public License as published by
 
10
#    the Free Software Foundation, either version 3 of the License, or
 
11
#    (at your option) any later version.
 
12
#
 
13
#    This program is distributed in the hope that it will be useful,
 
14
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
16
#    GNU General Public License for more details.
 
17
#
 
18
#    You should have received a copy of the GNU General Public License
 
19
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
20
#
 
21
 
 
22
import os
 
23
import apport
 
24
import re
 
25
import gettext
 
26
 
 
27
gettext.install('postfix-apport-hook')
 
28
 
 
29
msg = _('In order for the developers to determine the cause of this, some'
 
30
        ' potentially sensitive information from your system configuration may'
 
31
        ' be helpful. Specifically, your hostname and DNS configuration. Please'
 
32
        ' note that this will be included in a *PUBLIC* bug report.' )
 
33
 
 
34
msg2 = _('Do you want to add this extra information to the bug report?')
 
35
 
 
36
host_re = re.compile('^[a-zA-Z0-9][a-zA-Z0-9\-\.]*$')
 
37
 
 
38
def add_info(report, ui):
 
39
    extra_info=dict()
 
40
 
 
41
    if os.path.exists('/etc/mailname'):
 
42
        extra_info['EtcMailname'] = open('/etc/mailname').read().strip()
 
43
    else:
 
44
        extra_info['EtcMailname'] = _('*** /etc/mailname does not exist ***')
 
45
    extra_info['Hostname'] = apport.hookutils.command_output(['hostname','--fqdn'])
 
46
    extra_info['PostconfMyhostname'] = apport.hookutils.command_output(['/usr/sbin/postconf','-h','myhostname'])
 
47
    extra_info['PostconfMydomain'] = apport.hookutils.command_output(['/usr/sbin/postconf','-h','mydomain'])
 
48
 
 
49
    """ Note that even if the user opts not to send the info, we get this key """
 
50
    for k,v in extra_info.iteritems():
 
51
        if not host_re.match(v):
 
52
            report['DuplicateSignature'] = 'InvalidHostOrDomain'
 
53
            break
 
54
 
 
55
    # Do not include this in the dupes since it is usually "/etc/mailname"
 
56
    extra_info['PostconfMyorigin'] = apport.hookutils.command_output(['/usr/sbin/postconf','-h','myorigin'])
 
57
 
 
58
    if os.path.exists('/etc/resolv.conf'):
 
59
        extra_info['ResolvConf'] = open('/etc/resolv.conf').read()
 
60
    else:
 
61
        extra_info['ResolvConf'] = _('*** /etc/resolv.conf does not exist ***')
 
62
 
 
63
    eeinfo = [("%s: %s" % (k,v)) for k,v in extra_info.iteritems()]
 
64
    answer = ui.yesno("%s\n\n%s\n\n%s" % (msg, msg2 ,"\n".join(eeinfo)))
 
65
    if answer:
 
66
        report.update(extra_info)
 
67
        return