Attached is a handy script to allow you to add ip ranges to your access.db file:
in /etc/mail/access put '192.168.0/24 ERROR:550 "You suck spammer scum"' to block the entire subnet, etc.
You can add the file to the Makefile in /etc/mail to have it do the right thing there too.
Joseph
Turnpike Man wrote:
ya... oops... > ... so "make" will take care of any changes... whether it be sendmail.mc, mailertable, or any other config change... no need to run the m4 for sendmail.mc or makemap hash for mailertable, etc.?
If that is the case, sounds good to me.. much easier than remembering all kinds of different ways for each thing!
David M.
--- Joseph Tate <[EMAIL PROTECTED]> wrote:
NOT < !!!!!
Use >
You should have a Makefile in /etc/mail. Just type "make" and it will "do the right thing"
Turnpike Man wrote:
ok ok... so the aol thing doesn't go in sendmail.cf... I got behind...
after adding that to the file (which it appears will be my first entry to
that
file, I do this??
makemap hash /etc/mail/mailertable < /etc/mail/mailertable
and that should update the mailtable database?
weee... learning is happening!
David M.
--- Jon Carnes <[EMAIL PROTECTED]> wrote:
On Fri, 2003-03-28 at 19:30, Jason White wrote:
The simple solutions are to relay through RR's smtp server or to pony up for a static IP. I was wondering if I could set up my MTA to relay through RR only mail being set to AOL? I'm using sendmail now, but I'm not married to it. Also, I know some people have RR with a static IP, what's the charge for the static address? I may go that route for other reasons.
Relying all mail destined for aol.com is really easy with qmail, which is my MTA. Just add the following line to /var/qmail/control/smtproutes:
aol.com:smtp-server.nc.rr.com
I just added it, and I no longer get the bounces from aol.
HTH, Jason
In Sendmail, edit /etc/mail/mailertable: aol.com smtp:smtp-server.nc.rr.com
http://www.sendmail.org/m4/mailertables.html
Good Luck - Jon Carnes
_______________________________________________ TriLUG mailing list http://www.trilug.org/mailman/listinfo/trilug TriLUG Organizational FAQ: http://www.trilug.org/~lovelace/faq/TriLUG-faq.html
__________________________________________________ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com _______________________________________________ TriLUG mailing list http://www.trilug.org/mailman/listinfo/trilug TriLUG Organizational FAQ: http://www.trilug.org/~lovelace/faq/TriLUG-faq.html
_______________________________________________ TriLUG mailing list http://www.trilug.org/mailman/listinfo/trilug TriLUG Organizational FAQ: http://www.trilug.org/~lovelace/faq/TriLUG-faq.html
__________________________________________________ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com _______________________________________________ TriLUG mailing list http://www.trilug.org/mailman/listinfo/trilug TriLUG Organizational FAQ: http://www.trilug.org/~lovelace/faq/TriLUG-faq.html
#!/bin/sh
DBDIR=/etc/mail
DBSRC=/etc/mail
DBTYPE=hash
PATH=/bin:/sbin:/usr/bin:/usr/sbin
export PATH
# convert_subnets()
# convert mask/bits format into "subnet"-IPs
# unused bits in mask must be 0
# e.g. 128.1.1.1/1 does not work. Use 128.0.0.0/1
convert_subnets () {
awk '
/^[0-9].*\/[0-9]+/ {
split($1, subs, "/")
ipbase = ""
i = 1
split(subs[1], byte, ".")
for(bits = subs[2]; bits > 8; bits -= 8)
ipbase = ipbase byte[i++] "."
if(bits == 8)
print ipbase byte[i]
else
for(ii = 0; ii < 2**(8 - bits); ii++)
{
$1 = ipbase (ii + byte[i])
print
}
next
}
{ print }'
};
# add_default_rhs
# adds RHS "REJECT" if there is none
add_default_rhs () {
awk '
{
if($1 != "" && $2 == "")
print $1, "REJECT"
else
print
}'
};
# add_special_rhs
add_special_rhs () {
awk '
{
if($1 != "" && $2 == "")
print $1, "\"552 spam rejected. In case of error contact the
postmaster.\""
else
print
}'
};
# make access.db
cat $DBSRC/access | \
convert_subnets | \
add_default_rhs | \
makemap -r $DBTYPE $DBDIR/access
