|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: Banyan He (banyan
rootong.com)
Date: Tue Oct 16 2007 - 05:17:24 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi Simone,
I think this is what you want.
/etc/postfix/main.cf:
smtpd_client_restrictions =
check_client_access mysql:/etc/postfix/access
/etc/postfix/access:
1.2.3 REJECT
1.2.3.4 OK
Simone Felici wrote:
> Hi to all,
>
> I've implemented a db query on SQL database to ban unauthorized
> sender. I use this to block spam from some email-addresses.
> main.cf:
>
> smtpd_sender_restrictions =
> check_sender_access mysql:/etc/postfix/mysql_check_blacklist.cf,
> # for MySQL
> # check_sender_access hash:/etc/postfix/hash_check_blacklist,
> # for file db
> permit
>
> This works with hash file, example:
>
> address1
domain1.com REJECT
> address2
domain2.com REJECT
> address3
domain3.com REJECT
> address4
domain4.com REJECT
>
> or on database with query like this:
>
> user = <username>
> password = <password>
> hosts = <host>
> dbname = <database>
> query = SELECT action FROM banned where domain='%d' and
> account='%u'
>
>
> How can I implement a check to ban requests from an IP address or from
> a net instead from an email-address?
> I've tested with:
>
> IPADDRESS REJECT
>
> into the same hash_check_blacklist with no success :(
> An example would be apreciated, overall to compose a right query. I
> can send the domain (%d), the account (%u) but no idea how send the IP
> of the sender to compose a query.
>
>
> Thank's in advice!
>
> Simon
>
>
--
Banyan He
Mail&Web Security
Mobile: +86 13641777622
MSN: banyan.he
hotmail.com
Skype: banyan.he
Email: banyan
rootong.com
AntiSpam Test: antispam
mail.rootong.com
AntiVirus Test: antivirus
mail.rootong.com
Wemaster Mail: webmaster
mail.rootong.com
Website: http://www.rootong.com
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]