OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Postconf and restriction classes

From: Bert Driehuis (bert_driehuisnl.compuware.com)
Date: Sun Nov 23 2003 - 22:23:25 CST


postconf doesn't list user defined restriction classes. As restriction
classes are not among the most understandably documented aspects of
Postfix, I'm not entirely sure if that is because I don't understand the
proper way of implementing them. I use a construct such as this:

user_restrictions:
  abusemydomain.com my_lenient_restrictions

main.cf:
smtpd_restriction_classes = my_sender_restrictions, my_client_restrictions,
        my_lenient_restrictions
my_sender_restrictions = permit_mynetworks, reject_non_fqdn_sender,
        check_sender_access hash:/etc/postfix/access
my_client_restrictions = tag_rbl_client multihop.dsbl.data.base,
        reject_rbl_client sbl.spamhaus.org,
        reject_unauth_destination
my_lenient_restrictions = reject_unauth_destination
smtpd_recipient_restrictions =
        permit_mynetworks,
                        [...]
        check_recipient_access hash:/etc/postfix/user_restrictions,
        my_sender_restrictions,
        my_client_restrictions,
        reject_unauth_destination

Anyway, in order to debug configuration issues I needed to be able to
dump them in a way that most closely resembled the way that Postfix
itself sees them, and wrote the attached diff.

I wrote it mostly as an alternative to wading through the Postfix log
with full debugging enabled, and I'm not sure this diff (or one like it)
should go into Postfix. Then again, user defined restriction classes
silently disappearing in the postconf output has always struck me as
being odd.

Ideas? Is something like the attached diff required? Should it be
activated with a special flag? Should it be properly integrated with
postconf, i.e. fixing or working around the INSIDE macro issue?
Am I totally off base?

                                - Bert

--
Bert Driehuis, MIS -- bert_driehuisnl.compuware.com -- +31-20-3116119
Dihydrogen Monoxide kills! Join the campaign at http://www.dhmo.org/