~ubuntu-branches/ubuntu/dapper/postfix/dapper-security

« back to all changes in this revision

Viewing changes to src/cleanup/cleanup_init.c

  • Committer: Bazaar Package Importer
  • Author(s): LaMont Jones
  • Date: 2005-12-07 15:39:11 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20051207153911-hutf07z6i8ty25z5
Tags: 2.2.6-1
* New upstream.
  - the *SQL clients did not uniformly choose the database host from
    the available pool
  - raise the "policy violation" flag when a client request exceeds
    a concurrency or rate limit.
  - don't do smtpd_end_of_data_restrictions after the transaction
    failed due to, e.g., a write error.
  - two messages could get the same message ID due to a race
    condition. This time window was increased when queue file creation
    was postponed from MAIL FROM until the first accepted RCPT TO.  The
    window is closed again.
  - the queue manager did not write a per-recipient defer logfile record
    when the delivery agent crashed after the initial handshake with the
    queue manager, and before reporting the delivery status to the queue
    manager.
  - moved code around from one place to another to make REDIRECT, FILTER,
    HOLD and DISCARD access(5) table actions work in
    smtpd_end_of_data_restrictions.  PREPEND will not be fixed; it must
    be specified before the message content is received.
* Updated Italian translations.  Closes: #336925
* Swedish translations.  Closes: #339746
* Switch to libdb4.3.  Closes: #336488
* Add Replaces: mail-transport-agent.  Closes: #325624
* Merge changes from ubuntu.

Show diffs side-by-side

added added

removed removed

Lines of Context:
97
97
char   *var_canonical_maps;             /* common canonical maps */
98
98
char   *var_send_canon_maps;            /* sender canonical maps */
99
99
char   *var_rcpt_canon_maps;            /* recipient canonical maps */
 
100
char   *var_canon_classes;              /* what to canonicalize */
 
101
char   *var_send_canon_classes;         /* what sender to canonicalize */
 
102
char   *var_rcpt_canon_classes;         /* what recipient to canonicalize */
100
103
char   *var_virt_alias_maps;            /* virtual alias maps */
101
104
char   *var_masq_domains;               /* masquerade domains */
102
105
char   *var_masq_exceptions;            /* users not masqueraded */
118
121
int     var_body_check_len;             /* when to stop body scan */
119
122
char   *var_send_bcc_maps;              /* sender auto-bcc maps */
120
123
char   *var_rcpt_bcc_maps;              /* recipient auto-bcc maps */
121
 
bool    var_enable_errors_to;           /* extract Errors-To: address. */
 
124
char   *var_remote_rwr_domain;          /* header-only surrogate */
122
125
 
123
126
CONFIG_INT_TABLE cleanup_int_table[] = {
124
127
    VAR_HOPCOUNT_LIMIT, DEF_HOPCOUNT_LIMIT, &var_hopcount_limit, 1, 0,
132
135
 
133
136
CONFIG_BOOL_TABLE cleanup_bool_table[] = {
134
137
    VAR_ENABLE_ORCPT, DEF_ENABLE_ORCPT, &var_enable_orcpt,
135
 
    VAR_ENABLE_ERRORS_TO, DEF_ENABLE_ERRORS_TO, &var_enable_errors_to,
136
138
    0,
137
139
};
138
140
 
145
147
    VAR_CANONICAL_MAPS, DEF_CANONICAL_MAPS, &var_canonical_maps, 0, 0,
146
148
    VAR_SEND_CANON_MAPS, DEF_SEND_CANON_MAPS, &var_send_canon_maps, 0, 0,
147
149
    VAR_RCPT_CANON_MAPS, DEF_RCPT_CANON_MAPS, &var_rcpt_canon_maps, 0, 0,
 
150
    VAR_CANON_CLASSES, DEF_CANON_CLASSES, &var_canon_classes, 1, 0,
 
151
    VAR_SEND_CANON_CLASSES, DEF_SEND_CANON_CLASSES, &var_send_canon_classes, 1, 0,
 
152
    VAR_RCPT_CANON_CLASSES, DEF_RCPT_CANON_CLASSES, &var_rcpt_canon_classes, 1, 0,
148
153
    VAR_VIRT_ALIAS_MAPS, DEF_VIRT_ALIAS_MAPS, &var_virt_alias_maps, 0, 0,
149
154
    VAR_MASQ_DOMAINS, DEF_MASQ_DOMAINS, &var_masq_domains, 0, 0,
150
155
    VAR_EMPTY_ADDR, DEF_EMPTY_ADDR, &var_empty_addr, 1, 0,
159
164
    VAR_MASQ_CLASSES, DEF_MASQ_CLASSES, &var_masq_classes, 0, 0,
160
165
    VAR_SEND_BCC_MAPS, DEF_SEND_BCC_MAPS, &var_send_bcc_maps, 0, 0,
161
166
    VAR_RCPT_BCC_MAPS, DEF_RCPT_BCC_MAPS, &var_rcpt_bcc_maps, 0, 0,
 
167
    VAR_REM_RWR_DOMAIN, DEF_REM_RWR_DOMAIN, &var_remote_rwr_domain, 0, 0,
162
168
    0,
163
169
};
164
170
 
