# # /usr/src/sendmail-8.9.1.log/havedone.txt # # "elijah" is my site and host-name. You can search-replace it # in this file into your hostname before applying this in your # environment. Please note that I have bind-8.1.2 installed # under /usr/bind, and that this sendmail compile is linked to # that bind. If you are using an older version of bind, or the # OS-builtin, you must omit some details from the below, like # you must comment out all lines mentioning /usr/bind using # "dnl" when creating the BuildTools/Site/elijah.m4 file. # # If you compile elsewhere than under /usr/src, it is a good # idea to search-replace /usr/src into your location in the # below before applying! You may have other needs. Most lines # in the below elijah.m4 (replace that with your name!) is # commented out using "dnl". If you need them in, remove the # "dnl " in front, read the sendmail documentation and take # whatever extra steps that needs to be taken in order to make # use of the functionality. Hint: http://www.sendmail.org # # Search-replace "swip.net" into your domain-name. # # Finally, search-replace "leif" into your own account under # which you compile stuff -- I have "leif:adm" own /usr/src, # /usr/local/src and even /usr/local/bin, /usr/local/man, etc. # # Beginning with sendmail-8.10, sendmail will use # /etc/mail/sendmail.cf. I will use it already from -8.9.1, # using -D_PATH_SENDMAILCF, see "elijah.m4" in BuildTools/Site: # # As leif:adm su - # As root:root rm /usr/lib/libdb.so exit # As leif:adm mkdir -p /usr/src/sendmail-8.9.1.log /usr/doc/sendmail/op cd /usr/src tar -zxvf /pub/apps/sendmail.8.9.1.tar.gz rm -rf /usr/doc/sendmail/op/* cp -p /usr/src/sendmail-8.9.1/doc/op/* /usr/doc/sendmail/op emacs -nw /usr/src/sendmail-8.9.1.log/havedone.txt # this file, # added above stuff, and continuing to add everything I do, see # below, while working in a different window: # # This step adds the sendmail.8.9.1a.patch, in order to protect # MS and other buggy mailclients from the MIME header attack: cd /usr/src/sendmail-8.9.1/src patch -p0 < /pub/apps/sendmail.8.9.1a.patch 2>&1 | \ tee /usr/src/sendmail-8.9.1.log/LEGE-sendmail.8.9.1a.patch.log # (Please see http://www.sendmail.com/sendmail.8.9.1a.html or # ftp://ftp.sendmail.org/pub/sendmail/sendmail.8.9.1a.patch.README for # important information about this patch, including the necessary # steps to install and activate it.) # less -r /usr/src/sendmail-8.9.1/BuildTools/README cd /usr/src/sendmail-8.9.1/BuildTools/Site ##emacs -nw elijah.m4 ## in the below, the "\" are just so the cat works: cat > elijah.m4 <&1 | \ tee /usr/src/sendmail-8.9.1.log/LEGE-Build-f-elijah.log su - # As root:root mkdir -p /etc/mail; chgrp adm /etc/mail; chmod 755 /etc/mail cp -p /usr/src/sendmail-8.9.1/src/sendmail.hf /etc/mail/sendmail.hf cd /usr/src/sendmail-8.9.1/src/obj.Linux.2.0.35.i486 rm -f /usr/man/man5/aliases.5 \ /usr/man/man1/mailq.1 \ /usr/man/man1/newaliases.1 \ /usr/man/man8/sendmail.8 rm -f /usr/man/preformat/cat5/aliases.5.gz \ /usr/man/preformat/cat1/mailq.1.gz \ /usr/man/preformat/cat1/newaliases.1.gz \ /usr/man/preformat/cat8/sendmail.8.gz cp -p aliases.5 /usr/man/man5/aliases.5 cp -p mailq.1 /usr/man/man1/mailq.1 cp -p newaliases.1 /usr/man/man1/newaliases.1 cp -p sendmail.8 /usr/man/man8/sendmail.8 gzip -9 < aliases.0 > /usr/man/preformat/cat5/aliases.5.gz chown leif:adm /usr/man/preformat/cat5/aliases.5.gz gzip -9 < mailq.0 > /usr/man/preformat/cat1/mailq.1.gz chown leif:adm /usr/man/preformat/cat1/mailq.1.gz gzip -9 < newaliases.0 > /usr/man/preformat/cat1/newaliases.1.gz chown leif:adm /usr/man/preformat/cat1/newaliases.1.gz gzip -9 < sendmail.0 > /usr/man/preformat/cat8/sendmail.8.gz chown leif:adm /usr/man/preformat/cat8/sendmail.8.gz ls -lrt /usr/man/man5/aliases.5 \ /usr/man/man1/mailq.1 \ /usr/man/man1/newaliases.1 \ /usr/man/man8/sendmail.8 \ /usr/man/preformat/cat5/aliases.5.gz \ /usr/man/preformat/cat1/mailq.1.gz \ /usr/man/preformat/cat1/newaliases.1.gz \ /usr/man/preformat/cat8/sendmail.8.gz strip sendmail chown root:root sendmail chmod 6555 sendmail kill `ps -aux | grep sendmail | grep -v grep | awk -F' ' '{print $2;}'` cp -p sendmail /usr/sbin/sendmail cd /usr/src/sendmail-8.9.1/src/obj.Linux.2.0.35.i486 exit # As leif:adm cat > /usr/local/bin/op <&1 | tee \ /usr/local/src/xaliases-2.1/LEGE-make-xalparse.log strip xalparse su - # As root:root cd /usr/local/src/xalparse-1.4/ida/aux make install 2>&1 | tee \ /usr/local/src/xaliases-2.1/LEGE-make-install-xalparse.log chown leif:adm /usr/local/bin/xalparse && \ chmod 775 /usr/local/bin/xalparse chown leif:adm /usr/local/src/xaliases-2.1/LEGE-make-install-xalparse.log cd /usr/local/src rm -rf /usr/local/src/xalparse-1.4 cd /usr/local/src/xaliases-2.1 cp -p xaliases /usr/local/bin/xaliases cd /usr/bin ln -s /usr/local/bin/xaliases . mkdir -p /etc/mail && chmod 755 /etc/mail cp -p /usr/local/src/xaliases-2.1/etc/mail/* /etc/mail exit # As leif:adm cd /usr/local/src mv xaliases-2.1 xaliases-2.1.log # Save these installation notes as # /usr/local/src/xaliases-2.1.log/havedone.txt # As leif:adm cd /usr/src/sendmail-8.9.1/makemap Build -c -f /usr/src/sendmail-8.9.1/BuildTools/Site/elijah.m4 2>&1 | \ tee /usr/src/sendmail-8.9.1.log/LEGE-Build-f-elijah-makemap.log cd /usr/src/sendmail-8.9.1/makemap/obj.Linux.2.0.35.i486 ls -ld makemap && strip makemap && ls -ld makemap su - # As root:root (cd /usr/bin && rm -f /usr/bin/makemap && ln -s /usr/sbin/makemap .) cp -p /usr/src/sendmail-8.9.1/makemap/obj.Linux.2.0.35.i486/makemap \ /usr/sbin/makemap cd /usr/src/sendmail-8.9.1/makemap/obj.Linux.2.0.35.i486 cp -p makemap.0 /usr/man/cat8/makemap.8 (cd /usr/man/cat8 && ln -s makemap.8 makemap.1m) cp -p makemap.8 /usr/man/man8/makemap.8 (cd /usr/man/man8 && ln -s makemap.8 makemap.1m) exit # As leif:adm cd /usr/src/sendmail-8.9.1/praliases sed -e 's%/etc/aliases%/etc/mail/aliases%g' < praliases.c > \ praliases.c.LEGE && mv praliases.c praliases.c.orig \ && mv praliases.c.LEGE praliases.c && \ diff -c praliases.c.orig praliases.c > \ /usr/src/sendmail-8.9.1.log/LEGE-praliases.c.patch # # The above fixed the problem and saved a patch file that could # later be reapplied to a fresh source using e.g. # patch -p0 < /usr/src/sendmail-8.9.1.log/LEGE-praliases.c.patch # Build -c -f /usr/src/sendmail-8.9.1/BuildTools/Site/elijah.m4 2>&1 | \ tee /usr/src/sendmail-8.9.1.log/LEGE-Build-f-elijah-praliases.log cd /usr/src/sendmail-8.9.1/praliases/obj.Linux.2.0.35.i486 ls -ld praliases && strip praliases && ls -ld praliases su - # As root:root (cd /usr/bin && rm -f /usr/bin/praliases && ln -s /usr/sbin/praliases .) cp -p /usr/src/sendmail-8.9.1/praliases/obj.Linux.2.0.35.i486/praliases \ /usr/sbin/praliases cd /usr/src/sendmail-8.9.1/praliases/obj.Linux.2.0.35.i486 cp -p praliases.0 /usr/man/cat8/praliases.8 (cd /usr/man/cat8 && ln -s praliases.8 praliases.1m) cp -p praliases.8 /usr/man/man8/praliases.8 (cd /usr/man/man8 && ln -s praliases.8 praliases.1m) exit # As leif:adm cd /usr/src/sendmail-8.9.1/smrsh/ Build -c -f /usr/src/sendmail-8.9.1/BuildTools/Site/elijah.m4 2>&1 | \ tee /usr/src/sendmail-8.9.1.log/LEGE-Build-f-elijah-smrsh.log cd /usr/src/sendmail-8.9.1/smrsh/obj.Linux.2.0.35.i486 ls -ld smrsh && strip smrsh && ls -ld smrsh su - # As root:root cp -p /usr/src/sendmail-8.9.1/smrsh/obj.Linux.2.0.35.i486/smrsh \ /usr/sbin/smrsh cp -p smrsh.0 /usr/man/cat8/smrsh.8 (cd /usr/man/cat8 && ln -s smrsh.8 smrsh.1m) cp -p smrsh.8 /usr/man/man8/smrsh.8 (cd /usr/man/man8 && ln -s smrsh.8 smrsh.1m) cd /usr/src/sendmail-8.9.1/smrsh/obj.Linux.2.0.35.i486 # # As root:root chmod g-w /etc/mail # procmail doesn't need it... cd /usr/src/sendmail-8.9.1/cf # (I often use /usr/site/mail/cf-8.9.1 instead of sendmail-8.9.1/cf) bzip -d < /pub/apps/sendmail-8.9.1-cf-cpio-idcmu.bz2 | cpio -idcmu cd /usr/src/sendmail-8.9.1/cf/cf # Here I have already created elijah.smtp.mc, make_elijah and # the many other neccessary files, so... cp -p elijah.smtp.cf /etc/mail/sendmail.cf # ### YOU, on the other hand, will need to edit your own # ### configuration files -- OR manually edit # ### the /etc/mail/sendmail.cf I "cooked": chmod g-w /etc/mail/sendmail.cf cat > /etc/mail/sendmail.cw <