<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>DevelopArts &#187; Exim</title>
	<atom:link href="http://www.developarts.com/category/articulos/exim/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.developarts.com</link>
	<description></description>
	<lastBuildDate>Sun, 25 Jul 2010 04:14:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Exim: Manejando la Cola de Mensajes</title>
		<link>http://www.developarts.com/eximmanejando_la_cola_de_mensajes/</link>
		<comments>http://www.developarts.com/eximmanejando_la_cola_de_mensajes/#comments</comments>
		<pubDate>Sun, 14 Feb 2010 05:51:34 +0000</pubDate>
		<dc:creator>neXus</dc:creator>
				<category><![CDATA[Exim]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.developarts.com/?p=1</guid>
		<description><![CDATA[Este artículo agrupa información variada sobre el uso de “Exim” en el rastreo y parseo de la cola de mensajes]]></description>
			<content:encoded><![CDATA[<p><img src='http://www.developarts.com/wp-content/plugins/simple-post-thumbnails/timthumb.php?src=/wp-content/thumbnails/1.png&amp;w=150&amp;h=150&amp;zc=1&amp;ft=jpg' alt='post thumbnail' /></p>
<p>Este artículo agrupa información variada sobre el uso de <strong>&#8220;Exim&#8221;</strong> en el rastreo y parseo de la <strong>cola de mensajes</strong>.<span id="more-1"></span> Con el tiempo iré documentando más a fondo cada una de las opciones y agregaré las nuevas que considere interesantes.</p>
<p>Lo primero que podemos hacer es saber cuantos correos tenemos en <strong>cola</strong> con:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">exim <span style="color: #660033;">-bpc</span></pre></div></div>

<p>Podemos listar todos los correos en <strong>cola</strong>:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">exim <span style="color: #660033;">-bp</span></pre></div></div>

<p>Ya de aquí podemos empezar a realizar filtrados con:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">exim <span style="color: #660033;">-bp</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span></pre></div></div>

<p>Lo mas normal es encontrar muchos correos en estado “Frozen” los cuales podemos contabilizar así:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">exim <span style="color: #660033;">-bpr</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> frozen <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">wc</span> <span style="color: #660033;">-l</span></pre></div></div>

<p>Podemos saber mas sobre un envío en <strong>cola</strong>, viendo el “Status log” de un correo particular:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">exim <span style="color: #660033;">-Mvl</span></pre></div></div>

<p>Para ver la cabeceras del mensaje:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">exim <span style="color: #660033;">-Mvh</span></pre></div></div>

<p>Para ver el cuerpo del mensaje:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">exim <span style="color: #660033;">-Mvb</span></pre></div></div>

<p>Para descongelar un correo en <strong>cola</strong>:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">exim <span style="color: #660033;">-Mt</span></pre></div></div>

<p>Para borrar todos los mensajes &#8220;Frozen&#8221; en <strong>cola</strong>:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">exim <span style="color: #660033;">-bpr</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #ff0000;">&quot;frozen&quot;</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">'{ print $3 }'</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">xargs</span> <span style="color: #660033;">-l10</span> exim <span style="color: #660033;">-Mrm</span></pre></div></div>

<p>Para ver que dominios están ocupando mas espacio en la <strong>cola</strong>:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">exim <span style="color: #660033;">-bpr</span> <span style="color: #000000; font-weight: bold;">|</span> exiqsumm <span style="color: #660033;">-c</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">head</span></pre></div></div>

<p>Para eliminar todos los correos en <strong>cola</strong> de un correo en particular:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">exiqgrep <span style="color: #660033;">-i</span> <span style="color: #660033;">-r</span> user<span style="color: #000000; font-weight: bold;">@</span>hostname.com <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">xargs</span> exim <span style="color: #660033;">-Mrm</span></pre></div></div>

<p>Para eliminar todos los correos en <strong>cola</strong> de un dominio en particular:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">exiqgrep <span style="color: #660033;">-i</span> <span style="color: #660033;">-r</span> hostname.com <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">xargs</span> exim <span style="color: #660033;">-Mrm</span></pre></div></div>

<p>Para remover TODOS los mensajes en <strong>Cola</strong>:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">exim <span style="color: #660033;">-bp</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">'/^ *[0-9]+[mhd]/{print &quot;exim -Mrm &quot; $3}'</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sh</span></pre></div></div>

<p>Este es bastante interesante para crear reportes variados parseando los logs de Exim:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">eximstats <span style="color: #660033;">-html</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/</span>exim_mainlog <span style="color: #000000; font-weight: bold;">&gt;</span> eximrep.html</pre></div></div>

<p>Para información detallada: <a href="http://www.exim.org/exim-html-current/doc/html/spec_html/ch05.html" onclick="return TrackClick('http%3A%2F%2Fwww.exim.org%2Fexim-html-current%2Fdoc%2Fhtml%2Fspec_html%2Fch05.html','este+link')" target="_blank">este link</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.developarts.com/eximmanejando_la_cola_de_mensajes/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
