Apologies to those who follow the boards, but I thought this is of general 
interest to devinfo.

Gordon

----- Forwarded message from Gordon Rowell <[EMAIL PROTECTED]> -----

From: Gordon Rowell <[EMAIL PROTECTED]>
To: General discussion <[EMAIL PROTECTED]>
Subject: [e-smith General Discussion] Re: smtpd_check_rules
Date: 27 Jan 2001 13:55:12 -0000
Reply-To: [EMAIL PROTECTED]

This message was sent from: General discussion.
<http://www.e-smith.org/bboard/read.php?f=1&i=4034&t=4033> 
----------------------------------------------------------------

Dean Brandt wrote:
> 
> Hi Guys,
> 
> I have copied the /etc/smtpd_check_rules file to
> /etc/e-smith/templates-custom/etc/ directory 

[This is related to 4.1bX - it should be on the devinfo list. I'm
answering it here as it contains some interesting issues on understanding
the template system]

No, please don't do that. Create custom template fragments for your
changes.  If you copy the output file, you will stop all existing rules
from applying.  So, for example, if you create a new virtualdomain,
it will not appear in the output file. The template mechanism is very
powerful - you can add a one-line fragment and it will just be added to
the output file in the right place.

Have a look at the breadown in 
/etc/e-smith/templates/var/spool/smtpd/etc/smtpd_check_rules

Your fragments should be in 
/etc/e-smith/templates-custom/var/spool/smtpd/etc/smtpd_check_rules

NOTE: The file is /var/spool/smtpd/etc/smtpd_check_rules, not
/etc/smtpd_check_rules. The link in /etc is there for convenience,
but the file which is read by smtpd is in the chroot() jail. We should
probably remove the link to avoid confusion (though it makes life easier
when looking around).

> and edited it so
> that I can restrict a certain spammer from sending mail to my
> e-smith box.
> 
> I added this line:
> 
> noto:ALL:*.domain.com.au:ALL
> noto:*.domain.com.au:ALL:ALL
> 
> Then I ran /sbin/e-smith/expand-template /etc/smtpd_check_rules

/sbin/e-smith/expand-template is there for testing. See above for the
real filename.

Use /sbin/e-smith/signal-event console-save, but more importantly, you
need to get the filename correct first.
 
> Problem is...it still allows amil from that domain to be sent
> to the box. Am I doing this correctly? 

See above - just a single/two line fragment in the correct order.

> Do I need to stop or restart qmail? 

No.

> Am I editing the right file the right way?

No - you should build a small fragment for your changes and you need the
correct filename (in the chroot() jail).

Gordon


----------------------------------------------------------------
Sent using Phorum software <http://phorum.org> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
NOTE: Postings are not allowed to the list - please use the bulletin boards


----- End forwarded message -----
  Gordon Rowell                         [EMAIL PROTECTED]
  http://www.e-smith.org (development)  http://www.e-smith.com (corporate)
  Phone: +1 (613) 564 8000 ext. 4378    Fax: +1 (613) 564 7739
  e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

Reply via email to