168
174
MAPS   *cleanup_comm_canon_maps;
169
175
MAPS   *cleanup_send_canon_maps;
170
176
MAPS   *cleanup_rcpt_canon_maps;
 
177
int     cleanup_comm_canon_flags;
 
178
int     cleanup_send_canon_flags;
 
179
int     cleanup_rcpt_canon_flags;
171
180
MAPS   *cleanup_header_checks;
172
181
MAPS   *cleanup_mimehdr_checks;
173
182
MAPS   *cleanup_nesthdr_checks;
196
205
 
197
206
void    cleanup_pre_jail(char *unused_name, char **unused_argv)
198
207
{
 
208
    static NAME_MASK send_canon_class_table[] = {
 
209
        CANON_CLASS_ENV_FROM, CLEANUP_CANON_FLAG_ENV_FROM,
 
210
        CANON_CLASS_HDR_FROM, CLEANUP_CANON_FLAG_HDR_FROM,
 
211
        0,
 
212
    };
 
213
    static NAME_MASK rcpt_canon_class_table[] = {
 
214
        CANON_CLASS_ENV_RCPT, CLEANUP_CANON_FLAG_ENV_RCPT,
 
215
        CANON_CLASS_HDR_RCPT, CLEANUP_CANON_FLAG_HDR_RCPT,
 
216
        0,
 
217
    };
 
218
    static NAME_MASK canon_class_table[] = {
 
219
        CANON_CLASS_ENV_FROM, CLEANUP_CANON_FLAG_ENV_FROM,
 
220
        CANON_CLASS_ENV_RCPT, CLEANUP_CANON_FLAG_ENV_RCPT,
 
221
        CANON_CLASS_HDR_FROM, CLEANUP_CANON_FLAG_HDR_FROM,
 
222
        CANON_CLASS_HDR_RCPT, CLEANUP_CANON_FLAG_HDR_RCPT,
 
223
        0,
 
224
    };
 
225
 
199
226
    static NAME_MASK masq_class_table[] = {
200
227
        MASQ_CLASS_ENV_FROM, CLEANUP_MASQ_FLAG_ENV_FROM,
201
228
        MASQ_CLASS_ENV_RCPT, CLEANUP_MASQ_FLAG_ENV_RCPT,
219
246
        cleanup_virt_alias_maps = maps_create(VAR_VIRT_ALIAS_MAPS,
220
247
                                              var_virt_alias_maps,
221
248
                                              DICT_FLAG_LOCK);
 
249
    if (*var_canon_classes)
 
250
        cleanup_comm_canon_flags =
 
251
            name_mask(VAR_CANON_CLASSES, canon_class_table,
 
252
                      var_canon_classes);
 
253
    if (*var_send_canon_classes)
 
254
        cleanup_send_canon_flags =
 
255
            name_mask(VAR_CANON_CLASSES, send_canon_class_table,
 
256
                      var_send_canon_classes);
 
257
    if (*var_rcpt_canon_classes)
 
258
        cleanup_rcpt_canon_flags =
 
259
            name_mask(VAR_CANON_CLASSES, rcpt_canon_class_table,
 
260
                      var_rcpt_canon_classes);
222
261
    if (*var_masq_domains)
223
262
        cleanup_masq_domains = argv_split(var_masq_domains, " ,\t\r\n");
224
263
    if (*var_header_checks)