~ubuntu-branches/debian/sid/postfix/sid

« back to all changes in this revision

Viewing changes to src/local/bounce_workaround.c

  • 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:
77
77
#include <strip_addr.h>
78
78
#include <stringops.h>
79
79
#include <bounce.h>
 
80
#include <defer.h>
80
81
#include <split_addr.h>
81
82
#include <canon_addr.h>
82
83
 
97
98
        char   *stripped_recipient;
98
99
        char   *owner_alias;
99
100
        const char *owner_expansion;
 
101
        int     saved_dict_errno;
100
102
 
101
103
#define FIND_OWNER(lhs, rhs, addr) { \
102
104
        lhs = concatenate("owner-", addr, (char *) 0); \
104
106
        rhs = maps_find(alias_maps, lhs, DICT_FLAG_NONE); \
105
107
    }
106
108
 
 
109
        dict_errno = 0;
107
110
        FIND_OWNER(owner_alias, owner_expansion, state.msg_attr.rcpt.address);
108
 
        if (owner_expansion == 0
 
111
        if ((saved_dict_errno = dict_errno) == 0 && owner_expansion == 0
109
112
            && (stripped_recipient = strip_addr(state.msg_attr.rcpt.address,
110
113
                                                (char **) 0,
111
114
                                                *var_rcpt_delim)) != 0) {
113
116
            FIND_OWNER(owner_alias, owner_expansion, stripped_recipient);
114
117
            myfree(stripped_recipient);
115
118
        }
116
 
        if (owner_expansion != 0) {
 
119
        if ((saved_dict_errno = dict_errno) == 0 && owner_expansion != 0) {
117
120
            canon_owner = canon_addr_internal(vstring_alloc(10),
118
121
                                              var_exp_own_alias ?
119
122
                                              owner_expansion : owner_alias);
120
123
            SET_OWNER_ATTR(state.msg_attr, STR(canon_owner), state.level);
121
124
        }
122
125
        myfree(owner_alias);
 
126
        if (saved_dict_errno != 0)
 
127
            /* At this point, canon_owner == 0. */
 
128
            return (defer_append(BOUNCE_FLAGS(state.request),
 
129
                                 BOUNCE_ATTR(state.msg_attr)));
123
130
    }
124
131
 
125
132
    /*