Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 23rd August 2007, 18:00
leeeonardo leeeonardo is offline
Member
 
Join Date: Apr 2007
Posts: 57
Thanks: 14
Thanked 0 Times in 0 Posts
Default How to block some domain in ISPConfig???

I recive lot of email that are trash it, I wannt to block them, for example *@domain.com, and this configuration is distributed to all the mail in my server. I use Centos 4.4 with ISPConfig.

Thanks a lot.
Reply With Quote
Sponsored Links
  #2  
Old 23rd August 2007, 19:02
edge edge is offline
Moderator
 
Join Date: Dec 2005
Location: The Netherlands
Posts: 2,033
Thanks: 261
Thanked 147 Times in 128 Posts
Default

You can do this in /etc/postfix/restrictions

1) add in the file restrictions (it's in /etc/postfix/) the following
Code:
domain.com		REJECT
anotherdomain.com	REJECT
2) Now run
Code:
postmap /etc/postfix/restrictions
3) Now reload Postfix with
Code:
postfix reload
After this any email from domain.com and anotherdomain.com will be rejected.

Please note that everytime when you add, or remove a domain from restrictions, you WILL need to do step 2 and 3 again!
__________________
Never execute code written on a Friday or a Monday.

Last edited by edge; 23rd August 2007 at 19:47.
Reply With Quote
  #3  
Old 23rd August 2007, 19:26
leeeonardo leeeonardo is offline
Member
 
Join Date: Apr 2007
Posts: 57
Thanks: 14
Thanked 0 Times in 0 Posts
Default

But this File RESTRICTIONS dont exist, can I create file???
Reply With Quote
  #4  
Old 23rd August 2007, 19:27
leeeonardo leeeonardo is offline
Member
 
Join Date: Apr 2007
Posts: 57
Thanks: 14
Thanked 0 Times in 0 Posts
Default

But this file RESTRICTIONS don't exist in /etc/postfix, can I create file????
Reply With Quote
  #5  
Old 23rd August 2007, 19:40
edge edge is offline
Moderator
 
Join Date: Dec 2005
Location: The Netherlands
Posts: 2,033
Thanks: 261
Thanked 147 Times in 128 Posts
Default

yes you can, but in that case you will need to add the following to /etc/postfix/main.cf

smtpd_sender_restrictions = hash:/etc/postfix/restrictions

You will need to restart postfix again after this!
__________________
Never execute code written on a Friday or a Monday.

Last edited by edge; 23rd August 2007 at 19:48.
Reply With Quote
The Following User Says Thank You to edge For This Useful Post:
leeeonardo (27th August 2007)
  #6  
Old 23rd August 2007, 20:16
leeeonardo leeeonardo is offline
Member
 
Join Date: Apr 2007
Posts: 57
Thanks: 14
Thanked 0 Times in 0 Posts
Default

Ok, I do it. If i wannt to restrict a email, ex. user@domain.com. Can I add to file restrictions????.
Reply With Quote
  #7  
Old 23rd August 2007, 20:34
leeeonardo leeeonardo is offline
Member
 
Join Date: Apr 2007
Posts: 57
Thanks: 14
Thanked 0 Times in 0 Posts
Default

I see that many email have diferent domine name, but in the body of the message have a many same words, how can I create a rule for restrict email with the same body and/or subject???. For example, subject: VIAGRA
Reply With Quote
  #8  
Old 24th August 2007, 22:10
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,715 Times in 2,557 Posts
Default

You could use header and body checks:
http://www.postfix.org/header_checks.5.html
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #9  
Old 25th August 2007, 21:17
leeeonardo leeeonardo is offline
Member
 
Join Date: Apr 2007
Posts: 57
Thanks: 14
Thanked 0 Times in 0 Posts
Default

I could already make work the Header_checks, but the Body_checks I have not been able to. They could help me giving me a simple example: For example, Body: "Sale of Software", thank you.
Reply With Quote
  #10  
Old 26th August 2007, 16:25
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,715 Times in 2,557 Posts
 
Default

body_checks work exactly the same way as the header_checks.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
The Following User Says Thank You to falko For This Useful Post:
leeeonardo (27th August 2007)
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ISPConfig 2.2.13 released till General 35 23rd July 2007 16:28
Unsure of DNS, hosts, and domain name plethera21 Installation/Configuration 1 4th September 2006 11:01
fastcgi and php with ispconfig tosser Tips/Tricks/Mods 3 25th June 2006 21:01
SP-Server Setup - Ubuntu 5.10 "Breezy Badger" - Page 6 (changes) LuisC-SM HOWTO-Related Questions 0 21st April 2006 15:16
ISPConfig - Install/Update deletes hostname from my domain from admin URL Prompt Developers' Forum 4 22nd November 2005 23:01


All times are GMT +2. The time now is 10:21.


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