|
Save the teapot fund New CSS web design for Wibble proudly provided by Kelv. Please contact the webmaster with any questions or concerns. |
Wibble > List archives > postfix > 2004 > October [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH] Feed myhostname attribute to policy servers
Wietse Venema wrote: > > 1) Would you mind if I left the "<policy>_myhostname" parameter in > > place (in addition to "<policy>_attributes") ? > > If you don't ript it out then I will. Now that's clear and unambiguous <g>. The new version of the patch is at: http://www.skopos.be/downloads/postfix/postfix-policy-attributes.patch.txt http://www.skopos.be/downloads/postfix/postfix-policy-attributes.patch.tar.gz I retracted the original. Some notes: 1) The first version of the patch added a get_mail_conf_str2(name1, name2,..) function, but that does a mail_conf_lookup_eval() on the parameter value, i.e. on all attribute name/value pairs as a whole. This is bad (try foo=$smtpd_recipient_restrictions <g>). I coded similar functionality (without the '_eval' expansion on the whole string and expansion only on the individual attribute values) straight into smtpd_check.c. Therefore get_mail_conf_str2() is no longer needed for this and I left it out of the patch. 2) This thing could use some syntax checking on the name=value pairs. I'd be happy to add it, but at some point it must be quicker for you to recode from scratch than to review other people's code. If we're not past that point yet, let me know. 3) Even if you decide not to use the patch, please note the buglet in util/attr_clnt.c at the end of the patch file (it skips two args instead of one for an ATTR_TYPE_HASH). 4) I couldn't easily find where the original ATTR_CLNT structs in the policy_clnt_table are explicitly freed. So I added a policy_client_free() function that is never called, hoping that you'd know what to do with it. 5) The default value is still: <policy>_attributes = myhostname=$myhostname Hope this is useful somehow, Luc Pardon Skopos Consulting Belgium
|