> -----Original Message----- > From: David Kramer > Sent: Monday, November 25, 2002 8:17 AM > Subject: Problem with sendmail and /etc/mail/access/access not working > > > I'm using Red Hat 7.3, and I'm having an anti-spam issue. > > I keep getting emails from direct4optin.com. I have their > upstream IP block listed in my /etc/mail/access file, but > they still keep getting through. > > In /etc/mail/access, I have: > # PG & C Leasing, INC 209.236.0.0-209.236.63.255 > direct4optin.com and siblings > 209.236.0.0/16 ERROR:"550 We don't accept > mail from spammers"
Although I have never tried using a netmask in my access file, I believe the correct access map syntax for network addresses is... 209.236 ERROR:"550.... At least that's what it shows in cf/README [stuff deleted...] > > ***ALSO*** > > I noticed on http://www.sendmail.org/m4/anti_spam.html that > you can have sendmail reject on arbitrary headers. It says > you put something like this in sendmail.cf: > LOCAL_RULESETS > HMessage-Id: $>CheckMessageId > > SCheckMessageId > R< $+ @ $+ > $@ OK > R$* $#error $: 553 Header Error > > To date, I've been able to do everything in my M4 file > though, and I would hate to have to modify my sendmail.cf > file for this one feature. Is there a way to do this in > the sendmail M4 file? You would add your rule as a LOCAL_RULESET in your .mc file... For example: In my .mc file, I added a rule that only allows ETRN's from known mail servers. i.e. My mail server is listed as a backup MX. I only want the primary MX issuing an ETRN to release queued mail. So... At the end of my .mc file I added LOCAL_RULESETS Scheck_etrn R$* $: $(access ETRN:$&{client_addr} $: NO $) ROK $@ OK R$* $#error $@ 5.7.1 $: "550 Access denied" Note: You need TABS (not spaces) between the R$* stuff and the right half (action). ...and then in /etc/mail/access I have a line like... ETRN:a.b.c.d OK Where a.b.c.d is the ip address of the primary MX issuing the ETRN. You should be able to follow the above example to do the same thing using your rule set. Good Luck Steve Cowles -- redhat-list mailing list unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe https://listman.redhat.com/mailman/listinfo/redhat-list