OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Re: A question about the instance attribute in policy delegation

From: Sahil Tandon (sahiltandon.net)
Date: Thu Jun 25 2009 - 21:36:09 CDT


On Thu, 25 Jun 2009, Victor Duchovni wrote:

> On Thu, Jun 25, 2009 at 09:46:51PM -0400, Sahil Tandon wrote:
>
> > On Thu, 25 Jun 2009, Rob Tanner wrote:
> >
> > > I?ve got a policy listener in place. It merely logs the request and returns
> > > an ?OK? and doesn?t otherwise make any decisions. What I?m noticing is many
> > > of the client requests do not even contain the instance attribute. My
> > > assumption from reading the documentation was that even a single recipient
> > > message would contain an instance attribute with a unique value. Is that
> > > incorrect? How do I interpret a request with no instance attribute?
> >
> > In which phase of the SMTP transaction do you plug in your policy service?
> > From what I understand, the instance attribute does not exist until Postfix
> > chooses/assigns a queue ID, which happens *after* the first RCPT TO command
> > is accepted. If your policy service plugs in before that, there is no
> > instance; therefore, the attribute is empty.
>
> IIRC, the instance attribute identifies a mail transaction and is assigned
> before the queue-id.

My bad reading of src/smtpd/smtpd_check.c, then. But does that mean an
instance can exist *before* the first recipient is accepted? For context:
http://www.irbs.net/internet/postfix/0412/0896.html

--
Sahil Tandon <sahiltandon.net>