~ubuntu-branches/ubuntu/karmic/postfix/karmic-security

« back to all changes in this revision

Viewing changes to src/smtp/smtp.h

  • Committer: Bazaar Package Importer
  • Author(s): Christoph Berg
  • Date: 2008-09-07 14:02:15 UTC
  • mfrom: (29.1.21 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080907140215-d9zf8bj803ditke5
Tags: 2.5.5-1.1
* Non-maintainer upload.
* Add rsyslog.d config snipped to create a /dev/log syslog socket in the
  postfix chroot.  Also, add a note about other syslog daemons to
  README.Debian.  Closes: #311812

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
#include <maps.h>
31
31
#include <tok822.h>
32
32
#include <dsn_buf.h>
 
33
#include <header_body_checks.h>
33
34
 
34
35
 /*
35
36
  * Postfix TLS library.
106
107
#define SMTP_FEATURE_SIZE               (1<<3)
107
108
#define SMTP_FEATURE_STARTTLS           (1<<4)
108
109
#define SMTP_FEATURE_AUTH               (1<<5)
109
 
#define SMTP_FEATURE_MAYBEPIX           (1<<6)  /* PIX smtp fixup mode */
110
110
#define SMTP_FEATURE_XFORWARD_NAME      (1<<7)
111
111
#define SMTP_FEATURE_XFORWARD_ADDR      (1<<8)
112
112
#define SMTP_FEATURE_XFORWARD_PROTO     (1<<9)
116
116
#define SMTP_FEATURE_RSET_REJECTED      (1<<13) /* RSET probe rejected */
117
117
#define SMTP_FEATURE_FROM_CACHE         (1<<14) /* cached connection */
118
118
#define SMTP_FEATURE_DSN                (1<<15) /* DSN supported */
 
119
#define SMTP_FEATURE_PIX_NO_ESMTP       (1<<16) /* PIX smtp fixup mode */
 
120
#define SMTP_FEATURE_PIX_DELAY_DOTCRLF  (1<<17) /* PIX smtp fixup mode */
 
121
#define SMTP_FEATURE_XFORWARD_PORT      (1<<18)
119
122
 
120
123
 /*
121
124
  * Features that passivate under the endpoint.
138
141
#define SMTP_MISC_FLAG_FIRST_NEXTHOP    (1<<3)
139
142
#define SMTP_MISC_FLAG_FINAL_NEXTHOP    (1<<4)
140
143
#define SMTP_MISC_FLAG_FINAL_SERVER     (1<<5)
141
 
#define SMTP_MISC_FLAG_CONN_CACHE       (1<<6)
 
144
#define SMTP_MISC_FLAG_CONN_LOAD        (1<<6)
 
145
#define SMTP_MISC_FLAG_CONN_STORE       (1<<7)
 
146
#define SMTP_MISC_FLAG_COMPLETE_SESSION (1<<8)
 
147
 
 
148
#define SMTP_MISC_FLAG_CONN_CACHE_MASK \
 
149
        (SMTP_MISC_FLAG_CONN_LOAD | SMTP_MISC_FLAG_CONN_STORE)
142
150
 
143
151
 /*
144
152
  * smtp.c
162
170
 
163
171
extern MAPS *smtp_ehlo_dis_maps;        /* ehlo keyword filter */
164
172
 
 
173
extern MAPS *smtp_pix_bug_maps;         /* PIX workarounds */
 
174
 
165
175
extern MAPS *smtp_generic_maps;         /* make internal address valid */
166
176
extern int smtp_ext_prop_mask;          /* address externsion propagation */
167
177
 
168
178
#ifdef USE_TLS
169
179
 
170
 
extern SSL_CTX *smtp_tls_ctx;           /* client-side TLS engine */
 
180
extern TLS_APPL_STATE *smtp_tls_ctx;    /* client-side TLS engine */
171
181
 
172
182
#endif
173
183
 
 
184
extern HBC_CHECKS *smtp_header_checks;  /* limited header checks */
 
185
extern HBC_CHECKS *smtp_body_checks;    /* limited body checks */
 
186
 
174
187
 /*
175
188
  * smtp_session.c
176
189
  */
214
227
     * TLS related state, don't forget to initialize in session_tls_init()!
215
228
     */
216
229
#ifdef USE_TLS
217
 
    TLScontext_t *tls_context;          /* TLS session state */
 
230
    TLS_SESS_STATE *tls_context;        /* TLS session state */
218
231
    char   *tls_nexthop;                /* Nexthop domain for cert checks */
219
232
    int     tls_level;                  /* TLS enforcement level */
220
233
    int     tls_retry_plain;            /* Try plain when TLS handshake fails */
221
 
    int     tls_protocols;              /* Acceptable SSL protocols (mask) */
222
 
    char   *tls_cipherlist;             /* Acceptable SSL ciphers */
223
 
    char   *tls_certmatch;              /* Certificate match patterns */
 
234
    char   *tls_protocols;              /* Acceptable SSL protocols */
 
235
    char   *tls_grade;                  /* Cipher grade: "export", ... */
 
236
    VSTRING *tls_exclusions;            /* Excluded SSL ciphers */
 
237
    ARGV   *tls_matchargv;              /* Cert match patterns */
224
238
#endif
225
239
 
226
240
    SMTP_STATE *state;                  /* back link */
255
269
extern int smtp_rset(SMTP_STATE *);
256
270
extern int smtp_quit(SMTP_STATE *);
257
271
 
 
272
extern HBC_CALL_BACKS smtp_hbc_callbacks[];
 
273
 
258
274
 /*
259
275
  * A connection is re-usable if session->expire_time is > 0 and the
260
276
  * expiration time has not been reached.  This is subtle because the timer