From: "Sandy Drobic" <suse-linux-e@japantest.homelinux.com> david rankin wrote:
List, Sandy:
I'm trying to do this (from man 5 access):
EXAMPLE The following example uses an indexed file, so that the order of table entries does not matter. The example permits access by the client at address 1.2.3.4 but rejects all other clients in 1.2.3.0/24. Instead of "hash" lookup tables, some systems use "dbm". Use the command "post- conf -m" to find out what lookup tables Postfix supports on your sys- tem.
/etc/postfix/main.cf: smtpd_client_restrictions = check_client_access hash:/etc/postfix/access
/etc/postfix/access: 1.2.3 REJECT 1.2.3.4 OK
So I did this:
main.cf: smtpd_client_restrictions = check_client_access hash:/etc/postfix/client_check
[root@bonza postfix]# cat client_check 218 REJECT 221 REJECT
postmap client_check postfix reload
But for some reason, it does not work as expected. It does this:
[root@bonza postfix]# postmap -q 221 hash:client_check REJECT [root@bonza postfix]# postmap -q 221.1.1.1 hash:client_check [root@bonza postfix]# postmap -q 221.2.1.1 hash:client_check
AHAH! It does work as man 5 access says. HOWEVER, it does NOT work with postmap -q. Go figure? Here is a log entry with the hash:/etc/postfix/client_check Jul 11 23:50:20 bonza postfix/smtpd[27538]: NOQUEUE: reject: RCPT from unknown[218.12.90.19]: 554 <unknown[218.12.90.19]>: Client host rejected: F.O.A.D.; from=<info@ehbsr.com> to=<info@rankin-bertin.com> proto=SMTP helo=<mail2theweb.com> btw the "F.O.A.D." was my addition... Postfix didn't do that on its own... -- David C. Rankin, J.D., P.E. Rankin Law Firm, PLLC 510 Ochiltree Street Nacogdoches, Texas 75961 (936) 715-9333 www.rankinlawfirm.com -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.9.10/384 - Release Date: 7/10/06 -- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com