• # Première ligne

    Posté par . En réponse à la dépêche Installation d'un serveur de messagerie. Évalué à 1.

    heuuu ça veut dire quoi ca ?
    Mon expérience LaTeX à travers des exemples, des solutions mais aussi quelques mises en reliefs de packages LaTeX.
    C'est sur la 1ere page.

    Sinon pour ceux que ca branche, et puisqu'on parle de postfix, j'ai baclé une doc en innegliche sur l'installation d'Amavis avec Postfix (testé sur une MDK). C'est un peu crado mais la doc "officielle" est assez incomplète. A toutes fins utiles...


    Installing Amavis with Postfix on Mandrake Linux, using Sophos.
    V 0.01 20010904 - 12:22

    1 - Install Antivirus
    1.1 Install Sophos from http://www.sophos.com(...) (need Login + passwd, see
    http://www.sophos.com/downloads/products/(...) ).
    # ./install.sh -ni

    1.2 Install Sophos updates (.ide files) in /usr/local/sav

    2 - Install Amavis
    2.1 Required software

    These are software *not* provided with Mandrake Linux (2 CDs set)

    cf http://www.amavis.org/amavis.html(...)

    arc ftp://rpmfind.net/linux/contrib/libc6/i386/arc-5.21e-4.i386.rpm(...)
    lha http://www2m.biglobe.ne.jp/~dolphin/lha/prog/lha-114i.tar.gz(...)
    zoo ftp://rpmfind.net/linux/contrib/libc6/i386/zoo-2.10-4.i386.rpm(...)
    unrar ftp://rpmfind.net/linux/Mandrake-devel/contrib/RPMS/unrar-2.50-1md(...)

    Perl modules (perl -MCPAN -e shell). You'll need perl-devel and Lynx.
    Unix/Syslog Unix::Syslog
    Convert/UUlib Convert::UUlib
    Convert/TNEF Convert::TNEF
    Archive/Tar Archive::Tar
    Archive/Zip Archive::Zip

    2.2 Install Amavis

    Modify the files "admin", "recip" and "sender" in /<your source dir>/amavisd-<version>/amavis/notify/ if you wish to change the
    default warning message.

    # adduser vscan
    # rm -rf /home/vscan

    Edit /etc/passwd to remove home directory for vscan
    *LEAVE* a valid shell (/bin/bash is good, rbash does not work) !
    Edit /etc/shadow to change the password for vscan to prevent direct login ("*" is a good one).
    Check that somebody gets vscan's mail (/etc/aliases). While you're there, check that somebody gets virusalert's and postmaster's mail.

    # killall amavisd
    # make clean && make distclean
    # ./configure --enable-postfix --with-sophos-ide=/usr/local/sav --enable-syslog --with-amavisuser=vscan --enable-smtp --with-smtp-port=10025 --with-warnsender --with-warnrecip --with-warnadmin
    # make && make install
    # service postfix stop
    # su vscan -c /usr/sbin/amavisd
    # service postfix start
    # su vscan -c 'make check'

    Add
    content_filter = vscan:
    to /etc/postfix/main.cf

    Add
    vscan unix - n n - 10 pipe user=vscan argv=/usr/sbin/amavis ${sender} ${recipient}
    localhost:10025 inet n - n - - smtpd -o content_filter=
    to /etc/postfix/master.cf.

    # service postfix restart

    3 - Test

    $ echo "X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*" > /tmp/eicar.com
    Send a mail with the file /tmp/eicar.com. It should be detected as a virus and get bounced back to the sender and the admin with a
    warning message.
    You can also try with a "real" virus. Back Orifice is available here : http://www.mut3x.com/cdc/bo120.zip.(...) It should be detected even
    when zipped.

    4 - Tuning

    4.1 Automatically update antivirus files

    Try this in some crontab file

    ---------------------------------< cut here
    #!/bin/bash

    #cd $SAV_IDE
    cd /usr/local/lib/sweep-IDE

    /usr/bin/wget -q -N `/usr/local/bin/sweep -v |/usr/bin/grep "Product version"
    |/usr/bin/sed -e "s/.*: \(.\)\.\(..\)$/
    http:\/\/www.sophos.com\/downloads\/ide\/1円2円_ides.zip/"`
    /usr/bin/unzip -q -n "???_ides.zip"

    chmod 644 *
    ---------------------------------< cut here

    4.2 Start amavisd on startup

    Start it *before* postfix.
    Put this in /etc/init.d/amavisd :
    ------------------------------------------------------< cut here
    #!/bin/sh
    #
    # amavisd This shell script takes care of starting and stopping
    # the amavis daemon (mail antivirus).
    #
    # chkconfig: 2345 60 40
    #
    # description: Amavisd is the daemon that interracts with the antivirus to
    # check mails for wiruses
    #

    # Source function library.
    . /etc/rc.d/init.d/functions

    # Source networking configuration.
    . /etc/sysconfig/network

    # Check that networking is up.
    [ ${NETWORKING} = "no" ] && exit 0

    [ -f /usr/sbin/amavisd ] || exit 0

    # See how we were called.
    case "1ドル" in
    start)
    # Start daemons.
    echo -n "Starting amavisd: "
    /bin/su vscan -c /usr/sbin/amavisd
    touch /var/lock/subsys/amavisd
    ;;
    stop)
    # Stop daemons.
    echo -n "Shutting down amavisd: "
    /usr/bin/killall amavisd 2>/dev/null
    echo amavisd
    rm -f /var/lock/subsys/amavisd
    ;;
    restart)
    0ドル stop
    0ドル start
    ;;
    *)
    echo "Usage: 0ドル {start|stop|restart}"
    exit 1

    esac

    exit 0
    --------------------------------------------------------< cut here

    #chkconfig amavisd --reset



    Si vous avez réussi à lire jusqu'ici, n'hésitez pas à m'envoyer un mail pour me faire part de vos commentaires ...