Jay Deiman | 29 Sep 2008 18:25

Multiple responses from a policy daemon, is it possible?


Hello all,

I'm wondering, when setting up a policy daemon, can you respond to
Postfix with multiple actions?  For example, could I respond to the
policy service request with both a "PREPEND X-Something: yada yada" and
a "DUNNO"?  If so, do I just separate the responses with a newline or is
there some other delimiter I should use?

Thanks,

Jay
Noel Jones | 29 Sep 2008 19:02

Re: Multiple responses from a policy daemon, is it possible?

Jay Deiman wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hello all,
> 
> I'm wondering, when setting up a policy daemon, can you respond to
> Postfix with multiple actions? 

The expected results are the same as an access(5) table.
http://www.postfix.org/access.5.html

Multiple main.cf UCE restrictions (such as those listed under 
http://www.postfix.org/postconf.5.html#smtpd_client_restrictions) 
may be specified, or an smtpd_restriction_classes entry, or an 
access(5) action.  Multiple access(5) actions are not 
supported, but may be chained to by smtpd_restriction_classes.

> For example, could I respond to the
> policy service request with both a "PREPEND X-Something: yada yada" and
> a "DUNNO"?  

Not a good example; "PREPEND ..." followed by "DUNNO" is 
equivalent to just "PREPEND ..."

--

-- 
Noel Jones

Jay Deiman | 29 Sep 2008 19:33

Re: Multiple responses from a policy daemon, is it possible?


Noel Jones wrote:
| Jay Deiman wrote:
|> -----BEGIN PGP SIGNED MESSAGE-----
|> Hash: SHA1
|>
|> Hello all,
|>
|> I'm wondering, when setting up a policy daemon, can you respond to
|> Postfix with multiple actions?
|
| The expected results are the same as an access(5) table.
| http://www.postfix.org/access.5.html
|
| Multiple main.cf UCE restrictions (such as those listed under
| http://www.postfix.org/postconf.5.html#smtpd_client_restrictions) may be
| specified, or an smtpd_restriction_classes entry, or an access(5)
| action.  Multiple access(5) actions are not supported, but may be
| chained to by smtpd_restriction_classes.

Yeah, I didn't even think about restriction classes, that will work for
what I need to do.

|
|> For example, could I respond to the
|> policy service request with both a "PREPEND X-Something: yada yada" and
|> a "DUNNO"?
|
| Not a good example; "PREPEND ..." followed by "DUNNO" is equivalent to
| just "PREPEND ..."
(Continue reading)

mouss | 29 Sep 2008 18:29
Favicon

Re: Multiple responses from a policy daemon, is it possible?

Jay Deiman wrote:
> Hello all,
> 
> I'm wondering, when setting up a policy daemon, can you respond to
> Postfix with multiple actions?  

No.

> For example, could I respond to the
> policy service request with both a "PREPEND X-Something: yada yada" and
> a "DUNNO"?  If so, do I just separate the responses with a newline or is
> there some other delimiter I should use?
> 

if the infos are "static" (not computed by the policy server), then use 
a restriction class. otherwise, call the daemon multiple times.


Gmane