HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   General (http://www.howtoforge.com/forums/forumdisplay.php?f=25)
-   -   How to blacklist a whole sender domain in postfix? (http://www.howtoforge.com/forums/showthread.php?t=59738)

Dehumanizer 29th November 2012 12:04

How to blacklist a whole sender domain in postfix?
 
When I add "@domain.com" in the postfix blacklist configuration as a sender, it does not work, postfix is always searching the whole email in the database, the mysql query goes like this:
SELECT access FROM mail_access WHERE source='email@domain.com' and type = 'sender' and active = 'y' and server_id = 1

and of course if the record in the database is just @domain.com, the above query does not match it.

Is there any way how to completely blacklist the whole sender domain?

Thanks.

Dehumanizer 30th November 2012 09:36

Nobody? Hmm...

till 30th November 2012 10:15

Have you tried to add just "domain.com" and not "@domain.com"?

See Postfix access manpage:

http://www.postfix.org/access.5.html

Dehumanizer 30th November 2012 10:18

Quote:

Originally Posted by till (Post 288961)
Have you tried to add just "domain.com" and not "@domain.com"?

See Postfix access manpage:

http://www.postfix.org/access.5.html

Yes, I tried domain.com and also .domain.com
The problem is that the SQL query always includes the complete email address so no matter what I have in the database it will not match that unless there is a match for complete email address.

till 30th November 2012 10:23

Ok, then it might be that the other access blocking types are not supported for mysql based access lists. You can en e.g. try to add a second file based access list in postfix for that domain.

Dehumanizer 30th November 2012 11:34

Strange, I don't know what I've done but it works now (without the leading @, just the domain name has to be in the blacklist to blacklist whole domain)... Well, whatever, at least the problem is solved. Thanks.


All times are GMT +2. The time now is 07:34.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.