Koozali.org: home of the SME Server

Mail Blocking

Offline s1Lv3r

  • *
  • 6
  • +0/-0
Mail Blocking
« on: October 01, 2009, 01:19:54 PM »
Hi all,

Is there a way to only accept emails from specific email addresses addressed to a group?

Thanks!

Offline s1Lv3r

  • *
  • 6
  • +0/-0
Re: Mail Blocking
« Reply #1 on: October 05, 2009, 05:30:01 AM »
Ok, let me rephrase my post :P

I need to prevent some email senders here from sending unwanted emails within the company.

Is there any way for me to restrict/block a particular email sender from sending to specific email addresses or group?

Hope somebody can help me.

Thanks!

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: Mail Blocking
« Reply #2 on: October 05, 2009, 02:24:40 PM »
s1Lv3r

You can edit /var/qmail/control/badmailfromto
with pairs of email addresses
# sender_address        tab     recipient_address
sender@sender.domain  recipient@recipient.domain
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: Mail Blocking
« Reply #3 on: October 15, 2009, 02:07:57 PM »
s1Lv3r

Quote
Is there any way for me to restrict/block a particular email sender from sending to specific email addresses or group?

For a more specific answer re check_badmailfromto plugin see
http://forums.contribs.org/index.php/topic,35667.0.html
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Mail Blocking
« Reply #4 on: October 15, 2009, 04:56:55 PM »
You can edit /var/qmail/control/badmailfromto

SInce that file is a templated configuration file, you should never edit it directly - you should create custom template fragments to provide the content which you require. The template could use a database file (even CSV or spreadsheet file) to produce its content.

Offline raem

  • *
  • 3,972
  • +4/-0
Re: Mail Blocking
« Reply #5 on: October 16, 2009, 09:18:15 AM »
CharlieBrady & s1Lv3r

Quote
....you should create custom template fragments to provide the content which you require. The template could use a database file (even CSV or spreadsheet file) to produce its content.

Added this to the FAQ, which uses a custom template, but needs more work/study to create the code to extract data from a db file.
http://wiki.contribs.org/Email#How_to_block_email_from_one_address_to_another_address_with_check_badmailfromto_plugin
...