Support for sender_domain and recipient_domain in match filter.
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Sat, 4 Oct 2008 13:08:01 +0000 (15:08 +0200)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Sat, 4 Oct 2008 13:08:01 +0000 (15:08 +0200)
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
example/postlicyd.conf
postlicyd/match.c

index ca17b60..123c66a 100644 (file)
@@ -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
index b6d108f..1b02cc2 100644 (file)
@@ -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)