Sendmail+Amavis+ClamAv-Como.html   [plain text]


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
	<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=iso-8859-1">
	<TITLE></TITLE>
	<META NAME="GENERATOR" CONTENT="StarOffice/5.2 (Linux)">
	<META NAME="AUTHOR" CONTENT=" ">
	<META NAME="CREATED" CONTENT="20020611;12100300">
	<META NAME="CHANGEDBY" CONTENT=" ">
	<META NAME="CHANGED" CONTENT="20020830;11482600">
	<STYLE>
	<!--
		@page { size: 21cm 27cm; margin: 2cm }
	-->
	</STYLE>
</HEAD>
<BODY>
<P ALIGN=CENTER STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif"><B>Sendmail
+ Amavis + ClamAv - Como</B></FONT></P>
<P ALIGN=CENTER STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=CENTER STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">1.-
Sendmail ya funcionando.</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">2.-
Obtener ClamAv de:</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><A HREF="http://clamav.elektrapro.com/"><FONT FACE="Bookman L, serif">http://clamav.elektrapro.com/</FONT></A></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><A HREF="http://www.konarski.edu.pl/~zolw/"><FONT FACE="Bookman L, serif">http://www.konarski.edu.pl/~zolw/</FONT></A></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">o
de</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><A HREF="http://freshmeat.net/"><FONT FACE="Bookman L, serif">http://freshmeat.net</FONT></A></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">3.-
Obtener Amavis perl 11&gt;&gt; de:</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><A HREF="http://www.amavis.org/"><FONT FACE="Bookman L, serif">www.amavis.org</FONT></A></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">4.-
Verificar si tenemos el siguiente software y en su caso instalarlo:</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">o
perl (obviously)</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">o
virus scanner software (obviously)</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">o
file</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">A
file command which understands the -b option is required, e.g. the</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">one
from ftp://ftp.astron.com/pub/file/</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">o
arc</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">o
bunzip2 (part of the bzip2 package)</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">o
lha (version 1.14g or later!)</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">o
unarj</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">o
uncompress (standard on Unix and Unix-like systems)</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">o
unrar</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">o
unzoo</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">Para
verificar:</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">-rpm
-q paquete o -dpkg -s paquete o debconf, yast, linuxconf, etc.</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">Para
instalar:</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">-rpm
-i paquete o -dpkg -i paquete o debconf, yast, linuxconf, etc.</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">Para
encontrarlos (si no los tiene tu distro) ver referencias en:</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><A HREF="http://www.amavis.org/"><FONT FACE="Bookman L, serif">www.amavis.org</FONT></A></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">o
usar</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><A HREF="http://www.google.com/linux"><FONT FACE="Bookman L, serif">www.google.com/linux
<SPAN STYLE="text-decoration: none">;-)</SPAN></FONT></A></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">*No
es necesario pero si deseable instalar todos los compresores.</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">4.-
Modulos de Perl para amavis-perl :-P.</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">IO-stringy</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">Syslog</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">MailTools
</FONT>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">MIME-Base64</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">MIME-tools
version 5.313 or better (!!)</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">Convert-UUlib</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">Convert-TNEF
0.06 or better (!!)</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">Compress-Zlib</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">Archive-Tar</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">Archive-Zip</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">libnet</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">Se
pueden obtener todos de <A HREF="http://www.cpan.org/">www.cpan.org</A></FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">Si
se tiene instalado el modulo CPAN la cosa es tan facil como:</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">perl
-MCPAN -e shell</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">E
irle indicando uno a uno:</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">install
Unix::Syslog</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">install
Convert::UUlib</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">install
Convert::TNEF</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">install
Compress::Zlib</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">install
Archive::Tar</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">install
Archive::Zip</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">install
G/GB/GBARR/MailTools-1.15.tar.gz</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">install
MIME::Tools</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">install
Bundle::libnet</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">Ok
Con esto tenemos lo necesario para comenzar.</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">5.-
Instalar el Scanner de virus (el programa encargado de buscar y
encontrar virus en archivos).</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">Usaremos
el ClamAv por sus caracteristicas (GPL, C)</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">Las
siguientes instrucciones fueron tomadas y tradcidas del manual
incluido con el ClamAv.</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">Suponemos
que tienes acceso root.</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">&#147;Si
estas instalando por primera vez, tienes que agregar a tu sistema un
nuevo grupo y un nuevo usuario(clamav):</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">#
groupadd clamav </FONT>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">#
useradd -g clamav -s /bin/false -c &quot;Clam Antivirus&quot; clamav</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">Por
favor no le pongas contrase&ntilde;a a esta cuenta. Debe ser un
usuario normal sin privilegios. No lo agreges a ningun grupo
especial.</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">Despues
de esto extrae los archivos, configura y compila:</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">$
tar zxpvf clamav-x.yz.tar.gz </FONT>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">$
cd clamav-x.yz $ ./configure; make </FONT>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">$
su -c &quot;make install&quot; </FONT>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">&iexcl;Eso
es todo !</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">Prueba:</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">Ok.
Hagamos algunas pruebas. </FONT>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">Intenta
scanear recursivamente el directorio de las fuentes de clamAv:</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">$
clamscan -r -l scan.txt clam-x.yz </FONT>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">Deberiamos
encontrar un virus en el archivo clam.x.yz/eicar.com.</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">Puedes
checarlo en el archivo creado: scan.txt</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif"><B>Soporte
para AmaViS-perl:</B></FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm; font-weight: medium"><FONT FACE="Bookman L, serif">Lo
primero que necesitas es amavis-perl-11.tar.gz, lo puedes obtener de
http://amavis.org, luego:</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm; font-weight: medium"><FONT FACE="Bookman L, serif">$
tar zxpvf amavis-perl-11.tar.gz </FONT>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm; font-weight: medium"><FONT FACE="Bookman L, serif">$
cp clam-x.yz/support/amavis/clamavis.patch amavis-perl-11 </FONT>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm; font-weight: medium"><FONT FACE="Bookman L, serif">$
cd amavis-perl-11 </FONT>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm; font-weight: medium"><FONT FACE="Bookman L, serif">$
patch -p1 &lt; clamavis.patch </FONT>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm; font-weight: medium"><FONT FACE="Bookman L, serif">$
find . -exec touch 01010000 {} \; </FONT>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm; font-weight: medium"><FONT FACE="Bookman L, serif">Ahora
por favor efectua una instalaci&oacute;n normal de Amavis.</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm; font-weight: medium"><FONT FACE="Bookman L, serif"><I>Consejo</I>:
Amavis usara clamscan con las opciones tipicas, lo cual esta bien
para la mayoria de los sistemas. Si quieres agregar otras opciones
(ej. descompresion, limites) por favor edita el archivo
/usr/sbin/amavis despues de la instalaci&oacute;n).&#148;</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm; font-weight: medium"><FONT FACE="Bookman L, serif">Por
favor lee el manual del clam.</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm; font-weight: medium"><FONT FACE="Bookman L, serif">El
autor de clamAv y del manual del cual traduje lo anterior es:</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><SPAN STYLE="font-weight: medium"><FONT FACE="Bookman L, serif">Tomasz
Kojm &lt;<A HREF="mailto:zolw@konarski.edu.pl">zolw@konarski.edu.pl</A>&gt;</FONT></SPAN></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif"><B>6.-
Instalaci&oacute;n de Amavis-perl-11:</B></FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">Suponemos
que sendmail ya esta instalado y que existe /etc/sendmail.cf</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">(o
/etc/mail/sendmail.cf)</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">Yo
opte por la configuraci&oacute;nmanual, pero existe tambi&eacute;n la
via de m4.</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">Los
pasos , son los siguientes:</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">1)
Copia el archivo /etc/sendmail.cf a /etc/sendmail.orig.cf</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">2)
Cambiar a mano sendmail.cf:</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">a)
Abre /etc/sendmail.cf en tu editor favorito</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">b)
Cambia el directorio de la cola (queue) a:</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">QueueDirectory=/var/spool/mqamavis</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">c)
Cambia el archivo de estado (status) a:</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">StatusFile=/var/log/amavis.st</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">d)
Cambia el conjunto de reglas 0 (rule set 0) a:</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">R$*
$: $&gt;Parse0 $1 initial parsing</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">R&lt;@&gt;
$#local $: &lt;@&gt; special case error msgs</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">R$*
$: $&gt;98 $1 handle local hacks</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">R$*
$#amavis $:$1</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">#R$*
$: $&gt;Parse1 $1 final parsing</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">Ten
cuidado con los tabuladores. Aqu&iacute; esta el codigo de nuevo, en
lugar de [tab] prseiona la tecla tab :-)</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm; font-weight: medium"><FONT FACE="Bookman L, serif">R$*[tab][tab]$:
$&gt;Parse0 $1[tab][tab]initial parsing</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm; font-weight: medium"><FONT FACE="Bookman L, serif">R&lt;@&gt;[tab][tab]$#local
$: &lt;@&gt;[tab][tab]special case error msgs</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm; font-weight: medium"><FONT FACE="Bookman L, serif">R$*[tab][tab]$:
$&gt;98 $1[tab][tab]handle local hacks</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm; font-weight: medium"><FONT FACE="Bookman L, serif">R$*[tab][tab]$#amavis
$:$1</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm; font-weight: medium"><FONT FACE="Bookman L, serif">#R$*[tab][tab]$:
$&gt;Parse1 $1[tab][tab]final parsing</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">Agrega
la nueva definicion de mailer:</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">Mamavis,
P=/usr/sbin/amavis, F=mlsACDFMS5:/|@qhP, S=0, R=0</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">T=DNS/RFC822/X-Unix,</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">A=amavis
$f $u</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">3)Ejecuta:</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">./configure
--enable-relay --enable-sendmail
--with-warnrecip=/home/amavis-perl-11/amavis/notify/recip</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">make
</FONT>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">make
check</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">make
install </FONT>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">*Nota:
Puedes agregar mas opciones al ./configure. Lee el INSTALL de amavis.
</FONT>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">4)
Crea el directorio /var/spool/mqamavis con los mismos permisos que </FONT>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">/var/spool/mqueue
pero el propietario y el grupo deben se amavis.</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">*Nota:
Yo los deje con root : root y funciona.</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">5)
Reinicia sendmail:</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">killall
-HUP sendmail</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">o
si usas SuSE Linux:</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">rcsendmail
restart</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">Listo,
sendmail ya tiene soporte de amavis y clamscan para detectar correos
infectados.</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">Solo
resta que hagas pruebas enviando y recibiendo correos con archivos
adjuntos infectados.</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">Como
prueba puedes usar el archivo /home/clamav-0.14/test/eicar.com que NO
es un virus, y sirve para probar tu sistema antivirus. </FONT>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">Si
todo funciona el postmaster y el usuario que envio el archivo con
virus reciben un correo notificandoles VIRUS IN YOUR MAIL (VIRUS EN
TU CORREO).</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">Con
lo cual la alarma esta funcionando.</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><B><FONT SIZE=3><FONT FACE="Bookman L, serif">Precuacion
con la cola de correo</FONT></FONT></B>:</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm; font-weight: medium"><FONT FACE="Bookman L, serif">Al
parecer amavis tiene problemas de correo que se queda atorado en la
cola cuando el envio no se puede realizar la primera vez, y ya no lo
vuelve a intentar enviar.</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm; font-weight: medium"><FONT FACE="Bookman L, serif">Para
corregir esto podemos hacer lo siguiente:</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm; font-weight: medium"><FONT FACE="Bookman L, serif"><FONT SIZE=3>/usr/sbin/sendmail
-C /etc/sendmail.orig.cf -q </FONT></FONT>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm; font-weight: medium"><FONT FACE="Bookman L, serif"><FONT SIZE=3>via
cron </FONT></FONT>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm; font-weight: medium"><FONT FACE="Bookman L, serif"><FONT SIZE=3>Otra
solucion es:</FONT></FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm; font-weight: medium"><FONT FACE="Bookman L, serif"><FONT SIZE=3>/usr/sbin/sendmail
-q5m -C /etc/mail/sendmail.orig.cf</FONT></FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm; font-weight: medium"><FONT FACE="Bookman L, serif"><FONT SIZE=3>En
este caso la cola de correo se vacia cada 5 minutos. Una buena idea
es agregar esta segunda opcion al archivo de inicio de sendmail en
/etc/init.d/sendmail</FONT></FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm; font-weight: medium"><FONT FACE="Bookman L, serif"><FONT SIZE=3>Por
ejemplo:</FONT></FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm; font-weight: medium"><FONT FACE="Bookman L, serif"><FONT SIZE=3>#
For amavis processing of stuck mails in original</FONT></FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm; font-weight: medium"><FONT FACE="Bookman L, serif"><FONT SIZE=3>#
queue [greynoso - 070502]</FONT></FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm; font-weight: medium"><FONT FACE="Bookman L, serif"><FONT SIZE=3>SENDMAIL_AMAVIS=&quot;-q30m
-C /etc/sendmail.orig.cf&quot;</FONT></FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm; font-weight: medium"><FONT FACE="Bookman L, serif"><FONT SIZE=3>.
/etc/rc.status</FONT></FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm; font-weight: medium"><FONT FACE="Bookman L, serif"><FONT SIZE=3>rc_reset</FONT></FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm; font-weight: medium"><FONT FACE="Bookman L, serif"><FONT SIZE=3>case
&quot;$1&quot; in</FONT></FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm; font-weight: medium"><FONT FACE="Bookman L, serif"><FONT SIZE=3>start)</FONT></FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm; font-weight: medium"><FONT FACE="Bookman L, serif"><FONT SIZE=3>echo
-n &quot;Initializing SMTP port. (sendmail)&quot;</FONT></FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm; font-weight: medium"><FONT FACE="Bookman L, serif"><FONT SIZE=3>startproc
/usr/sbin/sendmail $SENDMAIL_ARGS</FONT></FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm; font-weight: medium"><FONT FACE="Bookman L, serif"><FONT SIZE=3>rc_status
-v</FONT></FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm; font-weight: medium"><FONT FACE="Bookman L, serif"><FONT SIZE=3>#</FONT></FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm; font-weight: medium"><FONT FACE="Bookman L, serif"><FONT SIZE=3>#
For amavis processing of stuck mails in original</FONT></FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm; font-weight: medium"><FONT FACE="Bookman L, serif"><FONT SIZE=3>#
queue [greynoso - 070502]</FONT></FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm; font-weight: medium"><FONT FACE="Bookman L, serif"><FONT SIZE=3>/usr/sbin/sendmail
$SENDMAIL_AMAVIS</FONT></FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm">....</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">Etc.</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif">Con
esto ya no debe haber problemas de correo atorado :-)</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif"><B>Auto-Actualizacion
con FreshClam:</B></FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm; font-weight: medium"><FONT FACE="Bookman L, serif">En
tu cron agrega:</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm; font-weight: medium"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm; font-weight: medium"><FONT FACE="Bookman L, serif">#Actualizacion
dB Clam[Erick Lopez 2k2/07/16]</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm; font-weight: medium"><FONT FACE="Bookman L, serif">#45	1	*	*	*	/usr/local/bin/freshclam|
/usr/bin/mail -s 'Actualizacion antivirus' virusalert</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm; font-weight: medium"><FONT FACE="Bookman L, serif">Con
lo cual corre el freshclam a la 1:45 am y te envia un mail con el
status de la base de datos de virus.</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><FONT FACE="Bookman L, serif"><B>Auto-Actualizacion
con oav-update:</B></FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm; font-weight: medium"><FONT FACE="Bookman L, serif">Actualmente
existe otra opcion para actualizar la base de datos de virus (la cual
recordemos es la de Open Antivirus ), esta opcion es mas flexible que
el freshclam, aunque al parecer (no la he probado aun) requiere mas
configuacion.</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm; font-weight: medium"><FONT FACE="Bookman L, serif">Dicha
opcion es el oav-update que puedes conseguir en:</FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm; font-weight: medium"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm; font-weight: medium"><FONT FACE="Bookman L, serif"><A HREF="http://packages.debian.org/testing/utils/oav-update.html">http://packages.debian.org/testing/utils/oav-update.html</A></FONT></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm">Erick Iva&aacute;n L&oacute;pez
Carre&oacute;n</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><A HREF="http://www.fsl.org.mx/">www.fsl.org.mx</A></P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm">Creditos:</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm">Gerardo Reynoso Cobos
&lt;<A HREF="mailto:greynoso@technitrade.com">greynoso@technitrade.com</A>&gt;
Solucion al problema de correo pegado a la cola de amavis.</P>
<P ALIGN=JUSTIFY STYLE="margin-bottom: 0cm"><BR>
</P>
</BODY>
</HTML>