Confused

Richard Ibbotson richard at SHEFLUG.CO.UK
Sat May 10 11:48:29 IST 2003


Hi

I'm a bit confused by first time configuration of MailScanner on my
own SuSE 8.2 workstation.  Thought I'd ask a couple of questions.
Using Postfix and SpadderAssassin....


http://www.sng.ecs.soton.ac.uk/mailscanner/install/postfix.shtml

>Make sure you have the chroot jail set up in /var/spool/postfix. You
>should be able to see "etc", "usr" and "lib" directories inside
>/var/spool/postfix).

No I can't.  I can see....

active  bounce  corrupt  defer  deferred  flush  hold  incoming
maildrop  pid  private  public

Where are the  "etc" "usr" and "lib" directories that are referred to
?

>If you haven't got the chroot jail setup already, then look in the
>"examples" directory of the Postfix documentation and you will find
>a script in there to set up it up for your operating system. If you
>can't find that, then see the "Problems or Errors" section further
>down this page.


This is the script that I have found under
/usr/share/doc/packages/postfix/examples/chroot-setup.  Originally
for SuSE 5.3.  Presumably it will work with SuSE 8.2 ?


# Revision 1.4  2001/01/15 09:36:35  emma
# add note it was successfully tested on Debian sid
#

CP="cp -p"

cond_copy() {
  # find files as per pattern in $1
  # if any, copy to directory $2
  dir=`dirname "$1"`
  pat=`basename "$1"`
  lr=`find "$dir" -maxdepth 1 -name "$pat"`
  if test ! -d "$2" ; then exit 1 ; fi
  if test "x$lr" != "x" ; then $CP $1 "$2" ; fi
}

set -e
umask 022

POSTFIX_DIR=${POSTFIX_DIR-/var/spool/postfix}
cd ${POSTFIX_DIR}

mkdir -p etc lib usr/lib/zoneinfo

# find localtime (SuSE 5.3 does not have /etc/localtime)
lt=/etc/localtime
if test ! -f $lt ; then lt=/usr/lib/zoneinfo/localtime ; fi
if test ! -f $lt ; then lt=/usr/share/zoneinfo/localtime ; fi
if test ! -f $lt ; then echo "cannot find localtime" ; exit 1 ; fi
rm -f etc/localtime

# copy localtime and some other system files into the chroot's etc
$CP -f $lt /etc/services /etc/resolv.conf /etc/nsswitch.conf etc
$CP -f /etc/host.conf /etc/hosts /etc/passwd etc
ln -s -f /etc/localtime usr/lib/zoneinfo

# copy required libraries into the chroot
cond_copy '/lib/libnss_*.so*' lib
cond_copy '/lib/libresolv.so*' lib
cond_copy '/lib/libdb.so*' lib

postfix reload




--
Richard
www.sheflug.co.uk



More information about the MailScanner mailing list