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

« back to all changes in this revision

Viewing changes to src/smtpd/smtpd.h

  • 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:
176
176
    /*
177
177
     * Milter support.
178
178
     */
179
 
    const char **milter_argv;
180
 
    ssize_t milter_argc;
 
179
    const char **milter_argv;           /* SMTP command vector */
 
180
    ssize_t milter_argc;                /* SMTP command vector */
 
181
    const char *milter_reject_text;     /* input to call-back from Milter */
181
182
} SMTPD_STATE;
182
183
 
183
 
#define SMTPD_FLAG_HANGUP       (1<<0)  /* disconnect */
 
184
#define SMTPD_FLAG_HANGUP          (1<<0)       /* 421/521 disconnect */
 
185
#define SMTPD_FLAG_ILL_PIPELINING  (1<<1)       /* inappropriate pipelining */
 
186
 
 
187
#define SMTPD_MASK_MAIL_KEEP            ~0      /* keep all after MAIL reset */
184
188
 
185
189
#define SMTPD_STATE_XFORWARD_INIT  (1<<0)       /* xforward preset done */
186
190
#define SMTPD_STATE_XFORWARD_NAME  (1<<1)       /* client name received */
204
208
  * diagnostics.
205
209
  */
206
210
#define SMTPD_AFTER_CONNECT     "CONNECT"
 
211
#define SMTPD_AFTER_DATA        "DATA content"
207
212
#define SMTPD_AFTER_DOT         "END-OF-MESSAGE"
208
213
 
209
214
 /*
228
233
#define SMTPD_CMD_UNKNOWN       "UNKNOWN"
229
234
 
230
235
 /*
231
 
  * Representation of unknown client information within smtpd processes. This
232
 
  * is not the representation that Postfix uses in queue files, in queue
233
 
  * manager delivery requests, or in XCLIENT/XFORWARD commands!
 
236
  * Representation of unknown and non-existent client information. Throughout
 
237
  * Postfix, we use the "unknown" string value for unknown client information
 
238
  * (e.g., unknown remote client hostname), and we use the empty string, null
 
239
  * pointer or "no queue file record" for non-existent client information
 
240
  * (e.g., no HELO command, or local submission).
 
241
  * 
 
242
  * Inside the SMTP server, unknown real client attributes are represented by
 
243
  * the string "unknown", and non-existent HELO is represented as a null
 
244
  * pointer. The SMTP server uses this same representation internally for
 
245
  * forwarded client attributes; the XFORWARD syntax makes no distinction
 
246
  * between unknown (remote submission) and non-existent (local submission).
 
247
  * 
 
248
  * The SMTP client sends forwarded client attributes only when upstream client
 
249
  * attributes exist (i.e. remote submission). Thus, local submissions will
 
250
  * appear to come from an SMTP-based content filter, which is acceptable.
 
251
  * 
 
252
  * Known/unknown client attribute values use the SMTP server's internal
 
253
  * representation in queue files, in queue manager delivery requests, and in
 
254
  * delivery agent $name expansions.
 
255
  * 
 
256
  * Non-existent attribute values are never present in queue files. Non-existent
 
257
  * information is represented as empty strings in queue manager delivery
 
258
  * requests and in delivery agent $name expansions.
234
259
  */
235
260
#define CLIENT_ATTR_UNKNOWN     "unknown"
236
261
 
288
313
                    (port), (char *) 0)
289
314
 
290
315
 /*
291
 
  * Choose between normal or forwarded attributes.
292
 
  * 
293
 
  * Note 1: inside the SMTP server, forwarded attributes must have the exact
294
 
  * same representation as normal attributes: unknown string values are
295
 
  * "unknown", except for HELO which defaults to null. This is better than
296
 
  * having to change every piece of code that accesses a possibly forwarded
297
 
  * attribute.
298
 
  * 
299
 
  * Note 2: outside the SMTP server, the representation of unknown/known
300
 
  * attribute values is different in queue files, in queue manager delivery
301
 
  * requests, and in over-the-network XFORWARD commands.
302
 
  * 
303
 
  * Note 3: if forwarding client information, don't mix information from the
304
 
  * current SMTP session with forwarded information from an up-stream
305
 
  * session.
 
316
  * Don't mix information from the current SMTP session with forwarded
 
317
  * information from an up-stream session.
306
318
  */
307
319
#define FORWARD_CLIENT_ATTR(s, a) \
308
320
        (((s)->xforward.flags & SMTPD_STATE_XFORWARD_CLIENT_MASK) ? \