The K Blag

Interesting Topics
  • Home
  • How To...
  • Who is The K?

Blocking E-Mail By IP Address Using Sun Messaging Server

Published by Mike on December 11, 2007 10:26 am under E-Mail, sun

I’ve been getting increasing amounts of Unsolicited Bulk E-Mail, or Spam from certain ranges of IP Addresses that have not been sending any legitimate E-Mail. I’ve wanted to block these IP ranges when they first connect to the mail server, and before my (expensive) Spam filter needs to run.

The first step is to identify the IP addresses sending you bulk E-Mail; or if you want, you can get an entire set of IP Addresses, already sub-netted for use by Sun Messaging Server at http://ip.ludost.net/. For our purposes here, we want to block the IP Address range 192.231.176.0/24.

Create a file (much easier to maintain a single file than to continually edit the mappings file); with a name like port_access_block.txt and add the line as such (note, there are 2 spaces at the beginning of the line):

TCP|*|25|$(192.231.176.0/24)|* $T$N500$ No$ thank$ you

when the file is created, edit the mappings file, adding a link to your newly created file in the PORT_ACCESS section. My updated PORT_ACCESS section looked like:

PORT_ACCESS

</opt/msg/msg-test/config/port_access_block.txt
*|*|*|*|* $C$|INTERNAL_IP;$3|$Y$E
* $YEXTERNAL

Ensure the port_access_block.txt is readable by the user running your mail server; then recompile and restart your messaging server.

All E-mail to your mail server from remote machines in the IP address range listed will rejected immediately with a fatal error.

bookmark to
Add 'Blocking E-Mail By IP Address Using Sun Messaging Server' to Del.icio.usAdd 'Blocking E-Mail By IP Address Using Sun Messaging Server' to diggAdd 'Blocking E-Mail By IP Address Using Sun Messaging Server' to redditAdd 'Blocking E-Mail By IP Address Using Sun Messaging Server' to TechnoratiAdd 'Blocking E-Mail By IP Address Using Sun Messaging Server' to Stumble Upon

No Comment

Comments are closed.

Posting your comment.

  • Categories

    • changelog
    • E-Mail
    • ldap
    • random
    • replication
    • sun
  • RSS Feeds

    • Posts RSS
    • Comments RSS
  •  

    March 2010
    M T W T F S S
    « Dec    
    1234567
    891011121314
    15161718192021
    22232425262728
    293031  
  • Blogroll

    • Konopka Family
    • The Gastromaniacs

Copyright © 2010 The K Blag