I have a CENTOS 5 with postfix (with virtual domains, mysql , amavis-new, spamassassin, dkim ,dk-filter) and I try to install policyd (1.80,1.82, and 1.9XXX) with the intention to limit the number of messages that the user send/period of time, at least just for start. None of that versions seems to work. I put de debug=3 in policyd.conf, and except the logs generated by start-up nothing shows in maillog (like doesn't exist or postfix don't send the emails to policyd). I also set a low limit for messages send in a period of time , like 50 in 1h and try to brake the rule , but how I said , nothing happen. Policyd just start and that's all.
I try to start policyd manually with strace , everything looks fine. Only thing that differ from others servers where I have install an run policyd , is the file descriptor return by the open() function when load the needed libs . On other servers this is 3, and on this server is 4. I don't now if this is relevant. I also strace the pid of a running policyd daemon and try to telnet to the 10031 port . In this case what I see suspect is time(NULL) = xxxxxxxxxx (look like a time stamp). On running servers I have : time([xxxxxxx]) = xxxxxxxxxx. I suspect that is had something to do with time but I don't know how to resolve this. This is my postfix configuration (postconf -n): alias_maps = mysql:/etc/postfix/mysql-aliases.cf anvil_rate_time_unit = 30s broken_sasl_auth_clients = yes command_directory = /usr/sbin config_directory = /etc/postfix content_filter = smtp-amavis:[127.0.0.1]:10026 daemon_directory = /usr/libexec/postfix debug_peer_level = 2 disable_vrfy_command = yes enable_original_recipient = yes home_mailbox = Maildir/ html_directory = no local_destination_concurrency_limit = 50 local_recipient_maps = $alias_maps $virtual_mailbox_maps unix:passwd.byname mail_owner = postfix mailq_path = /usr/bin/mailq manpage_directory = /usr/local/man message_size_limit = 30000000 mydestination = $myhostname mydomain = myhost.ro myhostname = hostx5.myhost.ro myorigin = $myhostname newaliases_path = /usr/bin/newaliases proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks mysql:/etc/postfix/mysql-virtual_email2email.cf mysql:/etc/postfix/mysql-virtual.cf proxy:mysql:/etc/postfix/mysql-recipient_bcc.cf mysql:/etc/postfix/mysql-virtual-maps.cf mysql:/etc/postfix/mysql-virtual-domains.cf mysql:/etc/postfix/mysql-aliases.cf proxy:mysql:/etc/postfix/mysql-relay.cf mysql:/etc/postfix/mysql-relay.cf mysql:/etc/postfix/mysql-relocated.cf mysql:/etc/postfix/mysql-transport.cf proxy:mysql:/etc/postfix/mysql-client.cf queue_directory = /var/spool/postfix readme_directory = no recipient_bcc_maps = mysql:/etc/postfix/mysql-recipient_bcc.cf relay_domains = mysql:/etc/postfix/mysql-relay.cf relocated_maps = mysql:/etc/postfix/mysql-relocated.cf sample_directory = /etc/postfix sendmail_path = /usr/sbin/sendmail setgid_group = postdrop smtpd_client_restrictions = check_client_access proxy:mysql:/etc/postfix/mysql-client.cf smtpd_data_restrictions = reject_unauth_pipelining smtpd_delay_reject = yes smtpd_etrn_restrictions = reject smtpd_helo_required = yes smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,check_recipient_access mysql:/etc/postfix/mysql-recipient.cf,reject_unauth_destination,permit_mx_backup, permit_auth_destination,check_policy_service inet:127.0.0.1:10031,reject_rhsbl_client blackhole.securitysage.com, reject_rhsbl_sender blackhole.securitysage.com, reject_rhsbl_client rhsbl.ahbl.org, reject_rhsbl_sender rhsbl.ahbl.org, reject_rhsbl_client rhsbl.sorbs.net, reject_rhsbl_sender rhsbl.sorbs.net, reject_rhsbl_client block.rhs.mailpolice.com, reject_rhsbl_sender block.rhs.mailpolice.com, reject_rhsbl_client dynamic.rhs.mailpolice.com, reject_rhsbl_sender dynamic.rhs.mailpolice.com, reject_rbl_client psbl.surriel.com, check_sender_access regexp:/etc/postfix/filter_10024_catchall, permit smtpd_sasl_auth_enable = yes smtpd_sasl_local_domain = $myhostname smtpd_sasl_security_options = noanonymous smtpd_sender_restrictions = check_sender_access mysql:/etc/postfix/mysql-sender.cf transport_maps = mysql:/etc/postfix/mysql-transport.cf unknown_local_recipient_reject_code = 550 virtual_alias_maps = mysql:/etc/postfix/mysql-virtual_email2email.cf proxy:mysql:/etc/postfix/mysql-virtual.cf virtual_gid_maps = mysql:/etc/postfix/mysql-virtual-gid.cf virtual_mailbox_base = /home/vmail virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-domains.cf virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-maps.cf virtual_transport = maildrop virtual_uid_maps = mysql:/etc/postfix/mysql-virtual-uid.cf This is the log of policyd start-ul : Mar 20 17:23:57 mailhost policyd: starting policyd v1.82 Mar 20 17:23:57 mailhost policyd: DEBUG: fd: 0: rlimit: max: 4097 cur: 4097 Mar 20 17:23:57 mailhost policyd: connecting to mysql database: 127.0.0.1 Mar 20 17:23:57 mailhost policyd: connected.. Mar 20 17:26:49 mailhost policyd: shutting down.. Mar 20 17:26:51 mailhost policyd: ---- DAEMON CONFIG ---- Mar 20 17:26:51 mailhost policyd: config: version> v1.82 Mar 20 17:26:51 mailhost policyd: config: debug> 3 Mar 20 17:26:51 mailhost policyd: config: daemon mode> 1 Mar 20 17:26:52 mailhost policyd: config: bindhost> 127.0.0.1 Mar 20 17:26:53 mailhost policyd: config: bindport> 10031 Mar 20 17:26:53 mailhost policyd: config: pidfile> /var/run/policyd.pid Mar 20 17:26:53 mailhost policyd: config: syslog> 22 Mar 20 17:26:53 mailhost policyd: config: chroot> / Mar 20 17:26:53 mailhost policyd: config: uid> 0 Mar 20 17:26:53 mailhost policyd: config: gid> 0 Mar 20 17:26:53 mailhost policyd: config: conn acl> 127.0.0.1 Mar 20 17:26:53 mailhost policyd: Mar 20 17:26:54 mailhost policyd: ---- DATABASE CONFIG ---- Mar 20 17:26:54 mailhost policyd: config: host> 127.0.0.1 Mar 20 17:26:54 mailhost policyd: config: user> vmailuser Mar 20 17:26:54 mailhost policyd: config: pass> postfixpass Mar 20 17:26:54 mailhost policyd: config: database> policyd Mar 20 17:26:54 mailhost policyd: config: options> Mar 20 17:26:54 mailhost policyd: config: failsafe> 1 Mar 20 17:26:54 mailhost policyd: config: keep alive> 0 Mar 20 17:26:54 mailhost policyd: config: version> 40120 Mar 20 17:26:55 mailhost policyd: Mar 20 17:26:56 mailhost policyd: ---- WHITELISTING ---- Mar 20 17:26:58 mailhost policyd: config: whitelisting> 0 Mar 20 17:26:58 mailhost policyd: config: whitelistnullsender> 0 Mar 20 17:26:58 mailhost policyd: config: whitelistsender> 0 Mar 20 17:27:00 mailhost policyd: config: whitelistdnsname> 0 Mar 20 17:27:00 mailhost policyd: config: autowhitelisting> 0 Mar 20 17:27:00 mailhost policyd: config: autowhitelist_number> 500 Mar 20 17:27:00 mailhost policyd: config: autowhitelist_netblock> 0 Mar 20 17:27:00 mailhost policyd: config: autowhitelist_expire> 604800 Mar 20 17:27:00 mailhost policyd: Mar 20 17:27:01 mailhost policyd: ---- BLACKLISTING ---- Mar 20 17:27:01 mailhost policyd: config: blacklisting> 0 Mar 20 17:27:01 mailhost policyd: config: blacklisting_temp_reject> 1 Mar 20 17:27:02 mailhost policyd: config: blacklisting_netblock> 0 Mar 20 17:27:03 mailhost policyd: config: postfix_blacklist> action=defer_if_permit Policy Rejection- Abuse. Go away. Mar 20 17:27:03 mailhost policyd: config: autoblacklisting> 0 Mar 20 17:27:03 mailhost policyd: config: autoblacklist_number> 500 Mar 20 17:27:03 mailhost policyd: config: autoblacklist_expire> 604800 Mar 20 17:27:04 mailhost policyd: config: blacklist_rejection> action=defer_if_permit Policy Rejection- Abuse. Go away. Mar 20 17:27:05 mailhost policyd: Mar 20 17:27:05 mailhost policyd: ---- HELO (HRP) ---- Mar 20 17:27:05 mailhost policyd: config: helo> 0 Mar 20 17:27:05 mailhost policyd: config: helo_max_count> 10 Mar 20 17:27:05 mailhost policyd: config: helo_blacklist_auto_expire> 1209600 Mar 20 17:27:05 mailhost policyd: config: helo_auto_expire> 604800 Mar 20 17:27:05 mailhost policyd: Mar 20 17:27:05 mailhost policyd: ---- SPAMTRAP CONFIG ---- Mar 20 17:27:05 mailhost policyd: config: spamtrap> 0 Mar 20 17:27:05 mailhost policyd: config: postfix_spamtrap> action=reject Policy Rejection- Abuse. Go away. Mar 20 17:27:05 mailhost policyd: config: spamtrapauto_expire> 604800 Mar 20 17:27:05 mailhost policyd: Mar 20 17:27:05 mailhost policyd: ---- GREYLISTING CONFIG ---- Mar 20 17:27:05 mailhost policyd: config: greylisting> 0 Mar 20 17:27:05 mailhost policyd: config: greylist_hostaddr> 3 Mar 20 17:27:05 mailhost policyd: config: postfix_greylist> action=defer_if_permit Policy Rejection- Please try later. Mar 20 17:27:05 mailhost policyd: config: greylist_x_header> 0 Mar 20 17:27:05 mailhost policyd: config: trainingmode> 0 Mar 20 17:27:05 mailhost policyd: config: training_policyd_timeout> 0 Mar 20 17:27:05 mailhost policyd: config: triplet timeout> 240 Mar 20 17:27:05 mailhost policyd: config: optin/optout> 0 Mar 20 17:27:05 mailhost policyd: config: optin all in> 0 Mar 20 17:27:05 mailhost policyd: config: triplet auth timeout> 2592000 Mar 20 17:27:05 mailhost policyd: config: triplet unauth timeout> 172800 Mar 20 17:27:06 mailhost policyd: Mar 20 17:27:06 mailhost policyd: ---- SENDER THROTTLE CONFIG ---- Mar 20 17:27:06 mailhost policyd: config: sender throttle> 1 Mar 20 17:27:06 mailhost policyd: config: sender throttle sasl> 0 Mar 20 17:27:06 mailhost policyd: config: sender throttle host> 0 Mar 20 17:27:06 mailhost policyd: config: postfix_sender_quota_exceeded> action=reject Policy Rejection- Quota Exceeded. Mar 20 17:27:06 mailhost policyd: config: quota_exceeded_temp_reject> 0 Mar 20 17:27:06 mailhost policyd: config: postfix_bad_size> action=reject Policy Rejection- Message size too big. Mar 20 17:27:06 mailhost policyd: config: sender msglimit> 100 Mar 20 17:27:06 mailhost policyd: config: sender quotalimit> 250000000 Mar 20 17:27:06 mailhost policyd: config: sender timelimit> 3600 Mar 20 17:27:06 mailhost policyd: config: sender msgsize> 15000000 Mar 20 17:27:06 mailhost policyd: config: sender expire inactive> 2678400 Mar 20 17:27:06 mailhost policyd: config: sender throttle autoblacklisting> 0 Mar 20 17:27:06 mailhost policyd: config: sender throttle autoblacklist number> 3 Mar 20 17:27:06 mailhost policyd: config: sender throttle autoblacklist expire> 21600 Mar 20 17:27:06 mailhost policyd: Mar 20 17:27:06 mailhost policyd: ---- RECIPIENT THROTTLE CONFIG ---- Mar 20 17:27:06 mailhost policyd: config: recipient throttle> 0 Mar 20 17:27:06 mailhost policyd: config: recipient msglimit> 64 Mar 20 17:27:06 mailhost policyd: config: recipient timelimit> 3600 Mar 20 17:27:06 mailhost policyd: config: recipient expire inactive> 2678400 Mar 20 17:27:06 mailhost policyd: config: postfix_recipient_quota_exceeded> action=reject Policy Rejection- Quota Exceeded. Mar 20 17:27:07 mailhost policyd: config: quota_exceeded_temp_reject> 0 Mar 20 17:27:07 mailhost policyd: Mar 20 17:27:07 mailhost policyd: starting policyd v1.82 Mar 20 17:27:08 mailhost policyd: DEBUG: fd: 0: rlimit: max: 4097 cur: 4097 Mar 20 17:27:09 mailhost policyd: connecting to mysql database: 127.0.0.1 Mar 20 17:27:09 mailhost policyd: connected.. This is what I get when telnet to 10031 on the terminal where I strace the pid of policyd: accept(8, {sa_family=AF_INET, sin_port=htons(51630), sin_addr=inet_addr("127.0.0.1")}, [16]) = 10 time(NULL) = 1206030082 stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2195, ...}) = 0 stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2195, ...}) = 0 stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2195, ...}) = 0 send(6, "<22>Mar 20 18:21:22 policyd: DEB"..., 68, MSG_NOSIGNAL) = 68 time(NULL) = 1206030082 stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2195, ...}) = 0 stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2195, ...}) = 0 stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2195, ...}) = 0 send(6, "<22>Mar 20 18:21:22 policyd: con"..., 90, MSG_NOSIGNAL) = 90 select(11, [8 10], [], NULL, NULL Could someone help me? Thank you in advance ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ policyd-users mailing list policyd-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/policyd-users