Multiple responses from a policy daemon, is it possible?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Multiple responses from a policy daemon, is it possible?

Jay Deiman
-----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?  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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkjhAYMACgkQQ0lr+ZVKSBiv9ACePiuL3/QiuVwE5DdnU3IHdLKT
XoUAn0fQZQDO28UhPz9LbZe8tqLocZ1T
=4w+r
-----END PGP SIGNATURE-----
Reply | Threaded
Open this post in threaded view
|

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

mouss-2
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.
Reply | Threaded
Open this post in threaded view
|

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

Noel Jones-2
In reply to this post by Jay Deiman
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
Reply | Threaded
Open this post in threaded view
|

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

Jay Deiman
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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 ..."
|

Hehe, yeah, you are completely correct, that is a bad example.  It
should have been a "PREPEND ..." followed by a "OK".

Thanks,

Jay
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkjhEVoACgkQQ0lr+ZVKSBiZKQCgiYQgpelH2YQevYp+u4+pBq1l
/oIAnj7pg1XJ3MGpDs+dPwjbeGy5lYdR
=Ogs+
-----END PGP SIGNATURE-----