From: Florent Bruneau Date: Sat, 4 Oct 2008 13:08:01 +0000 (+0200) Subject: Support for sender_domain and recipient_domain in match filter. X-Git-Url: http://git.madism.org/?p=apps%2Fpfixtools.git;a=commitdiff_plain;h=60e8a96ef5bd215a3ca40397c17ce06e2ebaf102 Support for sender_domain and recipient_domain in match filter. Signed-off-by: Florent Bruneau --- diff --git a/example/postlicyd.conf b/example/postlicyd.conf index ca17b60..123c66a 100644 --- a/example/postlicyd.conf +++ b/example/postlicyd.conf @@ -126,7 +126,8 @@ spamhaus_and_abuseat { # currently only email OR hostname fields are supported. You MUST choose only # one of these types per strlist, and be carefull that the field you requested # are available in the protocol state you want to use this filter for. -# * hostname fields: helo_name, client_name, reverse_client_name +# * hostname fields: helo_name, client_name, reverse_client_name, sender_domain, +# recipient_domain # * email fields: sender, recipient # No space is allowed in this parameter. # Return value: @@ -207,6 +208,7 @@ greylist { # emitted by postfix. This list with description of each # field is available at: # http://www.postfix.org/SMTPD_POLICY_README.html +# postlicyd also support fields sender_domain and recipient_domain # * OP is an operator. Available operators are: # == field_name is strictly equal to value # =i field_name is case insensitively equal to value diff --git a/postlicyd/match.c b/postlicyd/match.c index b6d108f..1b02cc2 100644 --- a/postlicyd/match.c +++ b/postlicyd/match.c @@ -189,7 +189,9 @@ static inline bool match_condition(const match_condition_t *cond, const query_t CASE(HELO_NAME, helo_name) CASE(QUEUE_ID, queue_id) CASE(SENDER, sender) + CASE(SENDER_DOMAIN, sender_domain) CASE(RECIPIENT, recipient) + CASE(RECIPIENT_DOMAIN, recipient_domain) CASE(RECIPIENT_COUNT, recipient_count) CASE(CLIENT_ADDRESS, client_address) CASE(CLIENT_NAME, client_name)