how to Blacklist specific email in postfix
Hi all,
I have installed postfix in my ubuntu server and i am trying to blacklist a specific email address to a specific user or the whole domain itself. Is there a work around on this. I've searched google and i found this... http://www.cyberciti.biz/faq/howto-b...email-address/ same within this forum.... http://www.linuxquestions.org/questi...cklist-501851/ but the two seems not working.. anyone please help.. Thank you! regards, |
I did it under file client_access.pcre,
/^ip-addr/ DISCARD |
could you please elaborate on how did you do it?
|
under postfix, main.cf,
under smtpd_client_restrictions = add line, check_client_access pcre:/....dir/client_access.pcre, create file client_access.pcre, add line, /^ip-addr\./ DISCARD it will drop any email from this ip-addr. |
Thanks for the reply, if i change the ip-addr to specific email address will it work? I tried it but its not working....Im trying to block specific email address not the domain itself.. :)
|
Show the output of postconf -n.
You will create a sender_restriction, but I need to see your default postfix setup to advise. |
tried IP address as well... still not working... :(
|
If you are trying to blacklist an email address, why are you trying an IP address ? Show you postconf -n and I'll show you what lines to add.
|
here it is...
main.cf smtpd_sender_restriction = check_client_access pcre:/etc/postfix/client_access.pcre, permit_sasl_authenticated, permit_mynetworks,re ject_non_fqdn_sender, reject_unknown_sender_domain,reject_unauth_pipelining,check_client_access, permit |
That is not postconf -n, and some of those checks dont make sense in that given stage.
|
sent you the results
|
There is nothing confidential or compromising in your postconf -n output. It is standard, required practice on the postfix mailing list.
I'm summarizing here for others to learn as well: Your postconf output does not match your early statements, so we'll just ignore those. This is why postconf -n output is mandatory. My comments follow below a section or line. I've added those lines in blue; you should remove things in red. Code:
$ postconf -n Code:
/etc/postfix/client_checks Code:
postmap sender_checks Code:
/etc/postfix/helo_checks.pcre: |
Thanks so much for the great tutorial Mr. C! I really do appreciate your help....I will implement these changes and will give you feedback!
|
You're welcome. Hang out on the postfix list. Loads of good info there from the experts.
|
Quote:
For the line in helo_checks.pcre should I put (in case i got goofy.de) /^goofy\.de$/ REJECT Hijacked my domain "goofy.de" ??? Or would I leave it as is (mydomain\.de$)? I'm not shure, if mydomain here is an variable or just an example.... Another one is client_checks: Can I just put a list of country-endings I would never expect mail from inside like this: Code:
.ad REJECT I don't expect mail from you! And last question in my case for main.cf: Code:
mime_header_checks = pcre:/etc/postfix/mime-header-checks Should I put in some kind of restrictions for smtpd_client_restrictions = smtpd_helo_restrictions = smtpd_sender_restrictions = too? |
All times are GMT -5. The time now is 08:57 PM. |