I'm having some difficulty getting policyd working under Postfix 2.3.3 under Centos. I would like to use it in the SMS gateway scenario where I limit the amount of messages that can be sent out to an external address in a period of time.
I compiled, installed and started policyd daemon. I'm using the default config file and loaded the sample WHITELIST.sql. I added following line in main.cf (I couldn't get the one in documentation going at all). Rest would immediately get 554 error smtpd_recipient_restrictions = check_policy_service inet:127.0.0.1:10031, reject however I immediately getr -> MAIL FROM:<[EMAIL PROTECTED]> <- 250 2.1.0 Ok -> RCPT TO:<[EMAIL PROTECTED]> <** 554 5.7.1 <[EMAIL PROTECTED]>: Recipient address rejected: Access denied -> QUIT <- 221 2.0.0 Bye === Connection closed by foreign host. Looking at the policyd log it all looks fine DEBUG: fd: 4 select(): fd 4 is ready for read DEBUG: fd: 4 connection got an EOF, data_read = 0 DEBUG: fd: 4 shutting down fd 4 DEBUG: saved fd: numi = 0, connfd = 4 connection from: 127.0.0.1 port: 42981 slots: 0 of 4096 used DEBUG: fd: 4 select(): fd 4 is ready for read DEBUG: fd 4: w_read: returning -2 after reading 493 bytes DEBUG: fd: 4 policy_array[4][0]:request=smtpd_access_policy DEBUG: fd: 4 policy_array[4][1]:protocol_state=rcpt DEBUG: fd: 4 policy_array[4][2]:protocol_name=smtp DEBUG: fd: 4 policy_array[4][3]:client_address=127.0.0.1 DEBUG: fd: 4 policy_array[4][4]:client_name=localhost.localdomain DEBUG: fd: 4 policy_array[4][5]:reverse_client_name=localhost.localdomain DEBUG: fd: 4 policy_array[4][6]:helo_name=smtp1.bos.domain.com DEBUG: fd: 4 policy_array[4][7]:[EMAIL PROTECTED] DEBUG: fd: 4 policy_array[4][8]:[EMAIL PROTECTED] DEBUG: fd: 4 policy_array[4][9]:recipient_count=0 DEBUG: fd: 4 policy_array[4][10]:queue_id= DEBUG: fd: 4 policy_array[4][11]:instance=1f31.4654d578.f3440.0 DEBUG: fd: 4 policy_array[4][12]:size=0 DEBUG: fd: 4 policy_array[4][13]:etrn_domain= DEBUG: fd: 4 policy_array[4][14]:sasl_method= DEBUG: fd: 4 policy_array[4][15]:sasl_username= DEBUG: fd: 4 policy_array[4][16]:sasl_sender= DEBUG: fd: 4 policy_array[4][17]:ccert_subject= DEBUG: fd: 4 policy_array[4][18]:ccert_issuer= DEBUG: fd: 4 policy_array[4][19]:ccert_fingerprint= DEBUG: fd: 4 policy_array[4][20]:encryption_protocol= DEBUG: fd: 4 policy_array[4][21]:encryption_cipher= DEBUG: fd: 4 policy_array[4][22]:encryption_keysize=0 DEBUG: fd: 4 host_array[4][0]: localhost.localdomain DEBUG: fd: 4 host_array[4][2]: 127.0.0.1 DEBUG: fd: 4 host_array[4][3]: 127.0.0.% DEBUG: fd: 4 host_array[4][4]: 127.0.%.% DEBUG: fd: 4 host_array[4][5]: 127.%.%.% DEBUG: fd: 4 host_array[4][6]: foo DEBUG: fd: 4 host_array[4][7]: smtp1.bos.domain.com DEBUG: fd: 4 host_array[4][8]: foo DEBUG: fd: 4 host_array[4][9]: smtp2.bos.domain.com DEBUG: fd: 4 triplet_array[4][0]: 127.0.0 DEBUG: fd: 4 triplet_array[4][1]: [EMAIL PROTECTED] DEBUG: fd: 4 triplet_array[4][2]: [EMAIL PROTECTED] DEBUG: fd: 4 triplet_array[4][3]: 0 DEBUG: fd: 4 triplet_array[4][5]: smtp1.bos.domain.com DEBUG: fd: 4 triplet_array[4][6]: 1f31.4654d578.f3440.0 DEBUG: fd: 4 checking whitelist DEBUG: fd: 4, db_optquery(): SELECT COUNT(*) FROM whitelist WHERE _whitelist='127.0.0.1' OR _whitelist='127.0.0.%' OR _whitelist='127.0.%.%' OR _whitelist='127.%.%.%' DEBUG: fd: 4 row: 0 data: 1 (recieved) DEBUG: fd: 4 row: 0 data: 1 (extracted) DEBUG: fd: 4 whitelist found: 127.0.0.1 DEBUG: fd: 4 bypassing other modules rcpt=4, whitelist=update, host=127.0.0.1 (localhost.localdomain), [EMAIL PROTECTED], [EMAIL PROTECTED], size=0 DEBUG: fd: 4 select(): fd 4 is ready for write DEBUG: fd: 4 returning after 14 bytes of data written I appreciate any help. Thanks, Vladimir ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ policyd-users mailing list policyd-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/policyd-users