|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
Re: [PATCH] Add recipient count into policy checking
From: Guo Black (guo.black
gmail.com)
Date: Thu Jan 19 2006 - 15:32:52 CST
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi, Wietse,
On 1/20/06, Wietse Venema <wietse
porcupine.org> wrote:
> >
> > --- smtpd_check.c.orig Thu Dec 22 23:46:36 2005
> > +++ smtpd_check.c Fri Jan 20 05:02:00 2006
> > 
-3273,6 +3273,10 
> > state->sender ? state->sender : "",
> > ATTR_TYPE_STR, MAIL_ATTR_RECIP,
> > state->recipient ? state->recipient : "",
> > + ATTR_TYPE_LONG, MAIL_ATTR_RCPT_COUNT,
> > + ((strcasecmp(state->where, "DATA") != 0) ||
> > + (strcasecmp(state->where, "END-OF-DATA") != 0)) ?
> > + state->rcpt_count : 0,
> > ATTR_TYPE_STR, MAIL_ATTR_QUEUEID,
> > state->queue_id ? state->queue_id : "",
> > ATTR_TYPE_STR, MAIL_ATTR_INSTANCE,
>
> Yup, that would make sense. You also have a patch for the
> documentation? :-)
Here is a patch for README_FILES/SMTPD_POLICY_README, but I may have
some syntax errors as my English is not so good. BTW are these HTML
documentations automatically generated from these text files?
--- SMTPD_POLICY_README.bak Thu Dec 22 06:24:55 2005
+++ SMTPD_POLICY_README Fri Jan 20 05:26:55 2006

-47,6 +47,7 
queue_id=8045F2AB23
sender=foo
bar.tld
recipient=bar
foo.tld
+ recipient_count=1
client_address=1.2.3.4
client_name=another.domain.tld
reverse_client_name=another.domain.tld

-108,6 +109,11 
* The "encryption_*" attributes (Postfix 2.3 and later) specify information
about how the connection is encrypted. With plaintext connections the
protocol and cipher attributes are empty and the keysize is zero.
+
+ * The "recipient" attribute is not available in the DATA and END-OF-DATA
+ stage, if there are multiple recipients. A "recipient_count" (Postfix
+ 2.3 and later) is available to specify information about how many
+ recipients are supplied by the client.
The following is specific to SMTPD delegated policy requests:
Black
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]