# $Id: postinstall,v 1.3 2004/05/29 20:39:59 elkner Exp $ if [ -z "$PKG_INSTALL_ROOT" ]; then BASE="" else BASE=${PKG_INSTALL_ROOT} fi FILES="clamd.conf freshclam.conf milter.conf" for CONF in $FILES ; do if [ ! -f ${BASE}/etc/clamav/${CONF} ]; then if [ -f ${BASE}/etc/clamav/${CONF}.default ]; then cp -p ${BASE}/etc/clamav/${CONF}.default ${BASE}/etc/clamav/${CONF} fi fi done echo " Please read /etc/clamav/README! ClamAV services are managed by the service management facility, smf(5) and are disabled by default. To enable one or more of these service use: svcadm enable clamscan svcadm enable clamfresh svcadm enable clammilter The clamd should always be enabled before the other services shown above. " if [ ! -d ${BASE}/var/share/milter ]; then mkdir -p ${BASE}/var/share/milter 2>/dev/null chmod 0755 ${BASE}/var/share/milter 2>/dev/null chown smmsp:daemon ${BASE}/var/share/milter 2>/dev/null fi echo " " echo "To activate the ClamAV filter in sendmail, you should add the following" echo "line to your sendmail m4 configuration file (e.g. server.mc), " echo "generate a new sendmail.cf and finally restart sendmail:" echo " INPUT_MAIL_FILTER(\`clamav',\`S=local:/var/share/milter/clamav.sock,T=C:10s;S:10s;R:20s;E:1m')" if [ "$CLIENT_BASEDIR" = "/usr" ]; then exit 0 fi echo " " echo "You may add the following library[s] to the default library search path" echo "of your system using the crle tool, so that other applications are able" echo "to find the installed libraries automatically:" echo " " LP="" for l in lib; do if [ -n "$l" ]; then if [ -z "$LP" ]; then LP="$CLIENT_BASEDIR/$l" else LP="${LP}:$CLIENT_BASEDIR/$l" fi fi done echo " $LP" echo " " echo "E.g.:" echo " crle -c /var/ld/ld.config -l /usr/lib:$LP" echo " " exit 0