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 protected]' 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.
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.
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.
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.