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

« back to all changes in this revision

Viewing changes to src/smtpd/smtpd.h

  • Committer: Bazaar Package Importer
  • Author(s): LaMont Jones
  • Date: 2011-02-22 11:20:43 UTC
  • mfrom: (1.1.27 upstream)
  • Revision ID: james.westby@ubuntu.com-20110222112043-c34ht219w3ybrilr
Tags: 2.8.0-2
* a little more lintian cleanup
* Fix missing format strings in smtp-sink.c

Show diffs side-by-side

added added

removed removed

Lines of Context:
60
60
    char   *rfc_addr;                   /* address for RFC 2821 */
61
61
    char   *protocol;                   /* email protocol */
62
62
    char   *helo_name;                  /* helo/ehlo parameter */
63
 
    char   *ident;                      /* message identifier */
 
63
    char   *ident;                      /* local message identifier */
64
64
    char   *domain;                     /* rewrite context */
65
65
} SMTPD_XFORWARD_ATTR;
66
66
 
165
165
     * TLS related state.
166
166
     */
167
167
#ifdef USE_TLS
168
 
    int     tls_use_tls;                /* can use TLS */
169
 
    int     tls_enforce_tls;            /* must use TLS */
170
 
    int     tls_auth_only;              /* use SASL over TLS only */
 
168
#ifdef USE_TLSPROXY
 
169
    VSTREAM *tlsproxy;                  /* tlsproxy(8) temp. handle */
 
170
#endif
171
171
    TLS_SESS_STATE *tls_context;        /* TLS session state */
172
172
#endif
173
173
 
190
190
#define SMTPD_STATE_XFORWARD_PROTO (1<<3)       /* protocol received */
191
191
#define SMTPD_STATE_XFORWARD_HELO  (1<<4)       /* client helo received */
192
192
#define SMTPD_STATE_XFORWARD_IDENT (1<<5)       /* message identifier */
193
 
#define SMTPD_STATE_XFORWARD_DOMAIN (1<<6)      /* message identifier */
 
193
#define SMTPD_STATE_XFORWARD_DOMAIN (1<<6)      /* address context */
194
194
#define SMTPD_STATE_XFORWARD_PORT  (1<<7)       /* client port received */
195
195
 
196
196
#define SMTPD_STATE_XFORWARD_CLIENT_MASK \
314
314
  * Don't mix information from the current SMTP session with forwarded
315
315
  * information from an up-stream session.
316
316
  */
 
317
#define HAVE_FORWARDED_CLIENT_ATTR(s) \
 
318
        ((s)->xforward.flags & SMTPD_STATE_XFORWARD_CLIENT_MASK)
 
319
 
317
320
#define FORWARD_CLIENT_ATTR(s, a) \
318
 
        (((s)->xforward.flags & SMTPD_STATE_XFORWARD_CLIENT_MASK) ? \
 
321
        (HAVE_FORWARDED_CLIENT_ATTR(s) ? \
319
322
            (s)->xforward.a : (s)->a)
320
323
 
321
324
#define FORWARD_ADDR(s)         FORWARD_CLIENT_ATTR((s), rfc_addr)
325
328
#define FORWARD_HELO(s)         FORWARD_CLIENT_ATTR((s), helo_name)
326
329
#define FORWARD_PORT(s)         FORWARD_CLIENT_ATTR((s), port)
327
330
 
 
331
 /*
 
332
  * Mixing is not a problem with forwarded local message identifiers.
 
333
  */
 
334
#define HAVE_FORWARDED_IDENT(s) \
 
335
        ((s)->xforward.ident != 0)
 
336
 
328
337
#define FORWARD_IDENT(s) \
329
 
        (((s)->xforward.flags & SMTPD_STATE_XFORWARD_IDENT) ? \
330
 
            (s)->queue_id : (s)->ident)
 
338
        (HAVE_FORWARDED_IDENT(s) ? \
 
339
            (s)->xforward.ident : (s)->queue_id)
331
340
 
 
341
 /*
 
342
  * Mixing is not a problem with forwarded address rewriting contexts.
 
343
  */
332
344
#define FORWARD_DOMAIN(s) \
333
345
        (((s)->xforward.flags & SMTPD_STATE_XFORWARD_DOMAIN) ? \
334
346
            (s)->xforward.domain : (s)->rewrite_context)