Author Topic: cbpolicyd (group:cwp_domains): - Source 'any' is not a valid specification  (Read 897 times)

0 Members and 3 Guests are viewing this topic.

Offline
*
On Rocky8 I got that message:
Quote
[POLICIES] WARNING: [ID:6/Name:Default Server Limit]=>(group:cwp_domains): - Source 'any' is not a valid specification
Any ideas why this appear ?
Thanks for help

Offline
***
On Rocky8 I got that message:
Quote
[POLICIES] WARNING: [ID:6/Name:Default Server Limit]=>(group:cwp_domains): - Source 'any' is not a valid specification
Any ideas why this appear ?
Thanks for help

cbpolicyd (also known as Policyd v2 or Cluebringer) is a policy server for the Postfix Mail Transfer Agent (MTA).

Its main function is to evaluate SMTP transactions in real time to enforce access control rules, sending quotas, and spam mitigation.

Main Features:
- Quota control: Limits the number of messages a user or domain can send per hour or day to stop compromised accounts.
- Access control: Allows accepting, rejecting, discarding, or redirecting emails based on different criteria.
- Greylisting and SPF: Helps filter spam by applying temporary delays to unknown senders and validating SPF records.
- HELO/EHLO checks: Analyzes the initial commands of the SMTP protocol.

The installation in the following script show the process:
/usr/local/cwpsrv/htdocs/resources/scripts/install_cbpolicyd

If installed, it's configured in /etc/cbpolicyd/cluebringer.conf.

There are a table 'policy_members' in 'postfix_policyd' database.

The error "Source 'any' is not a valid specification in cbpolicyd" occurs because the policy parser does not recognize the literal string 'any' inside a group context or policy member specification like cwp_domains. It expects explicit IP ranges, CIDR blocks, or valid internal group/domain tokens.

You can view this internal_ips to see what does it include, accessing mysql as root:

Code: [Select]
# mysql
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 120812
Server version: 10.6.28-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> select * from policy_members;
1|1||||0
2|2|%internal_ips,%internal_domains|!%internal_domains||0
3|3|!%internal_ips,!%internal_domains|%internal_domains||0
4|4|%internal_ips,%internal_domains|%internal_domains||0
5|5|@example.net|||0
6|6|any|!%internal_domains||0
MariaDB [(none)]> select * from policy_groups;
1|internal_ips|0|
2|internal_domains|0|
MariaDB [(none)]> select * from policy_group_members;
1|1|10.0.0.0/8|0|
2|2|@example.org|0|
3|2|@example.com|0|
(...)

You have error in some of these tables.
In the first example, you could execute:
Code: [Select]
MariaDB [(none)]> delete from policy_members where ID=1;

But your error is:
Code: [Select]
[ID:6/Name:Default Server Limit]=>(group:cwp_domains): - Source 'any' is not a valid specification

Seems related to some item 'cwp_domains'. You must check you database, to find it.
Note the id is 6

I don't know how you installed it, but you can reinstall it:
Code: [Select]
# /usr/local/cwpsrv/htdocs/resources/scripts/install_cbpolicyd reinstall
Or uninstall it:
Code: [Select]
# /usr/local/cwpsrv/htdocs/resources/scripts/install_cbpolicyd remove
Regards,
Netino