~ubuntu-branches/ubuntu/maverick/postfix/maverick-security

« back to all changes in this revision

Viewing changes to src/smtpd/smtpd_sasl_proto.c

  • Committer: Bazaar Package Importer
  • Author(s): LaMont Jones, Wietse Venema, LaMont Jones
  • Date: 2009-06-03 14:17:08 UTC
  • mfrom: (1.1.22 upstream)
  • Revision ID: james.westby@ubuntu.com-20090603141708-o9u59xlor7nmd2x1
[Wietse Venema]

* New upstream release: 2.6.2~rc1

[LaMont Jones]

* move postfix-add-{filter,policy} manpages to section 8, and deliver
* provide: default-mta on ubuntu

Show diffs side-by-side

added added

removed removed

Lines of Context:
146
146
        smtpd_chat_reply(state, "503 5.5.1 Error: send HELO/EHLO first");
147
147
        return (-1);
148
148
    }
149
 
    if (SMTPD_STAND_ALONE(state) || !var_smtpd_sasl_enable
 
149
    if (SMTPD_STAND_ALONE(state) || !smtpd_sasl_is_active(state)
150
150
        || (state->ehlo_discard_mask & EHLO_MASK_AUTH)) {
151
151
        state->error_mask |= MAIL_ERROR_PROTOCOL;
152
152
        smtpd_chat_reply(state, "503 5.5.1 Error: authentication not enabled");
153
153
        return (-1);
154
154
    }
155
155
    if (smtpd_milters != 0 && (err = milter_other_event(smtpd_milters)) != 0) {
156
 
        if (err[0] == '5') {
157
 
            state->error_mask |= MAIL_ERROR_POLICY;
158
 
            smtpd_chat_reply(state, "%s", err);
159
 
            return (-1);
160
 
        }
161
 
        /* Sendmail compatibility: map 4xx into 454. */
162
 
        else if (err[0] == '4') {
163
 
            state->error_mask |= MAIL_ERROR_POLICY;
164
 
            smtpd_chat_reply(state, "454 4.3.0 Try again later");
165
 
            return (-1);
166
 
        }
 
156
        if (err[0] == '5') {
 
157
            state->error_mask |= MAIL_ERROR_POLICY;
 
158
            smtpd_chat_reply(state, "%s", err);
 
159
            return (-1);
 
160
        }
 
161
        /* Sendmail compatibility: map 4xx into 454. */
 
162
        else if (err[0] == '4') {
 
163
            state->error_mask |= MAIL_ERROR_POLICY;
 
164
            smtpd_chat_reply(state, "454 4.3.0 Try again later");
 
165
            return (-1);
 
166
        }
167
167
    }
168
168
#ifdef USE_TLS
169
169
    if (state->tls_auth_only && !state->tls_context) {
209
209
    /*
210
210
     * Do not store raw RFC2554 protocol data.
211
211
     */
212
 
    if (!var_smtpd_sasl_enable) {
 
212
    if (!smtpd_sasl_is_active(state)) {
213
213
        state->error_mask |= MAIL_ERROR_PROTOCOL;
214
214
        return ("503 5.5.4 Error: authentication disabled");
215
215
    }