The K Blag

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

Blocking E-Mail By Sender Domain using Sun Java Messaging Server

Published by Mike on December 13, 2007 11:05 am under E-Mail, sun

With the Sun Java Messaging Server, you can block inbound mail based on the senders E-Mail domain (as self-reported in their E-Mail), also known as their From: address. In the example here, I want to block all inbound email with a From: address from Zambia (TLD: .za). It doesn’t matter where in the world it is sent from, any inbound E-Mail that is said to be from a .za domain will get blocked automatically.

In order to keep my mappings file (/opt/msg/msg-test/config/mappings) more readable, and to keep the items organized, I created a file of domains that I block, and include it in my mappings file in the right section. I named my file /opt/msg/msg-test/config/orig_send_access_block.txt .

I do an include of the file in the ORIG_SEND_ACCESS section of the mappings file. It is the first content line, as such:

ORIG_SEND_ACCESS

</opt/msg/msg-test/config/orig_send_access_block.txt
tcp_local|*|tcp_local|* $N$D30|Relaying$ not$ allowed

The contents of the orig_send_access_block.txt file are as follows (each line is indented 2 spaces):

tcp_local|*.za|*|* $NNo$ thank$ you$ Zambia

I ensured the files were readable by the id that runs Sun Java Messaging Server, then re-compiled and restarted the imsimta dispatcher.

./imsimta cnbuild

./imsimta chbuild

./imsimta restart

bookmark to
Add 'Blocking E-Mail By Sender Domain using Sun Java Messaging Server' to Del.icio.usAdd 'Blocking E-Mail By Sender Domain using Sun Java Messaging Server' to diggAdd 'Blocking E-Mail By Sender Domain using Sun Java Messaging Server' to redditAdd 'Blocking E-Mail By Sender Domain using Sun Java Messaging Server' to TechnoratiAdd 'Blocking E-Mail By Sender Domain using Sun Java 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
  •  

    July 2010
    M T W T F S S
    « Dec    
     1234
    567891011
    12131415161718
    19202122232425
    262728293031  
  • Blogroll

    • Konopka Family
    • The Gastromaniacs

Copyright © 2010 The K Blag