Exim Safelist

Announcements of packages that are now released.

Postby dRB » Sat Mar 04, 2006 3:03 am

:) Hi folks,

I wasn't sure exactly where to post this, as the script really isn't a package of any sort. But merely an addon feature for Exim, to accomodate a safelisting mechanism against spam attacks.

I simply wanted to make it available for the next guy/gal who may need to effect similar damage control.

How It Works:
ALL email NOT appearing on the safe list (sender_accept.lst) is rejected.

Download:
from command line
Code: Select all
cd /pkg/addons
snarf http://www.rbtd.com/packages/Safelist.tar
tar -pxvzf Safelist.tar


Contents of the .tar file will extract to /pkg/addons/Safelist/, with all file attributes preserved. And a Safelist category, with LIST/ADD/DEL controls, becomes integrated in Freesco's Control Panel.

The file [sender_accept.lst] is used to store sender email addresses. This file is automatically created on the first ADD operation.

To fully implement the safelist mechanism in Exim, you will need to modify your exim.conf file, as follows: (tested on Exim 4.5)

Locate the [acl_check_rcpt:] section

Code: Select all
# immediately following this next line
  require verify = sender

  # INSERT the remaining configurations

  # FORGED HELOs
  deny message     = Forged IP detected in HELO (it's mine) - $sender_helo_name
       hosts       = !+relay_from_hosts
       log_message = Forged IP detected in HELO: $sender_helo_name
       condition   = ${if eq{$sender_helo_name}{$interface_address}{yes}{no}}

  deny message     = Forged IP detected in HELO - $sender_helo_name != $sender_host_address
       hosts       = !+relay_from_hosts
       log_message = Forged IP detected in HELO - $sender_helo_name != $sender_host_address
       condition   = ${if match{$sender_helo_name}{\N^\d+(\.\d+){3}$\N}{yes}{no}}
       condition   = ${if eq{$sender_helo_name}{$sender_host_address}{no}{yes}}

  deny message        = Forged hostname detected in HELO - $sender_helo_name
       hosts          = !+relay_from_hosts
       !authenticated = *
       log_message    = Forged hostname detected in HELO = $sender_helo_name
       condition      = ${if match_domain{$sender_helo_name}{+local_domains}{yes}{no}}

  deny message     = Only one recipient accepted for NULL sender
       senders     = :
       condition   = ${if>{$rcpt_count}{1}{1}}

# SENDER-WHITELIST
  deny message       = REJECTED [$sender_address] *NOT* on safe-list
       log_message   = REJECTED [$sender_address] *NOT* on safe list
       senders       = ! /pkg/etc/sender_accept.lst


Activate the new changes by restarting exim:
rc_exim restart

Go to the Freesco Control Panel, and scroll to the Safelist category, where you can List/Add/Del as necessary.

-dRB
Please bear with me ... I seemed to have lost my marbles.
User avatar
dRB
Junior Advanced Member
 
Posts: 196
Joined: Tue Apr 30, 2002 2:08 am
Location: Dryden, Ontario. CANADA

Postby Lightning » Sat Mar 04, 2006 3:11 am

tar -pxvzf Safelist.tar

For general information "tar" is not included on a standard FREESCO install unless you install the "utils" package from Dingetje or the "mc" package which include the tar binary. However you can use the "star" command like

cat Safelist.tar | star
rm Safelist.tar
If you are afraid that you might make a mistake. The chances are high that you will never learn anything.
User avatar
Lightning
FREESCO GOD !!
 
Posts: 12079
Joined: Wed Nov 14, 2001 6:50 am
Location: Oregon, USA

Postby PHBC50 » Sun Mar 05, 2006 10:50 pm

Hello dRB,
I took the liberty to make a package with your script.
If you want to try it it is available here :
Code: Select all
pkg -i http://freesco.zapto.org/packages/03x/eximsafelist_1.0_phbc50


best regards,
phbc50
The only way of discovering the limits of the possible is to venture a little way past them into the impossible. (Arthur C Clarke)
User avatar
PHBC50
Junior Advanced Member
 
Posts: 139
Joined: Thu Nov 21, 2002 8:59 pm
Location: France

Postby dRB » Mon Mar 06, 2006 7:51 pm

:D

No objections what so ever, PHBC50 (and thanks for that)

I was considering adding an enable/disable control in the script, so that anyone can simply enable or disable the safelist mechanism on demand (hands-free). Rendering the addon portable to future versions of Exim.

The control would then:
1. automatically modify the exim.conf file
2. restart exim

May prove to be useful (or not).

-dRB
Please bear with me ... I seemed to have lost my marbles.
User avatar
dRB
Junior Advanced Member
 
Posts: 196
Joined: Tue Apr 30, 2002 2:08 am
Location: Dryden, Ontario. CANADA

Postby PHBC50 » Thu May 25, 2006 9:28 am

Hello,
I have updated the package with some new functions :
- Show safelist status (on/off) in Control Panel
- Integrate/Turn off the safelist on demand via the Web Control Panel (by inserting/deleting the entries AND restarting exim so it is fully automated)
- A script (safelst) is available on command line to control the safelist config status (in/out).
- Should be compatible with all exim packages for FREESCO 0.3.x (including exim 3.x), though I have only tested it with exim 4.50.

To install you can use :
Code: Select all
pkg -i http://freesco.zapto.org/packages/03x/eximsafelist_1.1_phbc50


regards,
phbc50

PS: If you had the previous version of safelist installed it is better to uninstall it before installing this one.
The only way of discovering the limits of the possible is to venture a little way past them into the impossible. (Arthur C Clarke)
User avatar
PHBC50
Junior Advanced Member
 
Posts: 139
Joined: Thu Nov 21, 2002 8:59 pm
Location: France

Postby jebusyoda » Tue Mar 11, 2008 7:58 pm

Is the safelist package still available? Link is broken.
...JJG
User avatar
jebusyoda
Junior Member
 
Posts: 25
Joined: Thu Sep 23, 2004 11:19 pm


Return to 3rd Party Package Release Announcements

Who is online

Users browsing this forum: No registered users and 3 guests

cron