[TriLUG] AOL's new email policy

Jon Carnes jonc at nc.rr.com
Sun Mar 30 00:47:54 EST 2003


This link might help clear up a few Sendmail specifics for you:
  http://www.trilug.org/~jonc/mailserver

/etc/mail/sendmail.cf is the sendmail configuration file.  All the other
files in the directory (and /etc/aliases) are just references inside of
sendmail.cf.

The sendmail.cf file uses certain hash tables to handle specific mail
circumstances.  This lets you change the way that Sendmail operates
without having to stop/start it.  

Human beings can't write hash tables (well most can't).  So you write a
text file and then have that text file converted into a hash table
(which over-writes the older one).  Typing "make" while in the
/etc/mail/.. directory rebuilds the hash tables from the text files.

If you have the "strings" command loaded, you can look at the hash
tables and see that they are simple representations of the text files.

Sendmail.cf is *not* converted into a hash table.  When Sendmail loads,
it reads the configuration file and caches it in memory.  So if you make
a change in the sendmail.cf directly, then you must stop Sendmail
completely and then restart it. 

Hope that makes things more clear - but probably not!

Jon 

On Sat, 2003-03-29 at 23:16, Joseph Tate wrote:
> My makefile won't make sendmail.cf, but yes, it does everything else.
> 
> 
> 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 <jtate at dragonstrider.com> 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 <jonc at nc.rr.com> 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
> 




More information about the TriLUG mailing list