[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cobalt-users] sendmail configuration using m4 on a Cobalt RaQ3 (long)
- Subject: [cobalt-users] sendmail configuration using m4 on a Cobalt RaQ3 (long)
- From: Charlie Summers <charlie@xxxxxxxxxx>
- Date: Sun Aug 5 08:59:05 2001
- List-id: Mailing list for users to share thoughts on Cobalt products. <cobalt-users.list.cobalt.com>
Folks;
Gee, could I have stuffed any more keywords in the subject? ;)
Seriously, since this is more for the archives than anything else, you can
probably ignore this unless you are interested in reworking your sendmail
configuration. Hopefully, if you have a RaQ3, and you want to change sendmail
later, you'll be able to retrieve it from the archives.
First off, please remember that following these instructions will,
according to Cobalt/Sun, void your warranty, cause boils and possibly plagues
of locusts, and will likely confuse the heck out of the tech support poeple
who only know the GIU (and not all that well, from what I've been told). If
you do this, your machine will no longer act in a way predictable to tech
support, and I'm sure the tech guy who said you should never change your root
password to make it different from the admin password would have a coronary
and need to be carried out of his cubicle if he were to see this...
If I haven't frightened you sufficiently, and you _still_ want to set up
sendmail your own way using perhaps "blacklist_recipients" to permit using a
catch-all yet still allow you to reject for closed accounts, or "rbl" to tie
into relays.ordb.org or orbz.org to cut down on relayed spam, read on.
However, please...if you aren't comfortable working as root, if you aren't
used to editing config files, if you are nervous about screwing with your
mail system, PLEASE find someone who is to do this for you. Also remember
that this applies to the RaQ3 ONLY; the RaQ4 has cobalt.mc instead, and I
assume the Qubes would be different still, so if you're planning on just
copy/pasting the lines, you'd better have a RaQ3. (And since I've gotten in
trouble before, make sure that if there is ANYTHING YOU DON'T UNDERSTAND, YOU
ASK FIRST. I am intentionally not combining commands here on a single line,
just to be safe. ;)
Ready to play? Cool! After SSHing into the machine (you DO have telnet
shut down, right?), we:
cd /usr/lib/sendmail-cf (change directory to mc home)
su (you're going to be su/god from now on,
so BE CAREFUL!)
cp redhat.mc redhat.mc_orig (backup the original redhat.mc file)
Now modify your redhat.mc to taste; note that I probably wouldn't remove
anything from here unless you _really_ know what you're doing, it should be
completely safe to add additional features. I've successfully added rbl and
blacklist_recipients, among others. Note that the RaQ3 does NOT contain
dnsbl.m4, so you'll need to use rbl instead.
And if you don't know how to edit the mc file, PLEASE read the information
available at www.sendmail.org - I can't tell you exactly how to edit your
file, since I don't know how you want to set up your sendmail. I can tell you
that to start I added these lines in the "# features" section before the
"divert (-1)" line:
FEATURE(blacklist_recipients)dnl
FEATURE(`rbl', `relays.ordb.org', `Rejected - see http://ordb.org/')dnl
...but since I can't stop tinkering, I've mucked with some other stuff
since then. Make SURE you examine the docs at sendmail.org...those "dnl" bits
ain't optional, kiddies. (And feel free to add comments to the top of the
redhat.mc file to note the date and changes; some day months from now you
might need to know what you did in there. But leave in Duncan Laurie's name,
just for the heck of it. ;)
Anywho, now that your redhat.mc file has been edited to taste:
m4 m4/cf.m4 redhat.mc >new_sendmail.cf
...to create a file named new_sendmail.cf. Why not sendmail.cf? Just wait
a sec, we'll get to that.
IF you have POP-BEFORE-SMTP installed:
I know you _should_ probably uninstall and reinstall this package after
the changes are made, but after reading
RaQ3-en-System-4.0.7-9229-4.0.7-9229.uninst I can tell you that there is such
a glaring error in the uninstall script (more Maxwell Smart than James Bond,
kids) that there almost HAVE to be more, which may or may not cause problems
down the road. I decided in the interest of not screwing anything up, it
would make more sense to manually edit the new sendmail.cf file to add the
pieces required instead of taking the chance that a bad uninstall would make
a mess of a reinstall. Your mileage may vary...close cover before striking.
There are two places in the new new_sendmail.cf file you need to rework to
match the original sendmail.cf; the first is immediately after ther "Access
list database (for spam stomping)" section, the second is within the
"check_rcpt -- check SMTP `RCPT TO:' command argument" section; compare
/etc/sendmail.cf and /usr/lib/sendmail-cf/new_sendmail.cf and manually add to
new_sendmail.cf the appropriate sections. (I was lazy and copy/pasted.)
Also remember that using a new sendmail.cf will muck with your
MaxMessageSize as set in the GUI; if you want to be a completest, do a search
on MaxMessageSize and change the value here to the one in the sendmail.cf
file which is the one you set in the GUI. (The GUI will still be somewhat
confused about it, and may show a blank box there. I haven't had the courage
to screw with it in the GUI, fearing it may overwrite all the other changes.
"Secret sauce" or "secret slime," depends on whether what happens is
something you want. ;)
Now we:
cd /etc (Change to sendmail.cf
location)
mv sendmail.cf sendmail.cf_beforem4 (backup sendmail.cf)
cp /usr/lib/sendmail-cf/new_sendmail.cf sendmail.cf (bring in new
sendmail.cf)
/etc/rc.d/init.d/sendmail restart (stop/start sendmail)
You should see:
Shutting down Mail Service: sendmail ok
Setting up Mail Service: sendmail
...if you don't, stop sendmail (/etc/rc.d/init.d/sendmail stop), wait a
few moments, and start it (/etc/rc.d/init.d/sendmail start) instead...I had
problems with SMTP not coming back up using the sleep 5 in restart, and
having to stop/start. He, he...I suppose I _could_ have used the interface,
but since we're already here...
Now IMMEDIATELY CHECK TO MAKE SURE SMTP IS WORKING CORRECTLY! No,
really...send some mail through your server, or at least attempt a telnet
connection on port 25. If it isn't, you can easily:
cd /etc (redundant, I know)
mv sendmail.cf sendmail.cf_problem (move out the problem child)
mv sendmail.cf_beforem4 sendmail.cf (move in the one we know works)
/etc/rc.d/init.d/sendmail restart (or stop/start)
...to revert to your previous configuration. But if it ain't running, and you
_don't_ check it, you're really gonna hate yourself in the morning.
If everything IS working fine, you might consider backing up the
sendmail.cf so that if the GUI stomps on it, you can get it back quickly; I
use the date as part of my backup files, so if I were backing it up today,
I'd do:
cd /etc
cp sendmail.cf sendmail.cf_20010805
...but you can' of course, use whatever naming scheme makes sense to you.
To understand all the cool things that sendmail can do, spend some time
running through the configuration area at sendmail.org.
Charlie
----------------------------------------------------------------------
L.O.F. Communications sales@xxxxxxxxxx
Check out the Katester: http://www.lofcom.com/personal/peanut.html
http://www.lofcom.com/