|
Warning: this is an htmlized version!
The original is here, and the conversion rules are here. |
######
#
# E-scripts on exim.
#
# Note 1: use the eev command (defined in eev.el) and the
# ee alias (in my .zshrc) to execute parts of this file.
# Executing this file as a whole makes no sense.
# An introduction to eev can be found here:
#
# (find-eev-quick-intro)
# http://angg.twu.net/eev-intros/find-eev-quick-intro.html
#
# Note 2: be VERY careful and make sure you understand what
# you're doing.
#
# Note 3: If you use a shell other than zsh things like |&
# and the for loops may not work.
#
# Note 4: I always run as root.
#
# Note 5: some parts are too old and don't work anymore. Some
# never worked.
#
# Note 6: the definitions for the find-xxxfile commands are on my
# .emacs.
#
# Note 7: if you see a strange command check my .zshrc -- it may
# be defined there as a function or an alias.
#
# Note 8: the sections without dates are always older than the
# sections with dates.
#
# This file is at <http://angg.twu.net/e/exim.e>
# or at <http://angg.twu.net/e/exim.e.html>.
# See also <http://angg.twu.net/emacs.html>,
# <http://angg.twu.net/.emacs[.html]>,
# <http://angg.twu.net/.zshrc[.html]>,
# <http://angg.twu.net/escripts.html>,
# and <http://angg.twu.net/>.
#
#######
#####
#
# Which version of exim is installed?
#
#####
grep-status -P exim
apti exim exim-doc
#####
#
# exim
# 2002sep16
#
#####
# (find-status "exim")
# (find-status "exim-doc")
# (find-vldifile "exim.list")
# (find-vldifile "exim-doc.list")
# (find-fline "/usr/doc/exim/")
# (find-fline "/usr/doc/exim-doc/")
# (find-vldifile "exim.preinst")
# (find-vldifile "exim.postinst")
# (find-vldifile "exim.prerm")
# (find-vldifile "exim.postrm")
# (find-vldifile "exim.conffiles")
# (find-fline "/etc/email-addresses")
# (find-fline "/usr/doc/exim/exim-uucp.texinfo.gz")
# (find-fline "/usr/doc/exim/filter.txt.gz")
# (find-fline "/usr/doc/exim/README.UPDATING.gz")
# (find-fline "/usr/doc/exim/README.Y2K.gz")
# (find-fline "/usr/doc/exim/README.Debian.gz")
# (find-fline "/usr/doc/exim/example.conf.gz")
# (find-fline "/usr/doc/exim/mails.gz")
# (find-fline "/usr/doc/exim/spec.txt.gz")
# (find-fline "/usr/doc/exim/copyright")
# (find-fline "/usr/doc/exim/changelog.gz")
# (find-fline "/usr/doc/exim/oview.txt.gz")
# (find-fline "/usr/doc/exim/dbm.discuss.txt.gz")
# (find-fline "/usr/doc/exim/NewStuff.gz")
# (find-fline "/usr/doc/exim/README.gz")
# (find-fline "/usr/doc/exim/README.IPV6.gz")
# (find-fline "/usr/doc/exim/changelog.Debian.gz")
# (find-fline "/etc/cron.daily/exim")
# (find-fline "/etc/cron.d/exim")
# (find-fline "/etc/ppp/ip-up.d/exim")
#Scripts:
# (find-fline "/usr/sbin/eximconfig")
# (find-fline "/usr/sbin/exinext")
# (find-fline "/usr/sbin/exiwhat")
# (find-fline "/usr/sbin/exicyclog")
# (find-fline "/usr/sbin/exigrep")
# (find-fline "/usr/sbin/eximstats")
# (find-fline "/usr/sbin/exiqsumm")
# (find-fline "/usr/sbin/exim-upgrade-to-r3")
# (find-fline "/usr/bin/newaliases")
#These are the same page:
# (find-man "8 exim")
# (find-man "8 mailq")
# (find-man "8 rmail")
# (find-man "8 rsmtp")
# (find-man "8 runq")
# (find-man "8 sendmail")
#Four identical pages about the hints database:
# (find-man "8 exim_db")
# (find-man "8 exim_dumpdb")
# (find-man "8 exim_fixdb")
# (find-man "8 exim_tidydb")
#About building the hints database:
# (find-man "8 exim_dbmbuild")
# (find-man "8 newaliases")
#I don't understand these well enough...
# (find-man "8 exigrep")
# (find-man "8 eximstats")
# (find-man "8 exinext")
# (find-man "8 exiqsumm")
# (find-man "8 exicyclog")
# (find-man "8 exiwhat")
#About flushing the queue and freezing and thawing messages
# (find-fline "/etc/cron.d/exim")
# (find-fline "/etc/ppp/ip-up.d/exim")
# (find-man "8 exim" "-qf")
# (find-man "8 exim" "-Mf")
# (find-man "8 exim" "-Mt")
#####
#
# Removing messages from the queue
# 2003mar08
#
#####
# (find-fline "/usr/doc/exim/spec.txt.gz" "\"remove message\"")
# (find-man "8 exim" "-Mrm")
mailq
mailq | awk '{if ($3) print $3}'
exim -Mrm $(mailq | awk '{if ($3) print $3}')
#####
#
# exim-doc
# 2002sep16
#
#####
# (find-status "exim-doc")
# (find-vldifile "exim-doc.list")
# (find-fline "/usr/doc/exim-doc/")
# (find-node "(exim)Top")
# (find-node "(exim)Database maintenance")
# (find-node "(exim)Intermittently connected hosts")
# (find-node "(exim)Format of spool files")
#####
#
# opening exim without installing it
#
#
#####
debtartvzf $POTATO/main/binary-i386/mail/exim_3.12-6.deb
(D=`date +%T`; echo $D | mail -s $D edrx@mat.puc-rio.br)
#####
#
# how dpkg configures packages (exim)
#
#####
# (find-es "debian" "smail_config")
# (find-man "dpkg" "dpkg --configure package")
# (find-vldifile "" "exim")
# (find-vldifile "exim.list")
# (find-fline "/usr/doc/exim/")
# (find-vldifile "exim.conffiles")
# (find-vldifile "exim.preinst")
# (find-vldifile "exim.postinst")
# (find-vldifile "exim.prerm")
# (find-vldifile "exim.postrm")
# (find-fline "/usr/doc/exim/example.conf.gz")
#####
#
# exim and local mail
# 2000jun08
#
#####
# (find-fline "/etc/exim.conf")
# (find-fline "/etc/exim.conf" "local_domains =")
# (find-fline "/etc/exim.conf" "never_users =")
# (find-fline "/etc/exim.conf" "host_lookup =")
# (find-man "exim" "Domains required")
# (find-fline "/etc/init.d/exim")
# (find-fline "/usr/doc/exim/spec.txt.gz" " 3. HOW EXIM DELIVERS MAIL")
# (find-fline "/usr/doc/exim/spec.txt.gz" "| local_domains |")
# (find-fline "/usr/doc/exim/spec.txt.gz" "domainless addresses")
# (find-fline "/usr/doc/exim/spec.txt.gz" "\n3.5 Delivery in detail")
# (find-fline "/usr/sbin/eximconfig")
# (find-fline "/usr/sbin/eximconfig" "by editing /etc/aliases.")
# (find-fline "/etc/aliases")
# Oops - it seems that mail that should be delivered locally is
# getting lost! Remote mail (to mat.puc-rio.br) went OK after some
# "exim -qff"s.
# It is a good idea to configure exim in a "permanent connection" mode
# at first, test it with the dial-up link on, and fix some details
# later.
/etc/init.d/exim restart
# Tests:
(D=`date +%T`; echo $D | mail -s $D edrx)
(D=`date +%T`; echo $D | mail -s $D edrx@localhost)
(D=`date +%T`; echo $D | mail -s $D edrx@inx.com.br)
(D=`date +%T`; echo $D | mail -s $D edrx@mat.puc-rio.br)
(D=`date +%T`; echo $D | mail -s $D edrx@twu.net)
sleep 1
find /var/spool/
# (find-fline "/o/etc/smail/")
# (find-fline "/etc/smail/")
# (find-fline "/etc/smail/config")
# (find-vldifile "deliver.list")
# (find-fline "/usr/doc/deliver/")
# (find-vldifile "" "deliver")
mail -s `date +%T` edrx@inx.com.br <<'---'
blaaa
---
date +%T | mail -s `date +%T` edrx@mat.puc-rio.br
#####
#
# my exim configuration on potato (that is not working at all)
# 2000apr09
#
#####
# «exim_conf_potato»
# (find-vldifile "exim.list")
# (find-fline "/usr/doc/exim/")
/usr/sbin/eximconfig
# (2) Internet site using smarthost
# `visible' mail name of your system: inx.com.br
# other names which may appear on incoming mail messages: angg angg.popolvuh
# domains you want to relay mail for: none
# networks of local machines you want to relay mail for: none
# use the RBL: no
# machine that will act as the smarthost and handle outgoing mail:
# mail.inx.com.br
# Which user account(s) should system administrator mail go to: none
# You already have an /etc/aliases file. Do you want to replace this with
# a new one? y
# (find-fline "/etc/aliases")
(D=`date +%T`; echo $D; echo $D | mail -s $D edrx)
(D=`date +%T`; echo $D; echo $D | mail -s $D edrx@localhost)
(D=`date +%T`; echo $D; echo $D | mail -s $D edrx@angg)
(D=`date +%T`; echo $D; echo $D | mail -s $D edrx@angg.popolvuh)
(D=`date +%T`; echo $D; echo $D | mail -s $D root)
(D=`date +%T`; echo $D; echo $D | mail -s $D root@localhost)
(D=`date +%T`; echo $D; echo $D | mail -s $D root@angg)
(D=`date +%T`; echo $D; echo $D | mail -s $D root@angg.popolvuh)
(D=`date +%T`; echo $D; echo $D | mail -s $D edrx@inx.com.br)
(D=`date +%T`; echo $D; echo $D | mail -s $D edrx@mat.puc-rio.br)
(D=`date +%T`; echo $D; echo $D | mail -s $D edrx@twu.net)
#####
#
# from smail to exim and back (on potato)
# 2000apr09
#
#####
# «smail_to_exim_and_back»
# (find-man "dpkg" "--force-things")
# (find-fline "/var/lib/dpkg/status" "smail")
# (find-fline "/var/lib/dpkg/status" "Package: exim")
# (find-fline "/var/lib/dpkg/status" "Package: smail")
# smail -> exim
#
dpkg --force-depends -r smail
dpkg -i $SDEBIAN/dists/potato/main/binary-i386/mail/exim_3.12-7.deb
# (find-fline "/etc/")
# (find-fline "/etc/init.d/exim")
/etc/init.d/exim restart
# exim -> smail
#
dpkg --force-depends -r exim
dpkg -i /big/potato/dists/potato/main/binary-i386/mail/smail_3.2.0.102-2.deb
/etc/init.d/inetd restart
/etc/init.d/smail restart
#####
#
# testing the delivery of local mail
# 2000apr09
#
#####
# «local_mail_test»
# (find-es "debian" "smail_config")
(D=`date +%T`; echo $D | mail -s $D edrx)
(D=`date +%T`; echo $D | mail -s $D edrx@angg)
(D=`date +%T`; echo $D | mail -s $D edrx@localhost)
(D=`date +%T`; echo $D | mail -s $D edrx@inx.com.br)
(D=`date +%T`; echo $D | mail -s $D edrx@mat.puc-rio.br)
(D=`date +%T`; echo $D | mail -s $D edrx@twu.net)
# or root instead of edrx...
strace -f -o ~/s -p $(pidof inetd)
# (find-fline "/var/log/")
# (find-fline "/var/log/syslog")
cd /var/log/
agrep -i exim *
#####
#
# how exim installs itself
# 2000apr09
#
#####
# «how_exim_installs_itself»
# (find-vldifile "exim.list")
# (find-vldifile "exim.postinst")
# (find-vldifile "exim.postrm")
# (find-vldifile "exim.preinst")
# (find-vldifile "exim.prerm")
# (find-vldifile "" "exim")
# (find-fline "/usr/doc/exim/")
Pgrepp m/suidmanager/
suidmanager
# (find-man "update-inetd")
# (find-fline "/usr/sbin/update-inetd")
# (find-man "update-rc.d")
# (find-fline "/usr/sbin/update-rc.d")
# (find-fline "/etc/inetd.conf" "smtp")
# (find-man "inetd.conf")
# (find-man "inetd")
# (find-fline "/etc/init.d/inetd")
/etc/init.d/inetd restart
#####
#
# "host" is not working...
# 2000apr09
#
#####
# «host_and_resolv.conf»
ping localhost
ping angg
host localhost
LOCALDOMAIN= \
strace-to ~/s \
host localhost
# (find-man "host" "CUSTOMIZING HOST NAME LOOKUP")
# (find-fline "/etc/resolv.conf")
# Local Variables:
# coding: utf-8-unix
# End: