177
177
* Milter support.
179
const char **milter_argv;
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 */
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 */
187
#define SMTPD_MASK_MAIL_KEEP ~0 /* keep all after MAIL reset */
185
189
#define SMTPD_STATE_XFORWARD_INIT (1<<0) /* xforward preset done */
186
190
#define SMTPD_STATE_XFORWARD_NAME (1<<1) /* client name received */
228
233
#define SMTPD_CMD_UNKNOWN "UNKNOWN"
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).
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).
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.
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.
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.
235
260
#define CLIENT_ATTR_UNKNOWN "unknown"
288
313
(port), (char *) 0)
291
* Choose between normal or forwarded attributes.
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
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.
303
* Note 3: if forwarding client information, don't mix information from the
304
* current SMTP session with forwarded information from an up-stream
316
* Don't mix information from the current SMTP session with forwarded
317
* information from an up-stream session.
307
319
#define FORWARD_CLIENT_ATTR(s, a) \
308
320
(((s)->xforward.flags & SMTPD_STATE_XFORWARD_CLIENT_MASK) ? \