<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5785733457648885241</id><updated>2026-09-23T19:09:05.153-03:00</updated><category term="Cluster"/><category term="Gerenciamento"/><category term="Monitoramento"/><category term="Roteamento"/><category term="puppet"/><title type='text'>Extended memory for linux</title><subtitle type='html'>Está blog tem a finalidade ser uma memória extendida &lt;br&gt;&#xa;para o meu dia-a-dia e ao mesmo tempo &#xa;estar repassando&lt;br&gt; o conhecimento para o pessoal da comunidade linux.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://rafaeltomelin.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5785733457648885241/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://rafaeltomelin.blogspot.com/'/><author><name>Rafael Tomelin</name><uri>http://www.blogger.com/profile/13705154019737635144</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>8</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><blogger:adultContent>true</blogger:adultContent><entry><id>tag:blogger.com,1999:blog-5785733457648885241.post-1600977344418515892</id><published>2013-07-12T15:34:00.000-03:00</published><updated>2013-07-12T15:39:09.886-03:00</updated><title type='text'>Zabbix - LLD de portas abertas no server</title><content type='html'>&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Zabbix - LLD check portas abertas no server&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
Pessoal, neste artigo vou mostrar como criar um LLD no zabbix para pegar as portas abertas dos servidores que estão sendo monitorados.&lt;br /&gt;
&lt;br /&gt;
Existem alguns pré-requisitos:&lt;br /&gt;
1) ter o serviço do NMAP instalado&lt;br /&gt;
2) O user zabbix poder executar o NMAP.&lt;br /&gt;
&lt;br /&gt;
Então, bora para o que interessa, criando nosso LLD.&lt;br /&gt;
&lt;br /&gt;
Primeiro vamos começar com a criação do LLD e depois vou colocar o script que é executado.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;1) Vamos criar um Template com nome: &quot;Template Port Scan&quot; e associar ele aos templates;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;2) Após criado o template, clique no menu &quot;Discovery&quot; do template, para criar o LLD.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;3) Clique em &quot;create discovery rule&quot; e preencha da seguinte forma:&lt;/b&gt;&lt;br /&gt;
Nome: PORt SCAN $1&lt;br /&gt;
Type: Zabbix Agent&lt;br /&gt;
key: port[$IP_PORTSCAN]&lt;br /&gt;
update interval: 43200&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwVCsTUUIQFz1_iB0nlcwIYiuS5FPHYkP9RejZX4kIdP6CZBHjaz1yOqMI00MpWJfY0c0evapW-fnuo6OcAFuC5n1uKfzeUuLFXukzAj6ZLYpEjJcrhG141y2KPv3F99_kRc0XGGMV0pM/s1600/port+scan.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;213&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwVCsTUUIQFz1_iB0nlcwIYiuS5FPHYkP9RejZX4kIdP6CZBHjaz1yOqMI00MpWJfY0c0evapW-fnuo6OcAFuC5n1uKfzeUuLFXukzAj6ZLYpEjJcrhG141y2KPv3F99_kRc0XGGMV0pM/s320/port+scan.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
OBS.: Coloquei para verificar duas vezes ao dia, pois normalmente um servidor não fica abrindo portas do nado.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;4) Clique em &quot;Item Prototypes&quot; e depois em &quot;Create item prototype&quot; e preencha da seguinte forma:&lt;/b&gt;&lt;br /&gt;
Name: Server $1 - Port $2&lt;br /&gt;
Type: Zabbix Agent&lt;br /&gt;
Key:&amp;nbsp;net.tcp.port[{$IP_PORTSCAN},{#PORT}]&lt;br /&gt;
Type Of Information: Numeric (unsigned)&lt;br /&gt;
Data Type: Decimal&lt;br /&gt;
update interval: 43200&lt;br /&gt;
Keep history: 14&lt;br /&gt;
Keep trends: 30&lt;br /&gt;
New Application: Port Scan&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFN-L_aDzh5icx17HwxwnjgmCrgWsCLFtynf2wul-S3XjACsWlfoiBPLp7pziWKVH9tQbGPVJFMoDhIK-dTg86xDajclQo_fDvw5ggWVgzq2O5Ad_aX6C7HKOZzOGEjap_6Dp1vS6Cybg/s1600/item+port+scan.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;308&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFN-L_aDzh5icx17HwxwnjgmCrgWsCLFtynf2wul-S3XjACsWlfoiBPLp7pziWKVH9tQbGPVJFMoDhIK-dTg86xDajclQo_fDvw5ggWVgzq2O5Ad_aX6C7HKOZzOGEjap_6Dp1vS6Cybg/s320/item+port+scan.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;5) Criar uma trigger em &quot;Trigger Prototypes&quot; e clique em &quot;Create trigger prototypes&quot;&lt;/b&gt;&lt;br /&gt;
Name: Port Scan Test&lt;br /&gt;
Expression:&lt;br /&gt;
&lt;br /&gt;
{Template Discovery:net.tcp.port[{$IP_SERVER},{#PORT}].last(0)}=0&lt;br /&gt;
&amp;nbsp;|&lt;br /&gt;
{Template Discovery:net.tcp.port[{$IP_SERVER},{#PORT}].nodata(43260)}#0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OBS.: A expressão informar que será alertado caso a porta fique down ou não tenha comunicação após 43260 segundos (1 minutos a mais do que o item).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Beleza, está criado o nosso LLD, temos que apenas associar a um host. &amp;nbsp;Crie um host de teste para começar a brincar.&lt;br /&gt;
&lt;br /&gt;
Agora vamos configurar o userparameter com a seguinte linha.&lt;br /&gt;
UserParameter=port[*],/usr/local/share/zabbix/externalscripts/nmap.sh $1 2&amp;gt; /dev/null&lt;br /&gt;
&lt;br /&gt;
E no local do script coloca o mesmo que está abaixo:&lt;br /&gt;
&lt;br /&gt;
OBS.: O script cria um arquivo em /tmp/.nmapportHOST, para que não de um timeout a cada vez que for realizada a consulta. &amp;nbsp;Lembrando que SCAN (nmap) é executado 1 vez ao dia.&lt;br /&gt;
Se o arquivo não tiver sido criado não vai retornar nada, a partir do momento que o arquivo estiver criado, o script da um cat no arquivo que está montado para o zabbix receber os parametros solicitados.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
HOST=&quot;$1&quot;&lt;br /&gt;
FILE=&quot;/tmp/.nmapport$HOST&quot;&lt;br /&gt;
&lt;br /&gt;
if [ -n &quot;$1&quot; ] &amp;amp;&amp;amp; [ -e &quot;$FILE&quot; ] ; then&lt;br /&gt;
{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;cat /tmp/.nmapport$HOST&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;exit&lt;br /&gt;
}&lt;br /&gt;
elif [ ! -e $FILE ]; then&lt;br /&gt;
{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;for &amp;nbsp;(( i=1; i&amp;lt;=10; i++ ))&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;do&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;LLD=&quot;{ \&quot;data\&quot;: [&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;SAVEIFS=$IFS&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;IFS=$(echo -en &quot;\n\b&quot;)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;for port in `sudo nmap -sT -T4 -P0 &quot;$HOST&quot; | grep &quot;^[0-9]&quot;`&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;do&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;PORT=` echo &quot;$port&quot; | awk -F &#39;/&#39; &#39;{ print $1}&#39;`&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;PROTO=` echo &quot;$port&quot; | awk -F &#39;/&#39; &#39;{ print $2}&#39; | awk &#39;{ print $1}&#39;`&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;STATUS=` echo &quot;$port&quot; | awk &#39;{ print $2}&#39;`&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;DESCRIBE=` echo &quot;$port&quot; | awk &#39;{ print $3}&#39;`&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;LLD=&quot;$LLD { \&quot;{#PORT}\&quot;:\&quot;$PORT\&quot;},&quot;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;LLD=&quot;$LLD { \&quot;{#PROTO}\&quot;:\&quot;$PROTO\&quot;},&quot;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;LLD=&quot;$LLD { \&quot;{#STATUS}\&quot;:\&quot;$STATUS\&quot;},&quot;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;LLD=&quot;$LLD { \&quot;{#DESCRIBE}\&quot;:\&quot;$DESCRIBE\&quot;},&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;echo &quot;$HOST&quot; &amp;gt;&amp;gt; /tmp/nmap.log&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;#echo &quot;porta: $PORT =&amp;gt; proto: $PROTO =&amp;gt; status: $STATUS =&amp;gt; describe: $DESCRIBE&quot; &amp;gt;&amp;gt; /tmp/nmap.log&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;done&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;IFS=$SAVEIFS&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;GAMBI=&quot;$LLD&quot;&quot;GAMBI&quot;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;GAMBI=`echo &quot;$GAMBI&quot; | sed -e &#39;s/\(},GAMBI\)*$//g&#39;`&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;LLD=&quot;$GAMBI }]}&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;echo $LLD &amp;gt; $FILE&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;if [ $i -ge 8 ]; then&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;i=2&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;fi&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;sleep 86400&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;done&lt;br /&gt;
}&lt;br /&gt;
fi&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;
Para testar eu recomendo diminuir os tempos em segundos, para que ele rode a cara 10 minutos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
Bom é isso pessoal, e esperem que seja util para vocês.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ul class=&quot;formlist&quot; style=&quot;background-color: white; font-family: Verdana, Arial, sans-serif; font-size: 10px; line-height: 18px; list-style-type: none; margin: 0px; padding: 0px;&quot;&gt;
&lt;li class=&quot;formrow&quot; style=&quot;clear: both; height: 21px; padding: 2px; vertical-align: middle;&quot;&gt;&lt;div class=&quot;dd&quot; style=&quot;margin-left: 275.296875px; width: 1009.46875px;&quot;&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
</content><link rel='replies' type='application/atom+xml' href='http://rafaeltomelin.blogspot.com/feeds/1600977344418515892/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://rafaeltomelin.blogspot.com/2013/07/zabbix-lld-de-portas-abertas-no-server.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5785733457648885241/posts/default/1600977344418515892'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5785733457648885241/posts/default/1600977344418515892'/><link rel='alternate' type='text/html' href='http://rafaeltomelin.blogspot.com/2013/07/zabbix-lld-de-portas-abertas-no-server.html' title='Zabbix - LLD de portas abertas no server'/><author><name>Rafael Tomelin</name><uri>http://www.blogger.com/profile/13705154019737635144</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwVCsTUUIQFz1_iB0nlcwIYiuS5FPHYkP9RejZX4kIdP6CZBHjaz1yOqMI00MpWJfY0c0evapW-fnuo6OcAFuC5n1uKfzeUuLFXukzAj6ZLYpEjJcrhG141y2KPv3F99_kRc0XGGMV0pM/s72-c/port+scan.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5785733457648885241.post-7477512172454640038</id><published>2012-08-23T15:09:00.001-03:00</published><updated>2012-10-05T17:20:28.962-03:00</updated><title type='text'>PUPPET - criando classes- parte 2</title><content type='html'>&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;PUPPET - criando classes&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
Bem pessoal, como havia prometido, irei continuar o tutorial do Puppet.&lt;br /&gt;
&lt;br /&gt;
Agora nosso servidor está criando corpo e a brincadeira começa a ficar legal.&lt;br /&gt;
&lt;br /&gt;
Nessa segunda parte, esterei mostrando:&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;- Estrutura de diretórios;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;- Criação de classes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Vamos continuar usando a mesmo nomenclatura da (parte 1) - link) master (servidor puppet), client01 (cliente1)&lt;br /&gt;
&lt;br /&gt;
No primeiro artigo instalamos o master e o client01,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Estrutura de diretórios&lt;/b&gt;&lt;br /&gt;
manifests # aqui onde fica os arquivos de iremos informar qual hosts usa x classe&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;site.pp #importa as classes e hosts que serão utilizados&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;modules.pp #Importa a classes dos modulos&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;nodes.pp # declara os hosts e classes a serem usadas&lt;br /&gt;
&lt;br /&gt;
modules # nesse diretório colocamos todos os modulos a serem usados&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;manifests # onde tem os arquivos de classes criadas&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;files #arquivos padrão (não tem variavel)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;templates # templates a serem usados (contem variaveis)&lt;br /&gt;
&lt;br /&gt;
Essa é a estrutura básica, iremos entender um pouco mais na prática&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Criação de classes&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Agora vamos criar 3 modulos e cada módulo com suas classes.&lt;br /&gt;
&lt;br /&gt;
O primeiro modulo a ser criado é helloword.&lt;br /&gt;
&lt;br /&gt;
entre no diretório /etc/puppet/&lt;br /&gt;
&lt;br /&gt;
criando os diretórios&lt;br /&gt;
mkdir modules/helloword/{files,manifests,templates}&lt;br /&gt;
&lt;br /&gt;
Após entre no diretório manifests&lt;br /&gt;
cd modules/helloword/manifests&lt;br /&gt;
&lt;br /&gt;
crie o arquivo init.pp com o seguinte conteúdo&lt;br /&gt;
class helloword {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;file {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&quot;/tmp/file.tmp&quot;:&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;ensure =&amp;gt; present,&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;owner =&amp;gt; &quot;root&quot;,&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;group =&amp;gt; &quot;users&quot;,&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;mode =&amp;gt; &quot;640&quot;,&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;content =&amp;gt; template(&quot;/etc/puppet/modules/helloword/files/helloword.tmp&quot;),&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
crie o arquivo file.pp com o seguinte conteúdo&lt;br /&gt;
&lt;br /&gt;
class helloword::file {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;file {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&quot;/tmp/file.tmp&quot;:&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;ensure =&amp;gt; present,&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;owner =&amp;gt; &quot;root&quot;,&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;group =&amp;gt; &quot;users&quot;,&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;mode =&amp;gt; &quot;640&quot;,&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;content =&amp;gt; template(&quot;/etc/puppet/modules/helloword/files/file.tmp&quot;),&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
no arquivo /etc/puppet/modules/helloword/files/helloword.tmp, coloque o seguinte:&lt;br /&gt;
teste com helloword&lt;br /&gt;
&lt;br /&gt;
no arquivo /etc/puppet/modules/helloword/files/file.tmp, coloque o seguinte:&lt;br /&gt;
teste com subclasse&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Feito isso, entre no diretório /etc/puppet/manifests, e vamos criar assim:&lt;br /&gt;
&lt;br /&gt;
vim site.pp&lt;br /&gt;
import &quot;nodes&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
no arquivo nodes.pp, tem o seguinte conteúdo&lt;br /&gt;
&lt;br /&gt;
#Aqui uma configuração padrão que será usado em grande parte dos clients&lt;br /&gt;
node basenode {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;include helloword&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
node &#39;client1.interop.local&#39; inherits basenode {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;include helloword::file&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
no arquivo modules.pp o seguinte conteúdo&lt;br /&gt;
import helloword&lt;br /&gt;
import helloword:file&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Feito isso, acesse o server client1 e execute o seguinte comando:&lt;br /&gt;
puppetd agent --test --ignorecache&lt;br /&gt;
&lt;br /&gt;
Após executar o comando, deve ter a seguinte saída&lt;br /&gt;
info: Caching catalog for client1.interop.local&lt;br /&gt;
info: Applying configuration version &#39;1345743353&#39;&lt;br /&gt;
notice: /Stage[main]/Helloword::File/File[/tmp/file.tmp]/ensure: created&lt;br /&gt;
notice: Finished catalog run in 0.12 seconds&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Vamos agora criar a segunda classe de ntp&lt;br /&gt;
entre no diretório /etc/puppet/modules e crie o seguinte&lt;br /&gt;
mkdir ntp/{manifests,files,templates}&lt;br /&gt;
&lt;br /&gt;
No arquivo init.pp vamos criar assim&lt;br /&gt;
&lt;br /&gt;
class ntp {&lt;br /&gt;
&amp;nbsp; case $::operatingsystem {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Debian: {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; $packagename = &#39;openntp&#39;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; $servicename = &#39;openntp&#39;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; default: {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; $packagename = &#39;ntp&#39;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; $servicename = &#39;ntpd&#39;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; package { $packagename:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ensure =&amp;gt; installed,&lt;br /&gt;
&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; file { &#39;/etc/ntp.conf&#39;:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ensure &amp;nbsp;=&amp;gt; file,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; content &amp;nbsp;=&amp;gt; template(&quot;/etc/puppet/modules/ntp/files/ntp.conf&quot;),&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #source &amp;nbsp;=&amp;gt; &#39;puppet:///modules/ntp/files/ntp.conf&#39;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; owner &amp;nbsp; =&amp;gt; &#39;root&#39;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; group &amp;nbsp; =&amp;gt; &#39;root&#39;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; mode &amp;nbsp; &amp;nbsp;=&amp;gt; &#39;0444&#39;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; require =&amp;gt; Package[$packagename],&lt;br /&gt;
&amp;nbsp; &amp;nbsp; notify &amp;nbsp;=&amp;gt; Service[$servicename],&lt;br /&gt;
&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; service { $servicename:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ensure =&amp;gt; &#39;running&#39;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; enable =&amp;gt; true,&lt;br /&gt;
&amp;nbsp; }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
No arquivo ntp.conf, coloque o seguinte conteúdo&lt;br /&gt;
driftfile /var/lib/ntp/drift&lt;br /&gt;
restrict default kod nomodify notrap nopeer noquery&lt;br /&gt;
restrict -6 default kod nomodify notrap nopeer noquery&lt;br /&gt;
restrict 127.0.0.1&lt;br /&gt;
restrict -6 ::1&lt;br /&gt;
server br.pool.ntp.org&lt;br /&gt;
server a.ntp.br&lt;br /&gt;
includefile /etc/ntp/crypto/pw&lt;br /&gt;
keys /etc/ntp/keys&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
E a última classe iremos mostrar algumas variaves&lt;br /&gt;
mkdir testtemplate/{files,manifests,templates}&lt;br /&gt;
&amp;nbsp;no arquivo init.pp, coloque assim:&lt;br /&gt;
&lt;br /&gt;
class testtemplate {&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;$key = &quot;teste com chave&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;#Vamos informar para criar o arquivo caso nao exista&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;file { &quot;variaveis&quot;:&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;path =&amp;gt; &quot;/tmp/variaveis.log&quot;,&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;owner &amp;nbsp; =&amp;gt; root,&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;group&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;=&amp;gt; users,&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;content =&amp;gt; template(&quot;/etc/puppet/modules/testtemplate/templates/variaveis.log.erb&quot;),&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
No aqruivo variaveis.log.erb, coloque assim&lt;br /&gt;
name = &amp;lt;%= @name %&amp;gt;&lt;br /&gt;
fqdn = &amp;lt;%= @fqdn %&amp;gt;&lt;br /&gt;
memoryfree = &amp;lt;%= @memoryfree %&amp;gt;&lt;br /&gt;
so = &amp;lt;%= @operatingsystem %&amp;gt;&lt;br /&gt;
virtual = &amp;lt;%= @virtual %&amp;gt;&lt;br /&gt;
puppetmaster = &amp;lt;%= @puppetmaster %&amp;gt;&lt;br /&gt;
ip = &amp;lt;%= @ipaddress %&amp;gt;&lt;br /&gt;
key = &amp;lt;%= @key %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Agora vamos editar o arquivo modules.pp &quot;/etc/puppet/manifests/modules.pp&lt;br /&gt;
e insira o seguinte:&lt;br /&gt;
&lt;br /&gt;
import testtemplate&lt;br /&gt;
import ntp&lt;br /&gt;
&lt;br /&gt;
em nodes.pp inclua as classes no client1&lt;br /&gt;
node &#39;client1.interop.local&#39; inherits basenode {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;include helloword::file&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;include ntp&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;include testtemplate&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
execute o comando puppetd agent --test --ignorecache ou espere por 3 minutos a sincronização e verifique o arquivo /tmp/variaveis.log&lt;br /&gt;
cat /tmp/variaveis.log&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Feito isso, estamos com nosso server puppet testado com algumas classes criadas e com a hora sincronizada.&lt;br /&gt;
&lt;br /&gt;
Podemos fazer muitas outras coisas com o puppet, veremos num próximo artigo.&lt;br /&gt;
&lt;br /&gt;
link da &lt;a href=&quot;http://rafaeltomelin.blogspot.com.br/2012/08/puppet-gerenciamento-e-configuracao.html&quot;&gt;parte 1&lt;/a&gt;&lt;br /&gt;
Deixe o seu comentário sobre este artigo.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://rafaeltomelin.blogspot.com/feeds/7477512172454640038/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://rafaeltomelin.blogspot.com/2012/08/puppet-criando-classes.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5785733457648885241/posts/default/7477512172454640038'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5785733457648885241/posts/default/7477512172454640038'/><link rel='alternate' type='text/html' href='http://rafaeltomelin.blogspot.com/2012/08/puppet-criando-classes.html' title='PUPPET - criando classes- parte 2'/><author><name>Rafael Tomelin</name><uri>http://www.blogger.com/profile/13705154019737635144</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5785733457648885241.post-3262308066023086720</id><published>2012-08-20T23:07:00.005-03:00</published><updated>2012-10-05T22:04:12.008-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Gerenciamento"/><category scheme="http://www.blogger.com/atom/ns#" term="puppet"/><title type='text'>PUPPET - Gerenciamento e configuração centraliazada</title><content type='html'>&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;PUPPET VISAO GERAL&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
O PUPPET é um sistema &quot;espetacular&quot;, que permite gerenciar e configurar servidores de formas centralizadas.&lt;br /&gt;
É possível apenas plugar o server na rede com o agent do PUPPET e em minutos o server está configurado conforme pré-definido.&lt;br /&gt;
&lt;br /&gt;
O serviço trabalha do modo server-client. O PUPPET foi desenvolvido na plataforma RUBY e com isso funciona em muitos sistemas.&lt;br /&gt;
&lt;br /&gt;
Ao configurar um cliente é necessário criar uma chave criptografada que será importada no server (iremos ver posteriormente) e com isso torna sua comunicação segura.&lt;br /&gt;
&lt;br /&gt;
Então vamos ao que interessa....&lt;br /&gt;
&lt;br /&gt;
Estarei escrevendo 4 artigos referente ao assunto, nos quais são eles&lt;br /&gt;
1) Introdução e instalação (server + client)&lt;br /&gt;
2) Configuração (server + 2 clients)&lt;br /&gt;
3) Configuração um pouco mais avançada e uma interface gráfica&lt;br /&gt;
4) Por último a configuração avançada&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Funcionamento do PUPPET&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
O gerenciamento do PUPPET pode ser das seguintes (grupos de hosts, grupos de aplicativos, hosts, tipos de servidores, testes entre muitos outros).&lt;br /&gt;
&lt;br /&gt;
É muito importante que o PUPPET consiga revolver nome master/clients, ou seja, é necessário de um servidor de DNS (não será mostrado a instalação e configuração do serviço neste tutorial)&lt;br /&gt;
&lt;br /&gt;
No servidor master (daqui para frente o servidor PUPPET master, será apenas chamado de master) seu diretóri de configuração fica em /etc/puppet e tem a seguinte hierarquia de diretórios:&lt;br /&gt;
&lt;br /&gt;
/etc/puppet&lt;br /&gt;
&amp;nbsp; &amp;nbsp; -&amp;nbsp;site.pp&lt;br /&gt;
&amp;nbsp; &amp;nbsp; - manifests&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; - init.pp&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; -&amp;nbsp;nodes.pp&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; -&amp;nbsp;classes.pp&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; -&amp;nbsp;outras classes.pp&lt;br /&gt;
&amp;nbsp; &amp;nbsp; - modules&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; -&amp;nbsp;Aqui se tem a mesma hierarquia do /etc/puppet, porém para um determinado modulo:&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; -&amp;nbsp;apache&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; -&amp;nbsp;manifest, templates, ....&lt;br /&gt;
&amp;nbsp; &amp;nbsp; - templates&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; -&amp;nbsp;template.erb&lt;br /&gt;
&amp;nbsp; &amp;nbsp; - files&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; -&amp;nbsp;files&lt;br /&gt;
&amp;nbsp; &amp;nbsp; - tests&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; -&amp;nbsp;init.pp&lt;br /&gt;
&lt;br /&gt;
Agora que conhecem um pouco da estrutura, vamos em frente. &amp;nbsp;Irei explicar o que fazer cada arquivo e diretório da estrutura um pouco mais a frente, agora vamos a instalação.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Instalando o PUPPET no MASTER no Centos 6&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Após instalado o Centos 6, é importante que desabilite o selinux e firewall do master e client01 (um dos clientes irei chamar de client01).&lt;br /&gt;
Muito importante, os hosts precisam estar resolvendo os seus respectivos nomes.&lt;br /&gt;
Faça um testes com os seguintes comandos:&lt;br /&gt;
hostname&lt;br /&gt;
hostname -a&lt;br /&gt;
&lt;br /&gt;
Se ambos os comandos estiverem funcionando, perfeito, siga em frente. senão, para por aqui e ajuste.&lt;br /&gt;
&lt;br /&gt;
1) Instalando alguns pacotes necessários. (irei colocar o serviço de DNS no meu próprio servidor master com a zona teclinux.local)&lt;br /&gt;
&lt;table bgcolor=&quot;#111&quot; border=&quot;1&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;yum -y install wget vim openssh-clients rsync system-config-firewall-tui.noarch system-config-network ntsysv ntpdate bind-chroot bind-utils&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
2) Instalação do repositório EPEL&lt;br /&gt;
&lt;table bgcolor=&quot;#111&quot; border=&quot;1&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-7.noarch.rpm&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
3) Criando o repositório do PUPPET&lt;br /&gt;
&lt;table bgcolor=&quot;#111&quot; border=&quot;1&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;cat &amp;gt; /etc/yum.repos.d/puppet.repo &amp;lt;&amp;lt; &quot;EOF&quot;&lt;br /&gt;
[puppetlabs]&lt;br /&gt;
name=Puppet Labs Packages&lt;br /&gt;
baseurl=http://yum.puppetlabs.com/el/$releasever/products/$basearch/&lt;br /&gt;
enabled=1&lt;br /&gt;
gpgcheck=1&lt;br /&gt;
gpgkey=http://yum.puppetlabs.com/RPM-GPG-KEY-puppetlabs&lt;br /&gt;
EOF
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
4) Limpando o cache do yum&lt;br /&gt;
&lt;table bgcolor=&quot;#111&quot; border=&quot;1&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;yum clean all&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
5) Instalando o serviço do puppet server&lt;br /&gt;
&lt;table bgcolor=&quot;#111&quot; border=&quot;1&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;yum -y install puppet-server&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
Após esses 5 passos o master já está instalado, vamos apenas fazer alguns ajustes.&lt;br /&gt;
&lt;br /&gt;
Em /etc/puppet/puppet.conf, iremos acrescentar as seguintes linhas:&lt;br /&gt;
Abaixo da tag [prodution], coloque o seguinte:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; modulepath = /etc/puppet/modules #indica onde está os modulos que serão configurados&lt;br /&gt;
&lt;br /&gt;
E vamos criar uma tag test&lt;br /&gt;
[tests] &amp;nbsp;#Podendo copiar a tag production, poŕem os modulos irão ficar assim:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; modulepath = /etc/puppet/tests/modules&lt;br /&gt;
&lt;br /&gt;
Perfeito, agora já podemos reinicar o serviço&lt;br /&gt;
&lt;table bgcolor=&quot;#111&quot; border=&quot;1&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;service puppetmaster start&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Instalando o PUPPET no CLIENT no Centos 6&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Podemos seguir os passos 1 até 4, sendo que no passo 1, não pe necessário instalar o serviço do bind&lt;br /&gt;
&lt;br /&gt;
No passo 5 iremos instalar o client&lt;br /&gt;
&lt;br /&gt;
Instalando o serviço do puppet client&lt;br /&gt;
&lt;table bgcolor=&quot;#111&quot; border=&quot;1&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;yum -y install puppet&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
Após instalado, em /etc/sysconfig/puppet, deixe assim os seguintes itens:&lt;br /&gt;
PUPPET_SERVER= master.teclinux.local&lt;br /&gt;
PUPPET_LOG = /var/log/puppet/puppet.log&lt;br /&gt;
&lt;br /&gt;
Já no arquivo de configuração /etc/puppet/puppet.conf, deixe assim, além dos itens já descomentados:&lt;br /&gt;
[agent]&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; report = true # irá reportar as informações ao master&lt;br /&gt;
&amp;nbsp; &amp;nbsp; server =master.teclinux.local &amp;nbsp;# servidor master&lt;br /&gt;
&amp;nbsp; &amp;nbsp; runinterval = 180 # intervalo de atualização - 3min&lt;br /&gt;
&amp;nbsp; &amp;nbsp; splaylimit = 180&amp;nbsp;# intervalo de atualização - 3min&lt;br /&gt;
&lt;br /&gt;
Pronto, nosso client01 está configurado, vamos inicar o mesmo.&lt;br /&gt;
&lt;table bgcolor=&quot;#111&quot; border=&quot;1&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;service puppet start&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Sincronizando o MASTER/CLIENT01&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
O serviços já estão configurado, agora basta fazer a sincronização de chave entre os dois hosts.&lt;br /&gt;
&lt;br /&gt;
No client01, podemos listar a chave que já foi enviada para o master, da seguinte forma:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Listando a chave que foi enviada para o master&lt;br /&gt;
&lt;table bgcolor=&quot;#111&quot; border=&quot;1&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;puppetca --list&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br class=&quot;Apple-interchange-newline&quot; /&gt;
No master, iremos aceitar a chave&lt;br /&gt;
&lt;table bgcolor=&quot;#111&quot; border=&quot;1&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;puppetca --sign client01.teclinux.local&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Os seguintes comandos funcionam no master&lt;br /&gt;
puppet&lt;br /&gt;
puppetd&lt;br /&gt;
puppetca&lt;br /&gt;
puppetmaster&lt;br /&gt;
&lt;br /&gt;
Faço um tur pelo o help de cada comando&lt;br /&gt;
&lt;br /&gt;
Os mesmos comandos funcionam no client01, exceto o puppetmaster&lt;br /&gt;
&lt;br /&gt;
Com isso temos nosso servidor configurado e funcionando.&lt;br /&gt;
No próximo artigo estarei mostrando a configuração.&lt;br /&gt;
&lt;br /&gt;
Até mais pessoal, e em breve sai um novo artigo sobre o puppet.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
site oficial: www.puppetlabs.com</content><link rel='replies' type='application/atom+xml' href='http://rafaeltomelin.blogspot.com/feeds/3262308066023086720/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://rafaeltomelin.blogspot.com/2012/08/puppet-gerenciamento-e-configuracao.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5785733457648885241/posts/default/3262308066023086720'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5785733457648885241/posts/default/3262308066023086720'/><link rel='alternate' type='text/html' href='http://rafaeltomelin.blogspot.com/2012/08/puppet-gerenciamento-e-configuracao.html' title='PUPPET - Gerenciamento e configuração centraliazada'/><author><name>Rafael Tomelin</name><uri>http://www.blogger.com/profile/13705154019737635144</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5785733457648885241.post-9044132998166708912</id><published>2011-10-02T08:13:00.000-03:00</published><updated>2012-10-05T22:04:44.183-03:00</updated><title type='text'>HOWTO – INSTALAÇÃO DO POSTFIX COM SPAMASSASSIN, POSTGREY, AMAVIS, RAZOR, PYZOR, DCC, CLAMAV, DSPAM</title><content type='html'>&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;INTRODUÇÃO&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Neste howto,
explicarei um pouco sobre o postfix e seus serviços complementares
tais como SPAMASSASSIN, AMAVIS, SASL, TLS, entre outros. Irei dar uma
brevia explicação de cada componente a ser instalado na media em
que iremos implementando.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Vamos implementar
os serviços e em seguida testar o mesmo, com isso creio que fiquei
mais claro como funciona cada item.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;No final teremos
um servidor de e-mail completo e robusto.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Lembrabdo que eu
estarei utilizando o Centos5.5, mas em questão de configuração não
muda para outras distribuição, o que muda é a forma de instalação
e talvez alguns diretórios.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;O servidor de
e-mail está conectado da rede 192.168.1.0/24 e com ip 192.168.1.100,
essas informações irão ser necessárias mais a frente. Estarei
utilizando o meu domínio como exemplo - example.com - com o nome do
servidor de e-mail - mail01 -, sendo o nome do servidor FQDN
mail01.example.com.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Informações:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;REDE:192.168.1.0/24&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;IP:192.168.1.100&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;DOMINIO:
example.com&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;HOSTNAME: mail01&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;HOSTNAME FQDN:
mail01.example.com&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Então vamos
começar a montar nosso servidor de e-mail, e a melhor forma para
fazer isso é começando pelo postfix com a configuração básica.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;POSTFIX&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Vamos começar
instalando o postfix e depois configurando o mesmo.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Instalação é
bem simples via o repositório do CentOS:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;yum
-y install postfix&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;O Postfix tem
muitos comandos que nos auxiliam nas configurações, lista a fila de
e-mails, excluir e-mails da file entre outros, como comentado
anteriormente, conforme vamos avançando nas configurações vamos
vendos os recursos.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Agora iremos
entrar no diretório /etc/postfix &amp;nbsp;e criar um diretório backup
e copiar todos os arquivos para esse diretório.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Fazendo o backup
dos arquivos originais&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;cd
/etc/postfix&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;mkdir
backup&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;cp
* backup/&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Vamos remover o
arquivo main.cf e criar um novo sem os comentários padrão.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;rm
main.cf&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;- Agora vamos
apenas criar o arquivo touch main.cf&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;- Vamos ver as
configurações padrões que o postfix tem, com o comando postconf.
&amp;nbsp;Esse comando lista toda a configuração aceitas pelo postfix.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;- Vamos executar o
comando postconf -n, esse comando deveria listar as regras do arquivo
main.cf, mas como esse arquivo está vazio, irá apenas retornar o
diretório padrão do postfix.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Bom pessoal, vamos
criar o nosso arquivo main.cf com configurações básicas e com o
tempo vamos implementado mais funcionalidades a ele.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Iremos usar em
cada bloco de configuração as chamadas ###INCIO BLOCO numero### e
depois da configuração iremos colocar ###FIM BLOCO numero###, isso
para que no próximo passo ao invés de copiar todo o bloco, iremos
apenas citar como ###BLOCO numero###, aí iremos saber se temos que
inserir o BLOCO anterior mais o atual.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;###INICIO
BLOCO 1###&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;alias_database
= hash:/etc/aliases&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;command_directory
= /usr/sbin&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;config_directory
= /etc/postfix&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;daemon_directory
= /usr/libexec/postfix&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;home_mailbox
= Maildir/&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;inet_interfaces
= all&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;mail_name
= Postfix&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;mail_owner
= postfix&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;mail_spool_directory
= /var/mail&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;mail_version
= 2.3.3&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;mailq_path
= /usr/bin/mailq&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;manpage_directory
= /usr/local/man&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;mydestination
= $myhostname, localhost.$mydomain, localhost&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;mydomain
= example2.com&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;myhostname
= mail01.example2.com&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;mynetworks
= 127.0.0.0/8 192.168.1.0/24&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;mynetworks_style
= subnet&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;myorigin
= $myhostname&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;nested_header_checks
= $header_checks&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;newaliases_path
= /usr/bin/newaliases&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;queue_directory
= /var/spool/postfix&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;sendmail_path
= /usr/sbin/sendmail&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;###FIM
BLOCO 1###&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;chkconfig
postfix on&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;service
postfix star&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Fazendo os testes
de envio, bem básico.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;O bom é fazer o
teste com o GMAIL, pois ele não barra os e-mail, no máximo
classifica como Spam. &amp;nbsp;Se for fazer testes com o terra, hotmail,
yahoo o seu servidor já tem que estar bem configura, como ainda não
é o nosso caso, vamos testando com o GMAIL.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Podemos utilizar o
comando mail para enviar e-mails via linha de comando. A sintaxe é:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;mail
-s &quot;aqui o subject do email&quot; emaildodestinatio@dominio.com&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;texto
de teste&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;#Isso
mesmo, aqui vai um ponto final, para indicar final do e-mail&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Após executar
esse comando vamos verificar os logs do postfix para ver se o mesmo
enviou a mensagem. &amp;nbsp;No meu caso enviei a mensagem para o meu
e-mail do google.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Vamos visualizar
os logs com o comando tail –f /var/log/maillog&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;tail
-f /var/log/maillog&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Jan 20 23:30:54
mail01 sendmail[2477]: alias database /etc/aliases rebuilt by root&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Jan 20 23:30:54
mail01 sendmail[2477]: /etc/aliases: 76 aliases, longest 10 bytes,
765 bytes total&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Jan 20 23:30:55
mail01 postfix/postfix-script: starting the Postfix mail system&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Jan 20 23:30:55
mail01 postfix/master[2523]: daemon started -- version 2.3.3,
configuration /etc/postfix&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Jan 20 23:31:41
mail01 sendmail[2530]: p0L1VfCG002530: from=root, size=89, class=0,
nrcpts=1,
msgid=&amp;lt;201101210131.p0L1VfCG002530@mail01.example.com&amp;gt;,
relay=root@localhost&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Jan 20 23:31:41
mail01 postfix/smtpd[2532]: warning: dict_nis_init: NIS domain name
not set - NIS lookups disabled&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Jan 20 23:31:41
mail01 postfix/smtpd[2532]: connect from
mail01.example.com[127.0.0.1]&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Jan 20 23:31:41
mail01 postfix/smtpd[2532]: C91311181F9:
client=mail01.example.com[127.0.0.1]&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Jan 20 23:31:41
mail01 postfix/cleanup[2535]: C91311181F9:
message-id=&amp;lt;201101210131.p0L1VfCG002530@mail01.example2.com&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Jan 20 23:31:41
mail01 postfix/qmgr[2526]: C91311181F9: from=, size=604, nrcpt=1
(queue active)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Jan 20 23:31:41
mail01 sendmail[2530]: p0L1VfCG002530: to=rafael@example.com,
ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay,
pri=30089, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (Ok:
queued as C91311181F9)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Jan 20 23:31:41
mail01 postfix/smtpd[2532]: disconnect from
mail01.example.com[127.0.0.1]&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Jan 20 23:31:53
mail01 postfix/smtp[2536]: C91311181F9: to=,
relay=aspmx.l.google.com[74.125.67.27]:25, delay=11,
delays=0.07/0.04/2.6/8.8, dsn=2.0.0, status=sent (250 2.0.0 OK
1295573514 q42si19975736ybk.22)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Jan 20 23:31:53
mail01 postfix/qmgr[2526]: C91311181F9: removed&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Reparem que na
linha 4 aparece a versão do nosso postfix e na linha 5 o email foi
enviado como rafael@mail01.example.com.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;1) Podemos
desabilitar a versão do postfix mudando o texto da flag
mail_version, vamos deixar o texto como &quot;Not display version&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;2) O hostname +
domínio está aparecendo, pois em myorigin &quot;onde completa o
usuário + domínio&quot; está inserido com a variável hostname,
vamos mudar deixando a variável como $mydomain&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Então nossas
mudanças ficaram da seguinte forma:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;mail_version =
&quot;Not display version&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;myorigin =
$mydomain&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Após essas
mudanças vamos reiniciar o postfix e fazer os testes com a mensagem
novamente&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;postfix
reload&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;mail
-s &quot;aqui o subject do email&quot; destinatario@dominio.com&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;texto
de teste&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;O arquivo de log
deve ser assim:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Jan 20 23:40:31
mail01 sendmail[2701]: alias database /etc/aliases rebuilt by root&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Jan 20 23:40:31
mail01 sendmail[2701]: /etc/aliases: 76 aliases, longest 10 bytes,
765 bytes total&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Jan 20 23:40:32
mail01 postfix/postfix-script: starting the Postfix mail system&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Jan 20 23:40:32
mail01 postfix/master[2747]: daemon started -- version &quot;Not
display version&quot;, configuration /etc/postfix&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Jan 20 23:40:58
mail01 sendmail[2753]: p0L1ewIZ002753: from=root, size=78, class=0,
nrcpts=1, msgid=&amp;lt;201101210140.p0L1ewIZ002753@example.com&amp;gt;,
relay=root@localhost&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Jan 20 23:40:58
mail01 postfix/smtpd[2754]: warning: dict_nis_init: NIS domain name
not set - NIS lookups disabled&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Jan 20 23:40:58
mail01 postfix/smtpd[2754]: connect from
mail01.example.com[127.0.0.1]&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Jan 20 23:40:59
mail01 postfix/smtpd[2754]: 06CE31181F9:
client=mail01.example.com[127.0.0.1]&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Jan 20 23:40:59
mail01 postfix/cleanup[2757]: 06CE31181F9:
message-id=&amp;lt;201101210140.p0L1ewIZ002753@example.com&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Jan 20 23:40:59
mail01 postfix/qmgr[2750]: 06CE31181F9: from=, size=596, nrcpt=1
(queue active)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Jan 20 23:40:59
mail01 sendmail[2753]: p0L1ewIZ002753: to=rafael@example.com,
ctladdr=root (0/0), delay=00:00:01, xdelay=00:00:01, mailer=relay,
pri=30078, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (Ok:
queued as 06CE31181F9)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Jan 20 23:40:59
mail01 postfix/smtpd[2754]: disconnect from
mail01.example.com[127.0.0.1]&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Jan 20 23:41:01
mail01 postfix/smtp[2758]: 06CE31181F9: to=,
relay=aspmx.l.google.com[74.125.157.27]:25, delay=2.6,
delays=0.08/0.04/1.2/1.3, dsn=2.0.0, status=sent (250 2.0.0 OK
1295574063 c14si19952414anc.148)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Jan 20 23:41:01
mail01 postfix/qmgr[2750]: 06CE31181F9: removed&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Nosso servidor de
e-mail está funcionando, porém não tem nenhum tipo de restrição,
ou seja, está recebendo tudo que é e-mail. &amp;nbsp;Vamos mostrar aqui
algumas restrições a serem feitas no próprio postfix.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;#Exige que o
client smtp se identifique com EHLO ou HELO smtpd_delay_reject = yes&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;smtpd_helo_required
= yes&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;smtpd_helo_restrictions
= permit_mynetworks, reject_invalid_helo_hostname,
reject_unknown_helo_hostname, permit&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;#A
RFC 821 - Exige que os enderecos sejam &quot;envelopados&quot; ou
contidos por &amp;lt;&amp;gt;.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;strict_rfc821_envelopes
= yes&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;#
recusar servidores com relay aberto&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;maps_rbl_reject_code
= 554&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;#Aqui
informamos que está liberado apenas para a nossa rede&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;smtpd_restriction_classes
= permit_mynetworks, reject&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;#
Aqui informamos que nao aceite e-mail de domínios que não existam,
DNS mal configurados, restringi domínios inválidos, excetos
localhost ou IPs da nossa rede&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;smtpd_sender_restrictions
= check_sender_access hash:/etc/postfix/sender_restrictions,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;reject_unlisted_sender,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;permit_mynetworks,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;reject_unknown_sender_domain
,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;reject_non_fqdn_sender
,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;reject_unauth_pipelining&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;#OBS.:
no arquivo /etc/postfix/sender_restrictions apenas informamos o IP
127.0.01 e ok, ficando da seguinte forma:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;127.0.0.1
OK&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;#
Aqui informamos que não aceite e-mail de domínios que não existam,
DNS mal configurados, restringi domínios inválidos, verifica
domínios com relay aberto excetos localhost ou IPs da nossa rede&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;smtpd_recipient_restrictions
= check_recipient_access&amp;nbsp; reject_unauth_pipelining,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;reject_non_fqdn_recipient,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;reject_unknown_recipient_domain,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;permit_mynetworks,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;reject_unauth_destination,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;check_sender_access&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;span style=&quot;font-family: Times New Roman;&quot;&gt;hash:/etc/postfix/sender_access,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;reject_rbl_client
maps_rbl_domains,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;reject_unverified_recipient&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;permit&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;#OBS.: no arquivo
/etc/postfix/recipient_restrictions, apenas informamos o IP 127.0.01
e ok, ficando da seguinte forma:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;127.0.0.1 OK&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;# Verifica relays
, PTR DNS e Lista de Adsls&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;smtpd_client_restrictions
= &amp;nbsp; &amp;nbsp; check_client_access hash:/etc/postfix/client_access,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;permit_mynetworks&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;reject_rbl_client
maps_rbl_domains,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;reject_unknown_client&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;#OBS.: no arquivo
/etc/postfix/client_restrictions, apenas informamos os IP de nossas
interfaces de rede e nosso IP válido e ok, ficando da seguinte
forma:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;127.0.0.1 OK&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;192.168.1.10 OK&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;187.x.x.x OK&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;# Checa SPAM&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;maps_rbl_domains
= &amp;nbsp;relays.ordb.org,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;opm.blitzed.org,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;list.dsbl.org,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;sbl.spamhaus.org,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;blackholes.easynet.nl,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;bl.spamcop.net,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;xbl.spamhaus.org,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;zen.spamhaus.org,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;cbl.abuseat.org,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;zombie.dnsbl.sborbs.net,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;rbl.maps.vix.com,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;dul.maps.vix.com,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;relays.mail-abuse.org&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;LEMBRANDO que os
arquivos indicados nos parâmetros hash:/etc/postfix/arquivo, é
necessário gerar a base dos mesmos com o comando postmap da seguinte
forma:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;postmap
/etc/postfix/arquivo&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Esses seriam algum
dos parâmetros para deixar nosso servidor de e-mail - POSTFIX - mais
robusto.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Então o main.cf
irá ficar da seguinte forma, após essas mudanças.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;###BLOCO
1###&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;###INICIO
BLOCO 2###&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;#Restrições&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;smtpd_helo_required
= yes&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;smtpd_helo_restrictions
= permit_mynetworks, reject_invalid_helo_hostname,
reject_unknown_helo_hostname&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;strict_rfc821_envelopes
= yes&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;maps_rbl_reject_code
= 554&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;smtpd_sender_restrictions
= check_sender_access hash:/etc/postfix/sender_restrictions,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;reject_unlisted_sender,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;permit_mynetworks,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;reject_unknown_sender_domain
,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;reject_non_fqdn_sender
,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;reject_unauth_pipelining&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;smtpd_recipient_restrictions
= check_recipient_access hash:/etc/postfix/recipient_restrictions,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;reject_unauth_pipelining,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;reject_non_fqdn_recipient,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;reject_unknown_recipient_domain,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;permit_mynetworks,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;reject_unauth_destination,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;check_sender_access&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;span style=&quot;font-family: Times New Roman;&quot;&gt;hash:/etc/postfix/sender_access,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;reject_rbl_client
maps_rbl_domains,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;reject_unverified_recipient&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;permit&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;smtpd_client_restrictions
= &amp;nbsp; &amp;nbsp; check_client_access hash:/etc/postfix/client_access,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;permit_mynetworks&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;reject_rbl_client
maps_rbl_domains,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;reject_unknown_client&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;maps_rbl_domains
= &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;relays.ordb.org,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;opm.blitzed.org,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;list.dsbl.org,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;sbl.spamhaus.org,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;blackholes.easynet.nl,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;bl.spamcop.net,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;xbl.spamhaus.org,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;zen.spamhaus.org,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;cbl.abuseat.org&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;###FIM
BLOCO 2###&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Aqui acabamos de
configurar nosso o postfix funcional, mas o nosso próximo passo é
configurar a autenticação via SASL.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;SASL&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;O SASL faz com o
que nosso servidor exija autenticação para o envio de e-mails. No
Postfix é necessário utilizar o SASL (Simple Authentication and
Security Layer) que oferece diversos métodos de autenticação, cada
um com suas características.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Para saber se
nosso postfix tem suporte ao Cyrus SASL, podemos executar o comando
postconf -a | grep cyrus e ele tem que nos retorno o cyrus.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Ex.:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;postconf
-a | grep cyrus&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;cyrus&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Vamos verificar se
o Cyrus SASL já está instalado em nosso servidor, com o comando rpm
-qa&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;rpm
-qa | grep sasl&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;cyrus-sasl-md5-2.1.22-5.el5_4.3&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;cyrus-sasl-lib-2.1.22-5.el5_4.3&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;cyrus-sasl-devel-2.1.22-5.el5_4.3&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;cyrus-sasl-plain-2.1.22-5.el5_4.3&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;cyrus-sasl-2.1.22-5.el5_4.3&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Caso não apareçam
todos esses pacotes, vamos instalar o que faltou com o comando yum&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;yum
-y install cyrus-sasl-md5 cyrus-sasl-lib cyrus-sasl-devel
cyrus-sasl-plain cyrus-sasl&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Depois de
instalado os pacotes do Cyrus SASL, vamos começar a brincadeira, de
autenticar o Postfix para envio de e-mails.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Para que possamos
trabalhar com autenticação no Postfix, é necessário criar o
arquivo /usr/lib/sasl2/smtpd.conf com o seguinte conteúdo&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;touch
/usr/lib/sasl2/smtpd.conf&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;pwcheck_method:
saslauthd&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;mech_list:
PLAIN LOGIN CRAM-MD5 DIGEST-MD5 &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;log_level:
3&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;b&gt;pwcheck_method:
saslauthd&lt;/b&gt; #Informa o tipo de autenticação que nesse caso é um
daemon do cyrus&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;b&gt;mech_list:
PLAIN LOGIN CRAM-MD5 DIGEST-MD5 #&lt;/b&gt;Tipo de criptografia, sendo
Outlook e Microsoft Outlook trabalha apenas com PLAIN e LOGIN. &amp;nbsp;Nesse
caso o client de e-mail sempre verifica o tipo de criptografia mais
alto suportado por ele e utiliza o mesmo, No caso de um cliente
suporte o CRAM-MD5, ele irá usar o CRAM-MD5 ao invés de PLAIN ou
LOGUN &lt;/span&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;b&gt;log_level: 3&lt;/b&gt;
#Nível de log&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Após ter
configurado o SASL, vamos iniciar o mesmo manualmente com o comando
“saslauthd -a shadow –d”, para ver se não ira apresentar
nenhum erro. O comando executado é saslauthd -a shadow -d e tem que
aparecer algo tipo o exemplo abaixo:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;saslauthd
-a shadow -d&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;saslauthd[3743]
:main &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: num_procs &amp;nbsp;: 5&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;saslauthd[3743]
:main &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: mech_option: NULL&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;saslauthd[3743]
:main &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: run_path &amp;nbsp; :
/var/run/saslauthd&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;saslauthd[3743]
:main &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: auth_mech &amp;nbsp;:
shadow&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;saslauthd[3743]
:ipc_init &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: using accept lock file:
/var/run/saslauthd/mux.accept&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;saslauthd[3743]
:detach_tty &amp;nbsp; &amp;nbsp; &amp;nbsp;: master pid is: 0&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;saslauthd[3743]
:ipc_init &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: listening on socket:
/var/run/saslauthd/mux&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;saslauthd[3743]
:main &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: using process model&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;saslauthd[3744]
:get_accept_lock : acquired accept lock&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;saslauthd[3743]
:have_baby &amp;nbsp; &amp;nbsp; &amp;nbsp; : forked child: 3744&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;saslauthd[3743]
:have_baby &amp;nbsp; &amp;nbsp; &amp;nbsp; : forked child: 3745&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;saslauthd[3743]
:have_baby &amp;nbsp; &amp;nbsp; &amp;nbsp; : forked child: 3746&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;saslauthd[3743]
:have_baby &amp;nbsp; &amp;nbsp; &amp;nbsp; : forked child: 3747&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Dando tudo certo,
vamos colocar o sasl a iniciar automaticamente com o sistema da
seguinte forma&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;chkconfig
saslauthd on&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Vamos deixar o
run_path &quot;/var/run/saslauthd&quot; com permissão para o postfix
acessar o mesmo também&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;chmod
750 /var/run/saslauthd&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;chgrp
postfix /var/run/saslauthd&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;###INICIO
BLOCO 3###&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;#Habilitando
autenticação via sasl no postfix&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;smtpd_sasl_auth_enable
= yes&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;#Tipo
de mecanismo a ser utilizado na autenticação&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;smtpd_sasl_security_options
= noanonymous&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;#Permite
o Postfix oferecer SMTP AUTH a clientes sem suporte&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;broken_sasl_auth_clients
= yes&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;#Permiti
limitar usuário apenas do dominio a se autenticarem&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;smtpd_sasl_local_domain
= $mydomain&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;###FIM
BLOCO 3###&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;# Por ultimo,
vamos inserir o seguinte item &quot;permit_sasl_authenticated&quot;
antes de permit_mynetworks, nos parâmetros
&amp;nbsp;smtpd_restriction_classes, smtpd_sender_restrictions,
smtpd_recipient_restrictions, smtpd_client_restrictions.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Exemplo:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;smtpd_sender_restrictions
= check_sender_access hash:/etc/postfix/sender_restrictions,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;reject_unlisted_sender,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;permit_sasl_authenticated,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;permit_mynetworks,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;reject_unknown_sender_domain
,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;reject_non_fqdn_sender
,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;reject_unauth_pipelining&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Com isso podemos
reiniciar o nosso serviço de postfix, pois as novas configurações
já estarão valendo.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Nosso servidor de
e-mail agora já está mais seguro, sendo necessário fazer
autenticação no mesmo. &amp;nbsp;Poemos ainda aumentar a segurança
incluindo o sistema de TLS, onde iremos proteger as strings enviadas
no momento da autenticação.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;HABILITANDO
O TLS&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Vamos então
configurar o TLS, para que as autenticações não passem na rede com
pouca segurança. Nesse caso o TLS irá criptografar os dados.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Primeiramente
vamos criar o diretório /etc/postfx/tls, esse diretório é onde irá
ficar os certificados. Depois iremos criar o certificado e assinar o
mesmo. Ao criar o certificado será necessário digitar uma palavra
ou frase no qual será utilizado em todo o processo de criação do
certificado. Também será necessário responder algumas perguntas,
tais como Região da empresa, nome da empresa, email do
administrador.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;mkdir
/etc/postfix/tls&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;openssl
genrsa -des3 -rand /etc/hosts -out smtpd.key 2048&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;openssl
req -new -key smtpd.key -out smtpd.csr&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;openssl
x509 -req -days 3650 -in smtpd.csr -signkey smtpd.key -out smtpd.crt&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;openssl
rsa -in smtpd.key -out smtpd.key.unencrypted&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;mv
-f smtpd.key.unencrypted smtpd.key&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;openssl
req -new -x509 -extensions v3_ca -keyout cakey.pem -out cacert.pem
-days 3650&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Após termos
criado o certificado, vamos configurar o postfix para que o mesmo
trabalhe com TLS. Acesse o arquivo /etc/postfix/main.cf e insira as
seguintes linhas.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;###INICIO
BLOCO 4###&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;smtpd_use_tls
= yes&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;smtpd_tls_key_file
= /etc/postfix/tls/smtpd.key&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;smtpd_tls_cert_file
= /etc/postfix/tls/smtpd.crt&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;smtpd_tls_CAfile
= /etc/postfix/tls/cacert.pem&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;smtpd_tls_loglevel
= 3&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;smtpd_tls_received_header
= yes&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;smtpd_tls_session_cache_timeout
= 3600s&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;tls_random_source
= dev:/dev/urandom&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;smtpd_sasl_tls_security_options
= noanonymoys&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;###FIM
BLOCO 4###&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Vamos também
habilitar o smtps. Para habilitar o smtps é necessário editar o
arquivo /etc/postfix/master.conf&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Edite o arquivo
master.conf e localize a entrada de submission e deixe assim:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;submission
&amp;nbsp; &amp;nbsp;inet &amp;nbsp;n &amp;nbsp; &amp;nbsp; &amp;nbsp; - &amp;nbsp; &amp;nbsp; &amp;nbsp;
n &amp;nbsp; &amp;nbsp; &amp;nbsp; - &amp;nbsp; &amp;nbsp; &amp;nbsp; - &amp;nbsp; &amp;nbsp; &amp;nbsp;
smtpd&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;-o
smtpd_enforce_tls=yes&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;-o
smtpd_sasl_auth_enable=yes&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;-o
smtpd_client_restrictions=permit_sasl_authenticated,reject&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Obs.: O submission
usa a porta 587, ele é usado para autenticação dos clientes
(usuários e webmails), já o SMTP porta 25 é usado para comunicação
entre servidores.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;
&amp;nbsp; &amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Essas
novas regras já são aplicadas pela maioria dos grandes provedores e
está na RFC 2476.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Nosso arquivo
final do main.cf ficaria da seguinte forma:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;###BLOCO 1###&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;###BLOCO 2###&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;###BLOCO 3###&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;###BLOCO 4###&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Com isso
terminamos a configuração de autenticações no Postfix, vamos
agora configurar os serviços complementares no qual irão verificar
as questões de spam e vírus.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;CONTROLE
DE SPAM E VÍRUS&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Aparti de agora
iremos configurar todos os componentes que trabalham para bloquear
SPAM e VÍRUS. Sendo que vamos ter que fazer algumas alterações nos
arquivos do Postfix, pois eles trabalham integrados com ele.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Uma das principais
ferramentas que iremos instalar é o AMAVIS, ela nada mais faz do que
integração com o Postfix e gerencia dos outros componentes do tipo
(spamassassin, clamav, ..).&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;SPAMASSASSIN&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Vamos começar a
instalação pelo o SpamAssassin, esse é &amp;nbsp;um dos melhores
serviços contra SPAm, se não o melhor.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Para a instalação
do SpamAssassin é necessário instalarmos algumas dependências via
console perl. Vamos então começar, entrando na conxole do PERL.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Se você nunca
acesso a console do PERL anteriormente é necessário responder
algumas perguntas, pode ir dando ENTER em todas as perguntas, exceto
onde pede para você escolher (FOLLOW,ASK,...), aqui você escolhe
FOLLOW.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;Perl
–MCPAN –e shell&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;install
Archive::Tar&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;install
Archive::Zip&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;install
Compress::Zlib&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;install
Compress::Raw::Zlib&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;install
Convert::TNEF&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;install
Convert::UUlib&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;install
MIME::Tools&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;install
MIME::Base64&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;install
MIME::Parser&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;install
Mail::Internet&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;install
Net::Server&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;install Net::SMTP&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;install
Digest::MD5&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;install
IO::Stringy&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;install
Time::HiRes&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;install
Unix::Syslog&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;install berkeleyDB&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;install
File::MMagic&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;install
Config::IniFiles&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;install Pod::Usage&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;install Foo::Bar&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;install
Digest::SHA1&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;install
Digest::HMAC&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;install Net:NS&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;install
HTML::Tagset&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;install
HTML::Parser&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;install
Mail::SPF::Query&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;install Mail::DKIM&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;install
Mail::SpamAssassin&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;install
Mail::SpamAssassin::Conf&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;install
Mail::SpamAssassin::Plugin&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;install
Mail::SpamAssassin::Plugin::DKIM&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;install
Mail::SpamAssassin::Plugin::Hashcash&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;install
Mail::SpamAssassin::Plugin::SPF&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;install
Mail::SpamAssassin::Plugin::URIDNSBL&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;install
Mail::SpamAssassin::Plugin::RelayCountry&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;install
Mail::SpamAssassin::ArchiveIterator&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;install
Mail::SpamAssassin::AutoWhitelist&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;install
Mail::SpamAssassin::Bayes&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;install
Mail::SpamAssassin::BayesStore&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;install
Mail::SpamAssassin::BayesStore::SQL&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;install
Mail::SpamAssassin::Conf::LDAP&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;install
Mail::SpamAssassin::Conf::Parser&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;install
Mail::SpamAssassin::Conf::SQL&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;install
Mail::SpamAssassin::Message&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;install
Mail::SpamAssassin::Message::Metadata&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;install
Mail::SpamAssassin::Message::Node&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;install
Mail::SpamAssassin::PerMsgLearner&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;install
Mail::SpamAssassin::PerMsgStatus&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;install
Mail::SpamAssassin::PersistentAddrList&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;install
Mail::SpamAssassin::SQLBasedAddrList&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;quit&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Após a instalação
das dependências, vamos fazer uma configuração básica,
habilitando alguns recusos que serão instalados posteriormente.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Vamos acessar as
configurações do SpamAssassin em
“/etc/mail/spamassassin/local.conf” e inserir o seguinte
conteúdo.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;required_hits
5.0&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;rewrite_header
Subject *****SPAM*****&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;report_safe
1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;use_bayes
1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;bayes_auto_learn
1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;bayes_path
/var/amavisd/.spamassassin/bayes&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;skip_rbl_checks
0&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;use_razor2
1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;use_dcc
1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;use_pyzor
1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;score
BAYES_99 4.300&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;score
BAYES_90 3.500&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;score
BAYES_80 3.000&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;score
RCVD_IN_SBL 1000&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;score
RCVD_IN_XBL 1000&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;#Seu(s)
IP(s)externo&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;trusted_networks
187.34.x.x&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;#Seu(s)
IP(s)interno&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;internal_networks
192.168.1.10&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;POSTGREY&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;O POSTGREY tem seu
funcionamento é bem simples, quando é enviado um e-mail para o seu
servidor ele envia uma mensagem informando para que o e-mail seja
enviado mais tarde, normalmente é o tempo padrão é de 5 minutos.
Esse processo acontece &amp;nbsp;apenas para o preimeiro e-mail do
destinatário num determinado tempo, normalmente 24horas.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Normalmente os
serviços de SPAM não tem o mecanismo de reenviar o e-mail, com isso
o POSTGREY remove uma boa parte dos SPAM.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Ex.:
O destinatário enviou um e-mail e esse caiu direto na greylist que
que pede ao destinatário enviar o e-mail daqui 5 minutos, após o
servidor do destinatário reenviar o email após os 5 minutos, o
e-mail do destinatário vai para uma greylist. Se o mesm o
destinatário envia uma e-mail após 12 horas, &amp;nbsp;esse e-mail irá
passar direto pela greylist, pois o e-mail já está na whitlist da
greylist. &amp;nbsp;Se esse destinatário não enviar mais e-mails
durante um período 24 horas ou mais, o e-mail do destinatário é
excluído aotomaticamente da greylist.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Vamos então
instalar o POSTGREY.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;yum
install postgrey&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;chkconfig
postgrey on&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;service
postgrey start&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;No arquivo
/etc/sysconfig/postgrey, vamos inserir a seguinte linha:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;OPTIONS=&quot;--unix=/var/spool/postfix/postgrey/socket
--delay=60&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Vamos agora editar
o arquivo main.cf do postfix “/etc/postfix/main.cf”&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;smtpd_recipient_restrictions
= permit_sasl_authenticated,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;permit_mynetworks,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;reject_unauth_destination,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;check_policy_service
unix:/var/spool/postfix/postgrey/socket&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;postfix
reload&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Após essas
alterações o Postfix já estará funcionan o com o Posgrey.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;AMAVIS&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Nesse próximo
passo iremos implementar o AMAVIS.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;O AMAVIS é um
intermediário entre o Postfix e seus componentes, onde o AMAVIS faz
todo o gerenciamento do SPAMASSASIN, CLAMAV, DSPAM, .... e se
necessário joga em uma whitelist, blacklis ou na quarentine.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;A implementação
do AMAVIS é bem simples, vamos configurar o conf e depois ajustar o
máster.conf do Postfix, para que chame o AMAVIS.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Primeiramente
vamos baixar o AMAVIS-NEW da seguinte forma:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;Wget
–c http://www.ijs.si/software/amavisd/amavisd-new-2.6.4.tar.gz&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Vamos criar o
usuário que irá executar o AMAVIS e o seu respectivo diretório.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;groupadd
amavis&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;useradd
-m -d /var/amavis -g amavis -s /bin/false amavis&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Por último,
descompactar o arquivo do AMAVIS, criar alguns diretórios
necessários e copiar os arquivos.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;tar
-zxvf amavisd-new-2.6.4.tar.gz&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;cd
amavisd-new-2.6.4&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;mkdir
-p /opt/amavisd-new/sbin/amavisd&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;chown
root /opt/amavisd-new/sbin/amavisd&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;chmod
755 /opt/amavisd-new/sbin/amavisd&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;cp
amavisd.conf /etc/&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;chown
root /etc/amavisd.conf&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;chmod
644 /etc/amavisd.conf&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;cp
amavisd_init.sh /etc/init.d/amavisd-new&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;chkconfig
amavisd-new on&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;mkdir
-p /var/amavis/tmp /var/amavis/var /var/amavis/db /var/amavis/home
/var/amavis/virusmails&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;chown
-R amavis:amavis /var/amavis&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;chmod
-R 750 /var/amavis&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Após a instalação
do AMAVIS, vamos configurar o mesmo, bastando apenas alterar algumas
linhas no /etc/amavisd.conf.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Vamos acessar o
arquivo amavisd.conf e editar as seguintes linhas:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;$daemon_user
&amp;nbsp;= &quot;amavis&quot;; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;$daemon_group
= &quot;amavis&quot;;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;$mydomain
= &#39;example.com&#39;;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;$TEMPBASE
= &quot;$MYHOME/tmp&quot;; &amp;nbsp; # working directory, needs to
exist, -T&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;$ENV{TMPDIR}
= $TEMPBASE; &amp;nbsp; &amp;nbsp;# environment variable TMPDIR, used by SA,
etc.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;$QUARANTINEDIR
= &quot;$MYHOME/amavis/virusmails&quot;;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Alterado esses
itens, a configuração basica do AMAVIS está pronta.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Agora vamos editar
o arquivo /etc/postfix/master.conf e colocar o seguinte:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;smtp-amavis
&amp;nbsp;unix &amp;nbsp; &amp;nbsp;- &amp;nbsp; &amp;nbsp;- &amp;nbsp; &amp;nbsp;y &amp;nbsp; &amp;nbsp;-
&amp;nbsp; &amp;nbsp;2 &amp;nbsp; &amp;nbsp;smtp&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
smtp_data_done_timeout=1200&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
smtp_send_xforward_command=yes&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
disable_dns_lookups=yes&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;127.0.0.1:10025
inet &amp;nbsp; &amp;nbsp;n &amp;nbsp; &amp;nbsp;- &amp;nbsp; &amp;nbsp;y &amp;nbsp; &amp;nbsp;- &amp;nbsp;
&amp;nbsp;- &amp;nbsp; &amp;nbsp;smtpd&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
content_filter=&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
local_recipient_maps=&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
relay_recipient_maps=&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
smtpd_restriction_classes=&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
smtpd_helo_restrictions=&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
smtpd_sender_restrictions=&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
smtpd_recipient_restrictions=permit_mynetworks,reject&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
mynetworks=127.0.0.0/8&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
strict_rfc821_envelopes=yes&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
smtpd_error_sleep_time=0&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
smtpd_soft_error_limit=1001&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
smtpd_hard_error_limit=1000&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
receive_override_options=no_header_body_checks&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;E logo acima da
linha &amp;nbsp;&quot;smtpd_sender_restrictions = check_sender_access&quot;,
vamos inserir o seguinte:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;content_filter
= smtp-amavis:[localhost]:10024&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Vamos colocar o
AMAVIS inicializar junto com o S.O. da seguinte forma:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;chmod
+x /etc/init.d/amavisd-new&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;chkconfig
amavisd-new on&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Após esses
procedimentos o AMAVIS já deve estar funcionando, vamos reiniciar o
Postfix e fazer alguns testes.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Podemos testar o
amavis com o seguinte comando:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;amavisd
debug-sa&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;RAZOR2&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Definição do
Razor e como funciona&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;A Instalação do
Razor2 pode ser feita via yum, da seguinte dorma:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;Yum
install razor*&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Após a instalação
vamos executar alguns comando para a configuração do mesmo.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;razor-admin
-d –create&lt;/span&gt;&amp;nbsp;#Irá retonar “finished successfully.”&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;razor-admin
–register&lt;/span&gt;&amp;nbsp;&amp;nbsp;# Irá retonar “Register successful.”&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Agora vamos editar
o arquivo de configuração do Razor2 e alterar as seguintes linhas:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Vim
/root/.razor/razor-agent.conf&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;debuglevel
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = 3&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;razorhome
= /var/amavis/.razor&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;cp
-r /root/.razor/ /var/amavis/&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;razor-admin
-d -create -home=/var/amavis/.razor/&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Agora vamos editar
o arquivo do SPAMASSASSIN “/etc/mail/spamassassin/v310.pre” e
descomentar a linha que informa o plugin do Razor2&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;vim
/etc/mail/spamassassin/v310.pre&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;loadplugin
Mail::SpamAssassin::Plugin::Razor2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Após esses
procemdimentos o Razor2 já deve estar integrado com o SPAMASSASSIN.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;PYZOR&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Definição do
Pyzor e como funciona&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Pyzor is a system
of distributed servers that is very similar to Razor. We use it here
in order to fine tune our server’s spam-fighting abilities. It uses
UDP Port 24441 to communicate with its server(s). Pyzor requires
Python v2.2.1 and above. You can issue the following command to see
if you have it installed:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Para que o Pyzor
funcione, é necessário da depencia gdbm, que iremos instalar via
yum.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;yum
install gdbm&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;A Instalação do
Razor2 pode ser feita via yum, da seguinte dorma:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;yum
install python&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Iniciando a
instalação&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;Wget
–c
http://downloads.sourceforge.net/project/pyzor/pyzor/0.5.0/pyzor-0.5.0.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fapps%2Ftrac%2Fpyzor%2F&amp;amp;ts=1297530171&amp;amp;use_mirror=ufpr&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;cd
/usr/local/src/&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;tar
xjvf pyzor-0.5.0.tar.bz2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;cd
pyzor-0.5.0&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Execute os
seguintes comandos:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;python
setup.py build&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;python
setup.py install&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Dando as
permissões necessárias aos arquivos e diretórios:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;chmod
-R a+rX /usr/share/doc/pyzor /usr/lib/python /site-packages/pyzor
/usr/bin/pyzor /usr/bin/pyzord&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Vamos testar o
gdbm com o Pyzor da seguinte forma:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;python
-c &#39;import gdbm&#39; &amp;amp;&amp;amp; echo &#39;gdbm found&#39; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Fazendo o Pyzor
achar seus servidores:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;pyzor
discover&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Colocando o Pyzor
em seu devido lugar e dando suas permissões.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;cp
/root/.pyzor/servers /var/amavis/.pyzor/&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;&amp;nbsp;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;chown
-R amavis:amavis /var/amavis/&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Testando novamente
o Pyzor, mas agora com o AMAVIS.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;su
amavis -c &#39;pyzor ping&#39;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Apartir de agora
nosso Pyzor já deve estar funcionando perfeitamente.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;DCC&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;DCC é uma rede
colaborativa de assinaturas de spam. O mesmo exige que a porta UDP
6277 estará aberta para fora.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;cd
~&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;wget
–c http://www.rhyolite.com/dcc/source/dcc-dccd.tar.Z&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;tar
xzvf dcc.tar.Z&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;cd
dcc-dccd-1.3.138/&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;./configure
--with-uid=amavis&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;make&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;make
install&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Após a
instalação, vamos verificar se o DCC está respondendo na internet
com o comando:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;cdcc info&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Vamos indicar
abaixo ao DCC, que não possuímos um servidor DCC local.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;cdcc
&quot;delete 127.0.0.1&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;cdcc
&quot;delete 127.0.0.1 Greylist&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;/usr/bin/cron-dccd
to the real script, located at /var/dcc/libexec/cron-dccd:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;ln
-s /var/dcc/libexec/cron-dccd /usr/bin/cron-dccd&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Now, we’ll tell
cron to run it every morning, at 5:00 am:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;crontab
-e&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Add this line:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;0
5 * * * /usr/bin/cron-dccd&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;A configuração
do DCC está pronta, porém ele está como cliente stand-alone e isso
se você tiver um numero grande e-mails pode ser complicado, pois ele
irá consumir mais recusos e vai demorar mais para fazer o check nos
e-mails, pois o SpamAssassin terá que inciar ele toda a vez que for
verificar um e-mail.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Então no passo
abaixo iremos configurar o DCC como um daemon, e com isso a
integração entre DCC e SpamAssassin será mais eficiente.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Editando o
dcc_conf&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;vi
/var/dcc/dcc_conf&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Alterando a linha
DCCIFD_ENABLE de off para on, após salve o arquivo.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;DCCIFD_ENABLE=on&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;SRVR_ID=1000&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Vamos colocar o
serviço do DCC para iniciar ao ligar o servidor.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;cp
/var/dcc/libexec/rcDCC /etc/init.d/DCC&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;chkconfig
--add DCC&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Dando permissão
ao AMAVIS no diretório do DCC&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;chown
-R amavis:amavis /var/dcc&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Habilitando o DCC
no SpamAssassin&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;vim
/etc/mail/spamassassin/local.cf&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Adicione o home do
DCC&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;use_dcc
1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;dcc_home
/var/dcc&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Edite o arquivo
v310.pre e habilite o DCC descomentando a seguinte linha:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;vi
/etc/mail/spamassassin/v310.pre&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;loadplugin
Mail::SpamAssassin::Plugin::DCC&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;dcc_path
/usr/local/bin/dccproc&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;whereis
dccproc&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Após esse
procedimento o nosso DCC deve estar funcionando normalmente.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;
&amp;nbsp; &lt;span style=&quot;font-family: Times New Roman;&quot;&gt;TESTES&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;ps
ax | grep –i dcc&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Baixei o e-mail de
teste para SPAM&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;wget
&#39;http://kb.atmail.com/attach/spam-mail.txt&#39;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Execute o comando
com o SpamAssassin, para testar se o mesmo funcionou&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;spamassassin
-t -D &amp;lt; spam-mail.txt&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;VERIFICAR OS LOGS&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;This will print
verbose debugging info while scanning the email via Spamassassin.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;On a successful
DCC installation you will see the following returned:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;dbg: plugin:
loading Mail::SpamAssassin::Plugin::DCC from @INC&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;dbg: dcc: network
tests on, registering DCC&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;If the message is
detected on the DCC network Spamassassin will return:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;DSPAM&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;O Dspam é um
filtro de mail, que funciona apartir estatísticas &amp;nbsp;de e-mail,
sendo que classifica-os como SPAM ou NÃO-SPAM. A sua base de
estatísticas é atualizada a cada e-mail que recebe, ou seja, tem a
capacidade de aprender sozinho.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;O DSPAM requisita
de um sistema de BD, podendo ser postgresql, mysql, ..., no nosso
caso iremos utilizar o MySQL.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Então, Antes de
começar a instalação do DSPAM, vamos instalar o MySQL.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;Yum
install mysql-devel mysql-server&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Após instalar o
MySQL, vamos baixar o DSPAM e compilar para a instalação.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;Wget
http://sourceforge.net/projects/dspam/files/dspam/dspam-3.9.1-RC1/dspam-3.9.1-RC1.tar.gz/download&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;Tar
–zxvf&amp;nbsp; dspam-3.9.1-RC1.tar.gz&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;Cd
dspam-3.9.1-RC1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;./autogen.sh&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;./configure
\&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;--prefix=/opt/dspam
\&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;--sysconfdir=/etc
\&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;-–enable-shared
\&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;-–enable-large-scale
\&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;-–enable-daemon
\&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;-–enable-clamav
\&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;-–enable-debug
\&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;-–enable-syslog
\&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;--enable-alternative-bayesian
\&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;--enable-long-usernames
\&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;--enable-spam-delivery
\&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;–&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-enable-preferences-extension
\&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;–&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-enable-virtual-users
\&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;–&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-enable-external-lookup
\&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;--with-userdir=/var/dspam
\&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;–&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-with-dspam-home-owner=dspam
\&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;–&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-with-dspam-home-group=mail
\&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;--with-userdir-owner=dspam
\&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;--with-userdir-group=postdrop
\&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;--with-dspam-owner=dspam
\&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;--with-dspam-group=postdrop
\&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;--with-dspam-mode=4510
\&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;–&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-with-logdir=/var/log/dspam
\&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;--with-local-delivery-agent=/usr/sbin/sendmail
\&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;--with-storage-driver=mysql_drv
\&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;--with-mysql-includes=/usr/include/mysql
\&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;--with-mysql-libraries=/usr/lib/mysql
\&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;--disable-trusted-user-security&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;Make
&amp;amp;&amp;amp; make install&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Após
ter compilado “instalado” o DSPAM, vamos criar a BD.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;mysql
-u root -p -e &quot;create database dspam&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;mysql
-u root -p -e &quot;grant all on dspam.* to dspam@localhost
identified by &#39;-SENHADSPAMPASS&#39;&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;mysql
-u dspam -p dspam &amp;lt;
src/tools.mysql_drv/mysql_objects-speed.sql&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;mysql
-u dspam -p dspam &amp;lt; src/tools.mysql_drv/virtual_users.sql&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;cp
src/tools.mysql_drv/purge.sql /var/dspam&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;
&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Agora vamos dar
permissão ao usuário:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;chown
dspam:postdrop /var/dspam/mysql.data&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;chmod
440 /var/dspam/mysql.data&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Vamos adicionar
uma entrada no crontab&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;0
0 * * * (/usr/bin/mysql -u dspam -p&#39;SENHADSPAMPASS&#39; dspam &amp;nbsp;&amp;lt;
/var/dspam/purge.sql)1&amp;gt;&amp;amp;2&amp;gt;/dev/null&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Agora é
necessário editar o master.cf do postfix, vamos editar
os&amp;nbsp;parâmetros&amp;nbsp;já inseridos, deixando eles assim:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;smtp
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; inet &amp;nbsp; &amp;nbsp;
&amp;nbsp;n &amp;nbsp; &amp;nbsp; &amp;nbsp;- &amp;nbsp; &amp;nbsp; &amp;nbsp;n &amp;nbsp; &amp;nbsp; &amp;nbsp;-
&amp;nbsp; &amp;nbsp; &amp;nbsp;-&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
content_filter=scan:[127.0.0.1]:10024&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
receive_override_options=no_address_mappings&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;smtp-amavis
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;unix &amp;nbsp; &amp;nbsp; &amp;nbsp;- &amp;nbsp; &amp;nbsp;
&amp;nbsp;- &amp;nbsp; &amp;nbsp; &amp;nbsp;n &amp;nbsp; &amp;nbsp; &amp;nbsp;- &amp;nbsp; &amp;nbsp; &amp;nbsp;2
&amp;nbsp; &amp;nbsp; &amp;nbsp;lmtp&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
smtp_send_xforward_command=yes&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;127.0.0.1:10025
&amp;nbsp; &amp;nbsp; &amp;nbsp;inet &amp;nbsp; &amp;nbsp; &amp;nbsp;n &amp;nbsp; &amp;nbsp; &amp;nbsp;-
&amp;nbsp; &amp;nbsp; &amp;nbsp;n &amp;nbsp; &amp;nbsp; &amp;nbsp;- &amp;nbsp; &amp;nbsp; &amp;nbsp;- &amp;nbsp;
&amp;nbsp; &amp;nbsp;smtpd&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
cleanup_service_name=pre-cleanup&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
content_filter=dspam:dummy&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
local_recipient_maps=&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
relay_recipient_maps=&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
smtpd_restriction_classes=&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
smtpd_client_restrictions=&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
smtpd_helo_restrictions=&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
smtpd_sender_restrictions=&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
smtpd_recipient_restrictions=permit_mynetworks,reject&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
mynetworks=127.0.0.0/8&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
strict_rfc821_envelopes=yes&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
smtpd_error_sleep_time=0&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
smtpd_soft_error_limit=1001&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
smtpd_hard_error_limit=1000&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;127.0.0.1:10026
&amp;nbsp; &amp;nbsp; &amp;nbsp;inet &amp;nbsp; &amp;nbsp; &amp;nbsp;n &amp;nbsp; &amp;nbsp; &amp;nbsp;-
&amp;nbsp; &amp;nbsp; &amp;nbsp;n &amp;nbsp; &amp;nbsp; &amp;nbsp;- &amp;nbsp; &amp;nbsp; &amp;nbsp;- &amp;nbsp;
&amp;nbsp; &amp;nbsp;smtpd&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
local_recipient_maps=&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
relay_recipient_maps=&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
smtpd_restriction_classes=&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
smtpd_client_restrictions=&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
smtpd_helo_restrictions=&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
smtpd_sender_restrictions=&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
smtpd_recipient_restrictions=permit_mynetworks,reject&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
mynetworks=127.0.0.0/8&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
strict_rfc821_envelopes=yes&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
smtpd_error_sleep_time=0&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
smtpd_soft_error_limit=1001&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
smtpd_hard_error_limit=1000&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;
&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;scan
&amp;nbsp; &amp;nbsp; &amp;nbsp;unix &amp;nbsp;- &amp;nbsp; &amp;nbsp; &amp;nbsp; - &amp;nbsp; &amp;nbsp;
&amp;nbsp; n &amp;nbsp; &amp;nbsp; &amp;nbsp; - &amp;nbsp; &amp;nbsp; &amp;nbsp; 2 &amp;nbsp; &amp;nbsp;
&amp;nbsp; smtp&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
disable_dns_lookups=yes&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
lmtp_send_xforward_command=yes&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
lmtp_data_done_timeout=1200&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;dspam
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;unix &amp;nbsp; &amp;nbsp;
&amp;nbsp;- &amp;nbsp; &amp;nbsp; &amp;nbsp;n &amp;nbsp; &amp;nbsp; &amp;nbsp;n &amp;nbsp; &amp;nbsp; &amp;nbsp;-
&amp;nbsp; &amp;nbsp; &amp;nbsp;- &amp;nbsp; &amp;nbsp; &amp;nbsp;pipe&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;flags=Rhq
user=dspam argv=/opt/dspam/bin/dspam -i -f ${sender} -- %u --user
${recipient}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;cleanup
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;unix &amp;nbsp; &amp;nbsp; &amp;nbsp;n
&amp;nbsp; &amp;nbsp; &amp;nbsp;- &amp;nbsp; &amp;nbsp; &amp;nbsp;n &amp;nbsp; &amp;nbsp; &amp;nbsp;- &amp;nbsp;
&amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp; &amp;nbsp;cleanup&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
header_checks=&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
mime_header_checks=&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
nested_header_checks=&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
body_checks=&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;pre-cleanup
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;unix &amp;nbsp; &amp;nbsp; &amp;nbsp;n &amp;nbsp; &amp;nbsp;
&amp;nbsp;- &amp;nbsp; &amp;nbsp; &amp;nbsp;n &amp;nbsp; &amp;nbsp; &amp;nbsp;- &amp;nbsp; &amp;nbsp; &amp;nbsp;0
&amp;nbsp; &amp;nbsp; &amp;nbsp;cleanup&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
canonical_maps=&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
sender_canonical_maps=&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
recipient_canonical_maps=&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
masquerade_domains=&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
virtual_alias_maps=&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
always_bcc=&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
sender_bcc_maps=&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
recipient_bcc_maps=&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;local
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;unix &amp;nbsp; &amp;nbsp;
&amp;nbsp;- &amp;nbsp; &amp;nbsp; &amp;nbsp;n &amp;nbsp; &amp;nbsp; &amp;nbsp;n &amp;nbsp; &amp;nbsp; &amp;nbsp;-
&amp;nbsp; &amp;nbsp; &amp;nbsp;- &amp;nbsp; &amp;nbsp; &amp;nbsp;local&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
content_filter=&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
myhostname=localhost&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
local_recipient_maps=&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
relay_recipient_maps=&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
mynetworks=127.0.0.0/8&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
mynetworks_style=host&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
smtpd_restriction_classes=&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
smtpd_client_restrictions=&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
smtpd_helo_restrictions=&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
smtpd_sender_restrictions=&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;-o
smtpd_recipient_restrictions=permit_mynetworks,reject&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;dspam-add
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;unix &amp;nbsp; &amp;nbsp; &amp;nbsp;- &amp;nbsp;
&amp;nbsp; &amp;nbsp;n &amp;nbsp; &amp;nbsp; &amp;nbsp;n &amp;nbsp; &amp;nbsp; &amp;nbsp;- &amp;nbsp; &amp;nbsp;
&amp;nbsp;- &amp;nbsp; &amp;nbsp; &amp;nbsp;pipe&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;flags=Rhq
user=dspam argv=/opt/dspam/bin/dspam --user ${user}@${nexthop}
--addspam&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;dspam-del
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; unix &amp;nbsp; &amp;nbsp; &amp;nbsp;-
&amp;nbsp; &amp;nbsp; &amp;nbsp;n &amp;nbsp; &amp;nbsp; &amp;nbsp;n &amp;nbsp; &amp;nbsp; &amp;nbsp;- &amp;nbsp;
&amp;nbsp; &amp;nbsp;- &amp;nbsp; &amp;nbsp; &amp;nbsp;pipe&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;flags=Rhq
user=dspam argv=/opt/dspam/bin/dspam --user ${user}@${nexthop}
--falsepositive&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;CLAMAV&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;O CLAMAV é um
anti-vírus Open Source que foi projetado especialmente para
trabalhar junto com serviços de e-mail, com o tempo foi implementado
em outras soluções.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;O CLAMAV possui
dois arquivos de configuração, um se refere a configuração do
próprio anti-írus o&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Vamos instalar o
CLAMAV via yum da seguinte forma:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;yum
install clamav clamav-db clamd perl-Mail-ClamAV perl-ClamAV-Client&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Agora iremos
editar o arquivo /etc/clamd.conf e ajustar as seguintes linhas come
segue abaixo:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;LocalSocket
/var/run/clamav/clamd.ctl&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;FixStaleSocket
true&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;#Lembrando que o
usuário clamav precisa fazer parte do grupo amavis&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;User
amavis&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;AllowSupplementaryGroups
true&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;ScanMail
true&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;ScanArchive
true&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;ArchiveMaxRecursion
5&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;ArchiveMaxFiles
1000&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;ArchiveMaxFileSize
21M&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;ArchiveMaxCompressionRatio
250&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;ArchiveLimitMemoryUsage
false&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;ArchiveBlockEncrypted
false&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;MaxDirectoryRecursion
15&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;FollowDirectorySymlinks
false&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;FollowFileSymlinks
false&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;ReadTimeout
180&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;MaxThreads
12&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;MaxConnectionQueueLength
15&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;StreamMaxLength
10M&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;LogSyslog
false&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;LogFacility
LOG_LOCAL6&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;LogClean
false&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;LogVerbose
false&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;PidFile
/var/run/clamav/clamd.pid&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;DatabaseDirectory
/var/clamav&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;TemporaryDirectory
/tmp&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;SelfCheck
3600&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;Foreground
false&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;Debug
false&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;ScanPE
true&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;ScanOLE2
true&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;ScanHTML
true&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;DetectBrokenExecutables
false&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;MailFollowURLs
false&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;ArchiveBlockMax
false&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;ExitOnOOM
false&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;LeaveTemporaryFiles
false&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;AlgorithmicDetection
true&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;ScanELF
true&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;NodalCoreAcceleration
false&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;IdleTimeout
30&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;MailMaxRecursion
64&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;PhishingSignatures
true&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;LogFile
/var/log/clamav/clamav.log&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;LogTime
true&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;LogFileUnlock
false&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;LogFileMaxSize
0 # only appropriate because I use logrotate&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;#Permissões&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;chown
-R amavis:amavis /var/run/clamav&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;chown
-R amavis:amavis /var/log/clamav&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;touch
/var/log/clamav/freshclam.log&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;chown
amavis:amavis /var/log/clamav/freshclam.log&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;chown
-R amavis:amavis /var/clamav /var/run/clamav&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Agora iremos
editar o arquivo /etc/ freshscan.conf, ele que irá atualizar o
CLAMAV&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;DatabaseOwner
clamav&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;UpdateLogFile
/var/log/clamav/freshclam.log&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;UpdateLogFile
/var/log/clamav/freshclam.log&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;LogVerbose
false&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;LogSyslog
false&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;LogFacility
LOG_LOCAL6&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;LogFileMaxSize
0&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;Debug
false&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;MaxAttempts
5&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;DatabaseDirectory
/var/clamav/&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;DNSDatabaseInfo
current.cvd.clamav.net&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;AllowSupplementaryGroups
true&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;PidFile
/var/run/clamav/freshclam.pid&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;ConnectTimeout
30&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;ReceiveTimeout
30&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;ScriptedUpdates
yes&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;NotifyClamd
/etc/clamd.conf&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;DatabaseMirror
db.local.clamav.net&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;DatabaseMirror
database.clamav.net&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #bf9000;&quot;&gt;DatabaseMirror
db.us.clamav.net&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Agora já podemos
atualizar o CLAMAV, com o seguinte comando:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;background: #666666;&quot;&gt;freshclam
--config-file=/etc/freshclam.conf&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;Essa ficou nossa
estrutura do servidor de e-mail. Espero que o post ajudem vocês nas
configurações e qualquer duvida coloquem nos comentários do posts
que estarei ajudando vocês.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://rafaeltomelin.blogspot.com/feeds/9044132998166708912/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://rafaeltomelin.blogspot.com/2012/10/howto-instalacao-do-postfix-com.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5785733457648885241/posts/default/9044132998166708912'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5785733457648885241/posts/default/9044132998166708912'/><link rel='alternate' type='text/html' href='http://rafaeltomelin.blogspot.com/2012/10/howto-instalacao-do-postfix-com.html' title='&lt;center&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #f00; font-family: Arial, Helvetica, sans-serif; font-size: large;&quot;&gt;&lt;i&gt;&lt;b&gt;HOWTO – INSTALAÇÃO DO POSTFIX COM SPAMASSASSIN, POSTGREY, AMAVIS, RAZOR, PYZOR, DCC, CLAMAV, DSPAM&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;/center&gt;'/><author><name>Rafael Tomelin</name><uri>http://www.blogger.com/profile/13705154019737635144</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5785733457648885241.post-4683666615475776623</id><published>2011-02-19T00:17:00.006-02:00</published><updated>2012-04-28T09:58:13.586-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Monitoramento"/><title type='text'>Monitoramento com NAGIOS completo!!</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3e3e3e; font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3e3e3e; font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3e3e3e; font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3e3e3e; font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3e3e3e; font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: 13px;&quot;&gt;Neste tutorial irei comentar um pouco de monitoramento com o Nagios.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: 13px;&quot;&gt;NAGIOS é um sistema de monitoramento, onde você pode estar monitorando tudo que tem IP, sendo esse monitoramento via plugin do Nagios, SNMP ou até mesmo um script próprio. O Nagios é um servidor ativo, ou seja, ele se encarrega de ir até o host e fazer a checagem.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: 13px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: 13px;&quot;&gt;Vamos mostrar aqui o funcionamento do Nagios juntos com algumas outras ferramentas listadas abaixo:&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: 13px;&quot;&gt;Nagios: Servidor de monitoramento;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: 13px;&quot;&gt;Nagios Plugin: Plugin para monitorar hosts, serviços, ...;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: 13px;&quot;&gt;NDOUTILS: Faz a integração do Nagios com o BD MySQL;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: 13px;&quot;&gt;NRPE: Torna o host a ser monitorado ATIVO e o Nagios PASSIVO, para determinado host.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: 13px;&quot;&gt;NAGVIS: Permite criar um mapa do ambiente a ser monitorado.&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: 13px;&quot;&gt;&lt;br /&gt;
&lt;b&gt;FORMA DE TRABALHO:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: 13px;&quot;&gt;&lt;br /&gt;
1) Instalados em /opt/nagios&lt;br /&gt;
2) Logs em /opt/nagios/nagios3/var/nagios.log&lt;br /&gt;
4) Configurações /etc/nagios/*.cfg&lt;br /&gt;
5)Instalar e testar cada componente, ou seja, a cada instalação será testado só assim partiremos para o próximo passo.&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: 13px;&quot;&gt;&lt;b&gt;PRÉ-REQUISITOS,&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: 13px;&quot;&gt;Estarei mostrando todo o ambiente do Nagios no Centos5.5, mas podemos estar instalando e configurando em qualquer ambiente.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: 13px;&quot;&gt;Mais a frente iremos precisar de um algum componentes, então prefiro deixar tudo já instalado e depois vamos para a parte do Nagios.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: 13px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;Uns dos principais pré-requisitos é a iunstalação do pacote do RPM FORGE.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: 13px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: 13px;&quot;&gt;A instalação de alguns componentes com o yum:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #999999;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;yum -y install httpd net-snmp mrtg mysql mysql-server rrdtool php php-snmp glibc libpng.i386 libjpeg freetype gd perl perl-GD perl-GD-Convert&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;sysstat fping&amp;nbsp;perl-MySQL-Config perl-DB_File perl-DBD-MySQL perl-DBI perl-DBIx-DataSource&amp;nbsp;libjpeg gd-devel&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: 13px;&quot;&gt;
Após a instalação desses componentes, vamos colocar a mão na massa, ...&lt;/div&gt;
&lt;div style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: 13px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: 13px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: 13px;&quot;&gt;&lt;b&gt;1) INSTALAÇÃO E CONFIGURÃO do NAGIOS&lt;/b&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: 13px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: 13px;&quot;&gt;1.1) Primeiramente, vamos criar o usuário e o grupo do Nagios.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: 13px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #999999;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: 13px;&quot;&gt;groupadd nagcmd&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: 13px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: 13px;&quot;&gt;useradd -d /dev/null -s /bin/false -g nagcmd nagios&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: 13px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: 13px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;1.2) Vamos baixar o Nagios através do WGET. Eu&amp;nbsp;copiei &amp;nbsp;o link do próprio site do Nagios, é ideal que se pegue a versão mais atualizada.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #999999;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;cd ~&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: 13px;&quot;&gt;wget&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-3.2.3.tar.gz&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;1.3) Vamos descompactar o Nagios&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;tar -zxvf&amp;nbsp;nagios-3.2.3.tar.gz&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;cd&amp;nbsp;nagios-3.2.3&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: 13px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: 13px;&quot;&gt;1.4) Agora iremos compilar o Nagios.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;OBS.: Aqui se você&amp;nbsp;quiser&amp;nbsp;pode mudar algum&amp;nbsp;diretório, ativar ou desativar as opções.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #999999;&quot;&gt;./configure --prefix=/opt/nagios/nagios3 --sysconfdir=/etc/nagios \&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #999999;&quot;&gt;--with-nagios-user=nagios --with-nagios-group=nagcmd \&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #999999;&quot;&gt;--with-cgiurl=/nagios3/cgi-bin --with-mysql=/usr --with-gnu-ld \&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #999999;&quot;&gt;--with-openssl=/usr --with-uptime-command=/usr/bin/uptime \&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #999999;&quot;&gt;--with-rpcinfo-command=/usr/sbin/rpcinfo \&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #999999;&quot;&gt;--with-snmpget-command=/usr/bin/snmpget \&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #999999;&quot;&gt;--with-snmpgetnext-command=/usr/bin/snmpgetnext \&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #999999;&quot;&gt;--with-ssh-command=/usr/bin/ssh --with-proc-meminfo=/proc/meminfo \&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #999999;&quot;&gt;--with-gnu-ld --enable-nls --enable-perl-modules --enable-extra-opts \&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #999999;&quot;&gt;--enable-largefile --enable-mysql&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;Se não der nenhum erro, vamos instalar da seguinte forma:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #999999;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: 13px;&quot;&gt;make all&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: 13px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: 13px;&quot;&gt;make install&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: 13px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: 13px;&quot;&gt;make install-init&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: 13px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: 13px;&quot;&gt;make install-commandmode&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: 13px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: 13px;&quot;&gt;make install-config&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: 13px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: 13px;&quot;&gt;make install-webconf&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: 13px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: 13px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: 13px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: 13px;&quot;&gt;1.5)Para acessar a interface do Nagios, é necessário que se tenha um usuário criado da seguinte forma:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: 13px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #999999; font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: 13px;&quot;&gt;htpasswd -c /etc/nagios/htpasswd.users nagiosadmin&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: 13px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: 13px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: 13px;&quot;&gt;Após a criação do usuário e senha, já podemos acessar a interface do Nagios pelo o brownser.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
LEMBRANDO: é necessário iniciar o serviço httpd (apche) e do Nagios.&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: 13px;&quot;&gt;&lt;a href=&quot;http://ip_do_servidor_nagios/nagios&quot; rel=&quot;nofollow&quot; style=&quot;text-decoration: none;&quot; target=&quot;_blank&quot;&gt;http://ip_do_servidor_nagios/nagios&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: 13px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: 13px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: 13px;&quot;&gt;1.6) Se você consegui acessar a interface do Nagios está OK. Porém ele não irá conseguir fazer nenhuma verificação, pois o Nagios necessita de seus plugins para fazer os CHECKs nos clientes.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: 13px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;&lt;b&gt;2) Instalando os plugins do Nagios&lt;/b&gt;&lt;br /&gt;
2.1) Como no pacote do Nagios, vamos baixar via WGET a ultima versão do nagios-plugins no site do Nagios.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #999999; font-size: 13px;&quot;&gt;cd ~&lt;br /&gt;
wget&amp;nbsp;&amp;nbsp;http://prdownloads.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.15.tar.gz&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;Descompactando&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #999999; font-size: 13px;&quot;&gt;tar -zxvf &amp;nbsp;nagios-plugins-1.4.15.tar.gz&lt;br /&gt;
cd&amp;nbsp;nagios-plugins-1.4.15&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;&lt;br /&gt;
2.2) Beleza, vamos compilar os plugins do Nagios-plugins.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #999999;&quot;&gt;./configure --prefix=/opt/nagios/nagios3 --sysconfdir=/etc/nagios --with-nagios-user=nagios --with-nagios-group=nagcmd --with-cgiurl=/nagios3/cgi-bin --with-mysql=/usr --with-gnu-ld --with-openssl=/usr --with-uptime-command=/usr/bin/uptime --with-rpcinfo-command=/usr/sbin/rpcinfo --with-snmpget-command=/usr/bin/snmpget --with-snmpgetnext-command=/usr/bin/snmpgetnext --with-ssh-command=/usr/bin/ssh --with-proc-meminfo=/proc/meminfo --with-gnu-ld --enable-nls --enable-perl-modules --enable-extra-opts --enable-largefile --enable-mysql&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #999999;&quot;&gt;make all&lt;br /&gt;
make install&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Agora o Nagios está pronto para monitorar nossos servidores e serviços.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;OBS.: Na interface do Nagios, mais especificamente nos serviços, é possível forçar o Nagios para fazer uma nova checagem, porém ele provavelmente irá retornar o seguinte erro:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div class=&quot;errorMessage&quot; style=&quot;font-family: arial, serif; font-size: 12pt; font-weight: bold; text-align: center;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #eeeeee; color: red;&quot;&gt;Error: Could not open command file &#39;/opt/nagios/nagios3/var/rw/nagios.cmd&#39; for update!&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: arial, serif; font-size: 13px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;font-family: arial, serif; font-size: 13px;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;errorDescription&quot; style=&quot;font-family: arial, serif; font-size: 12pt; font-weight: bold; text-align: center;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #eeeeee;&quot;&gt;The permissions on the external command file and/or directory may be incorrect. Read the FAQs on how to setup proper permissions.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: arial, serif; font-size: 13px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;font-family: arial, serif; font-size: 13px;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;errorMessage&quot; style=&quot;font-family: arial, serif; font-size: 12pt; font-weight: bold; text-align: center;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #eeeeee; color: red;&quot;&gt;An error occurred while attempting to commit your command for processing.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;errorMessage&quot; style=&quot;font-family: arial, serif; font-size: 12pt; font-weight: bold; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;errorMessage&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: arial, serif;&quot;&gt;Isso porque o arquivo &quot;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: arial, serif;&quot;&gt;/opt/nagios/nagios3/var/rw/nagios.cmd&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: arial, serif; font-size: small;&quot;&gt;&quot;, necessita estar com permissões 777 e não está. &amp;nbsp;O problema é que toda a vez que você reiniciar o Nagios ele irá perder essa permissão, então vamos editar o arquivo &quot;/etc/init.d/nagios&quot; e acrescentar a seguinte linha &quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: arial, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #999999;&quot;&gt;chmod 777 /opt/nagios/nagios3/var/rw/nagios.cmd&lt;/span&gt;&quot; dentro da função start e logo abaixo as linhas:&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;errorMessage&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: arial, serif;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;errorMessage&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: arial, serif;&quot;&gt;su - $NagiosUser -c &quot;touch $NagiosVarDir/nagios.log $NagiosRetentionFile&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;errorMessage&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: arial, serif;&quot;&gt;rm -f $NagiosCommandFile&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;errorMessage&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: arial, serif;&quot;&gt;touch $NagiosRunFile&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;errorMessage&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: arial, serif;&quot;&gt;chown $NagiosUser:$NagiosGroup $NagiosRunFile&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;errorMessage&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: arial, serif;&quot;&gt;$NagiosBin -d $NagiosCfgFile&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: arial, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;Feito isso, você irá conseguir forçar um novo check.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;2.3) Arquivos de configurações do Nagios.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;Os arquivos de configurações do Nagios fica em &quot;/etc/nagios&quot;, sendo que na raiz fica a configuração do serviço do Nagios e em &quot;/etc/nagios/objects&quot; fica o arquivo de configurações dos hosts a serem monitorados.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;Os arquivos dos hosts a serem monitorados, tem alguns templates prontos, bastando copiar e dentro deles mudar o nome do hosts e do grupo. &amp;nbsp;Também é possível cadastrar os e-mail dos administradores que serão avisado caso aja alguma falha.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;Segue algums dos arquivos padrão do Nagios:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #999999; font-size: 13px;&quot;&gt;ls /etc/nagios/objects&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;commands.cfg &amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;contacts.cfg&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;localhost.cfg &amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;printer.cfg &amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;switch.cfg &amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;templates.cfg &amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;timeperiods.cfg &amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;windows.cfg&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;podemos aqui copiar o arquivo do localhost para server01.cfg e dentro dele alterar o nome do hosts e ativar os serviços que queremos.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;Após esses passos, nosso servidor está pronto, vamos então integrar o Nagios com o BD Mysql.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;&lt;b&gt;3) Instalação do NDOUTILS&lt;/b&gt;&lt;br /&gt;
Como mencionado no inicio, esse plugin faz a integração do NAGISO com MySQL..&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;&lt;br /&gt;
3.1) Vamos baixar o pacote mais atualizado do NDOUtils&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #999999;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;wget http://sourceforge.net/projects/nagios/files/ndoutils-1.x/ndoutils-1.4b9/ndoutils-.4b9.tar.gz/download&lt;/span&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #999999; font-size: 13px;&quot;&gt;tar -xcvf ndoutils-1.4b9.tar.gz&lt;br /&gt;
cd ndoutils-1.4b9&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;&lt;br /&gt;
3.2) Vamos compilar agora o NDOUtils&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #999999;&quot;&gt;./configure --prefix=/opt/nagios/nagios3 --sysconfdir=/etc/nagios --with-init-dir=/etc/rc.d --with-mysql=/usr --with-ndo2db-user=nagios --with-ndo2db-group=nagcmd&lt;br /&gt;
make&lt;br /&gt;
make install&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;&lt;br /&gt;
3.3) Configurando o BD MySQL&lt;br /&gt;
O servidor de BD MySQL já deve estar configurado e funcionando&lt;br /&gt;
&lt;br /&gt;
Acessando o servidor:&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #999999;&quot;&gt;mysql -u root -p&lt;/span&gt;&lt;br /&gt;
Criando a base de dados&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #999999;&quot;&gt;create database nagios;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Criando o usuário compermissões&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #999999;&quot;&gt;GRANT ALL PRIVILEGES ON nagios.* TO nagiosadmin@localhost IDENTIFIED BY &#39;SuaSenha&#39; WITH GRANT OPTION;&lt;br /&gt;
GRANT ALL PRIVILEGES ON nagios.* TO nagiosadmin@&#39;%&#39; IDENTIFIED BY &#39;SuaSenha&#39; WITH GRANT OPTION;&lt;br /&gt;
FLUSH PRIVILEGES;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #999999;&quot;&gt;exit;&lt;br /&gt;
&lt;br /&gt;
cd db&lt;br /&gt;
./installdb -u nagiosadmin -p SuaSenha -h localhost -d nagios&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
3.4) Copiando os arquivos necessários para seus devidos diretórios:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #999999;&quot;&gt;cd ..&lt;br /&gt;
cp src/ndomod-3x.o src/ndo2db-3x src/log2ndo src/file2sock /opt/nagios/nagios3/bin/&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #999999;&quot;&gt;cp config/ndomod.cfg-sample /etc/nagios/ndomod.cfg&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #999999;&quot;&gt;cp config/ndo2db.cfg-sample /etc/nagios/ndo2db.cfg&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;&lt;br /&gt;
3.5) Habilitando o&amp;nbsp;NDOUtils no nagios&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #999999;&quot;&gt;echo &quot;broker_module=/opt/nagios/nagios3/bin/ndomod-3x.o config_file=/etc/nagios/ndomod.cfg&quot; &amp;gt;&amp;gt; /etc/nagios/nagios.cfg&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
3.6) Testando o NDOUtils e verificando os logs&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;#Iniciando o&amp;nbsp;NDOUtils&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #999999;&quot;&gt;/opt/nagios/nagios3/bin/ndo2db-3x -c /etc/nagios/ndo2db.cfg&lt;br /&gt;
/etc/rc.d/nagios restart&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Verificando se está tudo ok&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #999999;&quot;&gt;tail -f /opt/nagios/nagios3/var/nagios.log&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Tem que aparecer algo tipo:&lt;br /&gt;
[1253647886] ndomod: Successfully connected to data sink. 571 queued items to flush.&lt;br /&gt;
[1253647886] ndomod: Successfully flushed 571 queued items to data sink.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Caso de algum erro, verifique o caminho dos PATH nos arquivos do NDO ( ndo2db.cfg ndomod.cfg).&lt;br /&gt;
&lt;br /&gt;
Pronto o Nagios já está integrado com o Mysql.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif;&quot;&gt;&lt;b style=&quot;font-size: 13px;&quot;&gt;4) Instalação do Nagvis&lt;/b&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;O NAGVIS nada mais é do que mostrar os hosts mapeado, ou seja, pode-se mostrar o host num determinado mapa/foto ( uma foto do cpd, imagem do visio, imagem do google mapas, ...).&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;Na minha opinião ele é uma perfumaria, mas é bem legal. O interessante dele, é poder ficar mostrando todos os mapas numa rotação de X tempo.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;Um grande problema do NAGVIS é o numero de dependências que ele requer, as principais são (GRAPHVIS, module perl JSON, NDOUTILS, entre outros)&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;Então vamos instalar algumas&amp;nbsp;dependências&amp;nbsp;necessárias:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #999999;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;yum -y install graphviz&amp;nbsp;php-mbstring.i386 php-gd.i386 php-ncurses.i386&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, &#39;Helvetica Neue&#39;, Helvetica, sans-serif; font-size: 14px; line-height: 22px;&quot;&gt;&amp;nbsp;glib glib2 libpng libjpeg libtiff ghostscript freetype ImageMagick&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, &#39;Helvetica Neue&#39;, Helvetica, sans-serif; font-size: 14px; line-height: 22px;&quot;&gt;&amp;nbsp;perl-RRD-Simple perl-rrdtool.i386&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, &#39;Helvetica Neue&#39;, Helvetica, sans-serif; font-size: 14px; line-height: 22px;&quot;&gt;perl-rrdtool perl-GD&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, &#39;Helvetica Neue&#39;, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 14px; line-height: 22px;&quot;&gt;libjpeg gd-devel&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;libgd libgd-devel libpng libpng-devel libjpeg libjpeg-devel&amp;nbsp;libXpm.i386 libXpm-devel.i386 perl-GD-Convert.noarch perl-Image-Xpm.noarch&amp;nbsp;graphviz&amp;nbsp;php-mbstring.i386 php-gd.i386 php-ncurses.i386&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;4.1) Vamos baixar o NAGVIS&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #999999;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;cd ~&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;get http://sourceforge.net/projects/nagvis/files/NagVis%201.5/nagvis-1.5.8.tar.gz/download&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;tar -zxvf nagvis-1.5.8.tar.gz&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;cd nagvis-1.5.8&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;4.2) Instalando o NAGVIS&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;Vamos dar permissão de execução no arquivos install.sh e depois executar o mesmo.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #999999;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;chmod +x install.sh&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;./install.sh&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;OBS.: Quando for executado o install.sh, o NAGVIS vai fazer a verificação de todas as dependências.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;Na instalação com o install.sh, o NAGVIS vai te fazer algumas perguntas sobre os diretórios de instalações, no nosso caso as respostas são:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;Resposta 1: /opt/nagios/nagios3&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;Resposta 2:opt/nagios/nagvis&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;Resposta 3: y&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;Resposta 4: y&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;Resposta 5: y&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;Resposta 6: apache&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;Resposta 7: apache&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;Resposta 8: y&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;O arquivo de configuração web do NagVis está em &quot;/etc/httpd/conf.d/nagvis.conf&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;Após esses passos, o NAGVIS já deve estar instalado, podemos acessar o link &quot;http://&lt;ipdonagios&gt;/nagvis&quot; .&lt;/ipdonagios&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;Nosso NAGVIS já está instalado, faltando apenas inserir nossos mapas e configurar os mesmos.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;4.3) Configurando o MAPA no NAGVIS&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;a) Clique em&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: black; font-size: 13px;&quot;&gt;Edit current map&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;b) clique com obotão direito na proxíma página&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;c) Manage &amp;gt; maps&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;d) coloque as informações do mapa (nome, usuário nagiosadmin, user nagiosadmin e imagem de fundo)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;e) clique em create.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;4.4) Configurando o HOST no NAGVIS&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;a) clique com obotão direito&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;b) Open Map &amp;gt; &lt;nome criado=&quot;&quot; do=&quot;&quot; mapa=&quot;&quot;&gt;&lt;/nome&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;c) clique com obotão direito&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;d) Add Object &amp;gt; Icon &amp;gt; Host&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;e) Clique no host indicado&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;f) Informe o nome do host &amp;gt; create&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;g) clique com obotão direito &amp;gt; Overview&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;O Host no NAGVIS já está criado.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;Para criar uma nova imagem de background é só seguir os passos de como criar um mapa, porém selecionar a opção background.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;div style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif;&quot;&gt;&lt;b style=&quot;font-size: 13px;&quot;&gt;5) Instalação do Nagiosgraph&lt;/b&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;O NAGIOSGRAPH é um plugin do nagios para gerar gráficos dos itens que estão sendo monitorados.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;A instalação do NAGIOSGRAPH é bem simples e sua configuração também, então vamos começar a brincadeira.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;5.1) Vamos começar baixando o pacote do nagiosgraph.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #999999; font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;cd ~&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #999999; font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;wget&amp;nbsp;http://sourceforge.net/projects/nagiosgraph/files/nagiosgraph/1.4.4/nagiosgraph-1.4.4.tar.gz/download&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #999999;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;tar -zxvf&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;nagiosgraph-1.4.4.tar.gz&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #999999;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;cd&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;nagiosgraph-1.4.4&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;5.2) Belaza, vamos começar instalando o nosso nagiosgraph.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;Antes de começar a instalar, vamos verificar as&amp;nbsp;dependências:&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #999999; font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;./install.pl --check-prerequisites&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;Esse comando irá mostrar uma lista de pacotes necessários e se estão instalados ou não.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;Após verificar as&amp;nbsp;dependências, vamos instalar com o layout do &quot;redhat&quot;. &amp;nbsp;O layout o padrão de instalação dos arquivos, onde eles serão instalado. &amp;nbsp;Podemos também customizar esses diretórios com o layout custom.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;Será necessário responder algumas perguntas, após responder as perguntas o nagiosgraph estará tudo instalado.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #999999; font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;./install --layout redhat&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;5.3) Configurando o NAGIOSGRAPH&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;Vamos primeiro criar o arquivo /etc/nagios/objects/serviceextinfo.cfg e colocar alguns itens dentro dele para teste.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-family: Verdana; font-size: 11px;&quot;&gt;define serviceextinfo {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;host_name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; localhost&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;service_description&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Total Processes&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;notes_url &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&amp;amp;service=$SERVICE$&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;icon_image&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;graph.png&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;icon_image_alt &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;View graphs&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;Esse seria um exemplo do total de processos ativos no servidor.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;Após a configuração do arquivo&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;serviceextinfo.cfg, reinicie o nagios.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;Agora ao acessar a interface, ao lado do serviço do Total Processes, terá um link para os gráfcos.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;Como podem perceber a instalação e configuração do NAGIOSGRAPH é bem simples, sendo necessário apenas esses passos.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;Agora irei mostrar alguns exemplos de configuração de itens a ser monitorados.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #666666; font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;6) EXEMPLOS&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;Exemplos retirados do&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;/etc/nagios/objects/localhost.cfg&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;Verificando o UPTIME com SNMP&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;define service{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;use&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;local-service&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;; Inherit values from a template&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;host_name&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;localhost&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;service_description&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Uptime&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;check_command&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;check_snmp!-C public -o sysUpTime.0&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;Verificando o IDLE do CPU&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;define service{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;use &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; local-service &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;host_name &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; localhost&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;service_description &amp;nbsp; &amp;nbsp; CPU_IDLE&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;check_command &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; check_snmp!-C public -o .1.3.6.1.4.1.2021.11.11.0 -w 20 -c 50&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;Pegando o trafego do MRTG e colocando no nagios&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;define service{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;use&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;local-service&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;; Inherit values from a template&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;host_name&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;localhost&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;service_description&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;ETH0&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;check_command&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;check_local_mrtgtraf!/var/www/mrtg/127.0.0.1_192.168.111.5.log!AVG!1000000,2000000!5000000,5000000!10&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-family: &#39;Times New Roman&#39;; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;Exemplos retirados do&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-family: &#39;Times New Roman&#39;; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;/etc/nagios/objects/serviceextinfo.cfg&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;Criando o&amp;nbsp;gráfico&amp;nbsp;da CPU - IDLE&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;define serviceextinfo {&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;service_description CPU_IDLE&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;host_name localhost&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;notes_url /nagiosgraph/cgi-bin/show.cgi?host=localhost&amp;amp;service=$SERVICEDESC$&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;# &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;icon_image graph.gif&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;# &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;icon_image_alt View graphs&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;Criando o gráfico do trafego da interface ETH0&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;define serviceextinfo {&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;service_description ETH0&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;host_name localhost&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;notes_url /nagiosgraph/cgi-bin/show.cgi?host=localhost&amp;amp;service=$SERVICEDESC$&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #999999; font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;7) Dicas&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;Pode-se configurar o nagios por interface gráfica, existem diversos software para isso, mas um dos melhores é o MONARC;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;Existem plugins para alterar a tela de visualização dos alertas, através do &lt;a href=&quot;http://www.nagios.org/download/frontends/&quot;&gt;link&lt;/a&gt;.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;Existem diversos outros&amp;nbsp;Plugins, que podem ser encontrados em:&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: small;&quot;&gt;&lt;a href=&quot;http://www.nagios.org/&quot;&gt;http://www.nagios.org&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: small;&quot;&gt;&lt;a href=&quot;http://www.nagios.org/&quot;&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: small;&quot;&gt;&lt;a href=&quot;http://exchange.nagios.org/&quot;&gt;http://exchange.nagios.org/&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: small;&quot;&gt;&lt;a href=&quot;http://exchange.nagios.org/&quot;&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: small;&quot;&gt;&lt;a href=&quot;http://nagios.frank4dd.com/&quot;&gt;http://nagios.frank4dd.com&lt;/a&gt;&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt;E isso aí pessoal, até a próxima.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3e3e3e; font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rafaeltomelin.blogspot.com/feeds/4683666615475776623/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://rafaeltomelin.blogspot.com/2011/02/monitoramento-com-nagios-completo.html#comment-form' title='1 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5785733457648885241/posts/default/4683666615475776623'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5785733457648885241/posts/default/4683666615475776623'/><link rel='alternate' type='text/html' href='http://rafaeltomelin.blogspot.com/2011/02/monitoramento-com-nagios-completo.html' title='&lt;center&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: yellow; font-size: large;&quot;&gt;&lt;b&gt;Monitoramento com NAGIOS completo!!&lt;/b&gt;&lt;/span&gt;&lt;/center&gt;'/><author><name>Rafael Tomelin</name><uri>http://www.blogger.com/profile/13705154019737635144</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5785733457648885241.post-7715511851716142692</id><published>2011-01-10T16:59:00.007-02:00</published><updated>2011-02-12T22:35:05.675-02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Cluster"/><title type='text'>CLUSTER EM HA</title><content type='html'>&lt;div style=&quot;text-align: center;&quot;&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Olá pessoal,&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;
Neste post irei mostrar como configurar um sistema de Cluster em HA usando o software HeartBeat e S.O. Linux Centos 5.5. Iremos mostrar um sistema bem básico em HA, nesse primeiro momento não iremos colocar nenhum serviço em nossos servidores apenas montar o cluster em HA e num próximo post iremos colocar serviços a rodar no nosso cluster. &lt;br /&gt;
O objetivo desse post é apenas mostrar o funcionamento do HeartBeat.&lt;br /&gt;
Nas nossas configurações ireimos usar o hostname dos servidores, e o mesmo tem que ser igual a saída do comando &quot;uname -n&quot;, é importante cadastrar os dois ip/nodos em &quot;/etc/hosts&quot;, para que o sistema nunca se perda.&lt;br /&gt;
&lt;br /&gt;
OK, vamos começar a colocar a mão na massa então, ops.... mão no teclado hehehhehe&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;Vamos definir nossa rede e servidores então.&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
CONFIGURAÇÔES DE REDE&lt;br /&gt;
REDE: 192.168.1.0/24&lt;br /&gt;
GW: 192.168.1.1&lt;br /&gt;
IP Virtual: 192.168.1.2&lt;br /&gt;
&lt;br /&gt;
CONFIGURAÇÔES DE HOSTS&lt;br /&gt;
NODO1 do cluster&lt;br /&gt;
hostname: nodo1&lt;br /&gt;
IP: 192.168.1.101&lt;br /&gt;
&lt;br /&gt;
NODO2 do cluster&lt;br /&gt;
hostname: nodo2&lt;br /&gt;
IP: 192.168.1.102&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Agora que já definimos os ips e hostname, vamos instalar o heartbeat.&lt;br /&gt;
Instalando o Heartbeat no centos 5.5: è importante informar que é necessário mandar o linux instalar 2 vezes, pois o instalador do yum com o heartbeat está com problemas e ele só instala na segunda vez.&lt;br /&gt;
&lt;br /&gt;
yum -y install heartbeat&lt;br /&gt;
&lt;br /&gt;
OBS.: Ele irá dar um erro no final da instalação e é necessário mandar instalar novamente.&lt;br /&gt;
&lt;br /&gt;
yum -y install heartbeat&lt;br /&gt;
&lt;br /&gt;
FEITO, agora foi!!!&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;b&gt;&lt;i&gt;Configurações&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;br /&gt;
&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
As consfigurações do heartbeat ficam dentro de /etc/ha.d e os principais arquivos de configuração são: ha.cf, authkeys, haresources, esses são os principais arquivos que iremos configurar, talvez não tenha todos os arquivos na instalação e é necessário criar o mesmo.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;* /etc/ha.d/ha.cf — Arquivo de configuração global do cluster&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;* /etc/ha.d/authkeys — Arquivo que contém a senha de autenticação entre os nodos&lt;br /&gt;
&lt;br /&gt;
Vamos começar configurando o ha.cf &quot;/etc/ha.d/ha.cf&quot;, vamos começar com uma configuração bem básica e depois vamos avançado até o final do post.&lt;br /&gt;
&lt;br /&gt;
/etc/ha.d/ha.cf&lt;br /&gt;
logfile /var/log/ha-log.log # informa o arquivo de log do heartbeat&lt;br /&gt;
debugfile /var/log/ha-debug.log # informa o arquivo de debug do heartbeat&lt;br /&gt;
logfacility local0 # informa o nível de criticidade dos logs&lt;br /&gt;
autojoin none # desabilita o auto-discovery de nodos do cluster&lt;br /&gt;
bcast eth0 # interface no qual irá se comunicar com outros nodos&lt;br /&gt;
warntime 5 # tempo que considerar um nodo indisponivel.&lt;br /&gt;
deadtime 15 # tempo que espera para considerar o outro nodo com problema&lt;br /&gt;
initdead 60 # Tempo que espera a testar outros nodos na inicialização&lt;br /&gt;
keepalive 2 # Tempo em segundos que um nodo se comunica com o outro&lt;br /&gt;
auto_failback off # Desabilita o failback, ou seja, quando o servidor primario parar ao voltar a funcionar volta automaticamente o serviços para ele.&lt;br /&gt;
udpport 694 # Indica o protocolo UDP na porta 694&lt;br /&gt;
node cluster1 # nome do nodo 1, nome retirado do comando hostname&lt;br /&gt;
node cluster2 # nome do nodo 2, nome retirado do comando hostname&lt;br /&gt;
&lt;br /&gt;
Configurando o arquivo authkeys &quot;/etc/ha.d/authkeys&quot;&lt;br /&gt;
No arquivo authkeys, tem que informar o tipo de criptografia da chave e a chave(qualquer palavra) ficando da seguinte forma, no nosso caso escolhemos criptografia md5.&lt;br /&gt;
auth &lt;num&gt;&lt;/num&gt;&lt;br /&gt;
&lt;num&gt; &lt;algorithm&gt; &lt;secret&gt;&lt;/secret&gt;&lt;/algorithm&gt;&lt;/num&gt;&lt;br /&gt;
&lt;br /&gt;
auth 1&lt;br /&gt;
1 md5 TesteComHeartBeat&lt;br /&gt;
&lt;br /&gt;
OBS.: O arquivo necessáriamente precisa ter permissão 600, ou seja, chmod 600 /etc/ha.d/authkeys.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Agora por ultimo vamos configurar o arquivo /etc/ha.d/haresources, nele indicamos o nodo primario, ip virtual e serviços a serem iniciados.&lt;br /&gt;
Ex.: Irei colocar um exemplo aqui diferente do que iremos usar, posi nesse post como só iremos testar o HA, vamos apenas colocar o IP virtual sem serviços.&lt;br /&gt;
cluster1 192.168.1.2 /etc/init.d/apache /etc/init.d/mysqld&lt;br /&gt;
&lt;br /&gt;
Nós iremos fazer apenas assim nesse primeiro momento.&lt;br /&gt;
cluster1 192.168.1.2/24/eth0:1&lt;br /&gt;
&lt;br /&gt;
Após feitas as configurações no NODO1 é só iniciar o heartbeat &quot;/etc/init.d/heartbeat start&quot; e depois copiar os arquivos aqui configurados para os outros servidores, lembrando, os arquivos (ha.cf, authkeys e haresources) tem que ser iguais nos 2 servidores.&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;b&gt;&lt;i&gt;Testes&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
Primeiros testes:&lt;br /&gt;
1) Copiar os arquivos para o outro servidor e ativar o heartBeat na inicialização do SO &quot;chkconfig --add heartbeat&quot;;&lt;br /&gt;
2) Desligar o servidor nodo2 e após reiniciar o nodo1;&lt;br /&gt;
3) Após iniciar o nodo1, espere uns 60 segundos (conforme a configuração no ha.cf - initdead 60 ),&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;3.1) Verifique se já existe o IP virtual - ifconfig&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;3.2) Após inciar o IP virtual, verifique o arquivo de logs, - tail -f /var/log/ha.log&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;3.3) Deixe em outra console um tcpdump rodando, para ver as conexões - tcpdump -i any port 694 -nn&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;3.4) Inicie o servidor de NODO2 e fique analizando os logs no nodo1, que o mesmo irá informar que o host está ativo&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;3.5) Agora fique analizando os logs no servidor de nodo1 e nodo2&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;3.6) Retire o cabo de rede do NODO1, que terá que necessáriamente subir a interface virtual no NODO2.&lt;br /&gt;
&lt;br /&gt;
Nesse caso acima, temos um problema, pois temos apenas 1 ponto de verificação pois nosso servidores tem apenas 1 interface de rede, na qual conecta a rede e ao mesmo tempos o serviços de HA, nesses casos podemos ter SPRINT BRAIN -O QUE È SPRINT BRAIN , ou seja, os dois servidores ficam com o IP virtual ou ficam em looup, habilitando e desabilitando a interface virtual. &lt;br /&gt;
Para corrigir esse problemas temos que ter mais de um ponto de verificação que nesse próximo caso iremos inseirir mais uma placa de rede (cabo cross) só para conectar entre os servidores em HA, caso a interface ponto-a-ponto venha a falhar o sistema irá testar a rede e IPS da outra rede. &amp;nbsp;Vamos então ajustar nossos servidores, começando pela configuração de rede.&lt;br /&gt;
&lt;br /&gt;
CONFIGURAÇÔES DE REDE&lt;br /&gt;
REDE LAN: 192.168.1.0/24&lt;br /&gt;
REDE HA: 10.10.10.0/30&lt;br /&gt;
GW: 192.168.1.1&lt;br /&gt;
IP Virtual: 192.168.1.2&lt;br /&gt;
&lt;br /&gt;
CONFIGURAÇÔES DE HOSTS&lt;br /&gt;
NODO1 do cluster&lt;br /&gt;
hostname: nodo1&lt;br /&gt;
IP ETH0: 192.168.1.101&lt;br /&gt;
IP ETH1: 10.10.10.1&lt;br /&gt;
&lt;br /&gt;
NODO2 do cluster&lt;br /&gt;
hostname: nodo2&lt;br /&gt;
IP ETH0: 192.168.1.102&lt;br /&gt;
IP ETH1: 10.10.10.2&lt;br /&gt;
&lt;br /&gt;
Essa nossa rede 10.10.10.0/30 é ideal que fique fora do switch que está interligando a outra rede 192.168.1.0/24, pois se parar o switch os servidores ainda conseguem se comunicar entre si. Na verdade a rede 10.10.10.0/30, deve ser ligada diretamente entre si, via cabo cross.&lt;br /&gt;
&lt;br /&gt;
Agora vamos ajustar o /etc/ha.d/ha.cf, deixando da seguinte forma:&lt;br /&gt;
logfile /var/log/ha-log.log&lt;br /&gt;
debugfile /var/log/ha-debug.log&lt;br /&gt;
logfacility local0&lt;br /&gt;
autojoin none&lt;br /&gt;
warntime 5&lt;br /&gt;
deadtime 15&lt;br /&gt;
initdead 60&lt;br /&gt;
keepalive 2&lt;br /&gt;
&lt;br /&gt;
respawn hacluster /usr/lib/heartbeat/ipfail # Teste de ping com redes diferentes&lt;br /&gt;
apiauth ipfail gid=haclient uid=hacluster&lt;br /&gt;
ping_group always_up_nodes 1192.168.1.10 192.168.1.5 192.168.1.6 #IP importantes da rede para testar, só irá definir que está para caso esses ips não responde - Esses ips são do servidor AD, switch e a minha máquina&lt;br /&gt;
deadping 5 # consida o host fora quando não respinder a 5 pings&lt;br /&gt;
&lt;br /&gt;
ucast eth0 192.168.1.101 # IP do servidor cluster1 na eth0&lt;br /&gt;
ucast eth0 192.168.1.102 # IP do servidor cluster2 na eth0&lt;br /&gt;
ucast eth1 10.10.10.1 # IP do servidor cluster1 na eth1&lt;br /&gt;
ucast eth1 10.10.10.2 # IP do servidor cluster2 na eth1&lt;br /&gt;
&lt;br /&gt;
auto_failback off&lt;br /&gt;
udpport 694&lt;br /&gt;
node cluster1&lt;br /&gt;
node cluster2&lt;br /&gt;
&lt;br /&gt;
Vamos explicar um pouco mais como irá funcionar essa nova configuração e os testes:&lt;br /&gt;
Testes:&lt;br /&gt;
1) Se cair a ETH1 de algum dos NODOS, não deve interferir no sistema, ou seja, continua na mesma;&lt;br /&gt;
2) Se cair a ETH1 dos dois NODOS, não deve interferir no sistema, ou seja, continua na mesma;&lt;br /&gt;
3) Se cair a ETH0 dos dois NODOS, não deve interferir no sistema, ou seja, continua na mesma;&lt;br /&gt;
4) Se cair a ETH0 no NODO que está desativado, não deve interferir no sistema, ou seja, continua na mesma;&lt;br /&gt;
5) Se cair a ETH0 no NODO que está ativo, o sistema irá passar para o outro NODO.&lt;br /&gt;
&lt;br /&gt;
Agora podemos fazer os testes novamente, e verificar se tudo está OK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Em breve estarei postando HA com replicação de dados com o GLUSTERFS.</content><link rel='replies' type='application/atom+xml' href='http://rafaeltomelin.blogspot.com/feeds/7715511851716142692/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://rafaeltomelin.blogspot.com/2011/01/cluster-em-ha.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5785733457648885241/posts/default/7715511851716142692'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5785733457648885241/posts/default/7715511851716142692'/><link rel='alternate' type='text/html' href='http://rafaeltomelin.blogspot.com/2011/01/cluster-em-ha.html' title='&lt;center&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6fa8dc; font-family: Arial, Helvetica, sans-serif; font-size: large;&quot;&gt;&lt;i&gt;&lt;b&gt;CLUSTER EM HA&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;/center&gt;'/><author><name>Rafael Tomelin</name><uri>http://www.blogger.com/profile/13705154019737635144</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5785733457648885241.post-5945901813013937184</id><published>2010-12-22T11:03:00.010-02:00</published><updated>2011-02-12T22:35:31.828-02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Cluster"/><title type='text'> O que é cluster </title><content type='html'>&amp;nbsp;&amp;nbsp; Cluster é um conjunto de computadores que trabalham em conjunto interligados via rede e sempre sincronizados um com os outros - cada computador do cluster é chamado de nodo- . A função do cluster para o usuário final é sempre estar representado por um único computador, indiferente de quandos computadores o cluster estiver trabalahndo.&lt;br /&gt;
&amp;nbsp;&amp;nbsp; O cluster também tem a finalidade de deixar o recurso disponivel para o usuário o maior tempo possível, sendo que se parar um computador do conjunto de computadores, os outros computadores assumem a função do computador parado, sem o usuário perceber.&lt;br /&gt;
Existem diversos tipos de cluster no qual iremos mostrar logo abaixo.&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;i&gt;TIPOS de cluster&lt;/i&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;i&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Alta Disponibilidade (High Availability (HA)):&lt;/b&gt;&lt;/i&gt; Tem a finalidade de deixar o recurso disponivel o maior tempo possível, caso um nodo do cluster venha a falhar o outro nodo assume automaticamente, sendo os dados sempre atualizados entre os nodos. &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Esse tipo de cluster é mais utilizado com serviços de correio eletronico e firewall.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Nas suas configurações pode ser configurado failover, ou seja, se o computador que parou de funcionar era o primario, ao voltar a funcionar assume todos os serviços novamente. Normalmente se deixa o failover desativado.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguGhW5mfu_1LWP1IuPV7Yt1yeN7eZf75hgdoOj0V3N9E3abKuVIJGGTKGI21fDgNjtesi0CYQC7-WbGOkCwQOihGkUu4nIUn9uvwVLEroJ_WRPdS45Z9Kp37g2-IGCYM_kWrfOnG0gyHs/s1600/Cluster+-+HA.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguGhW5mfu_1LWP1IuPV7Yt1yeN7eZf75hgdoOj0V3N9E3abKuVIJGGTKGI21fDgNjtesi0CYQC7-WbGOkCwQOihGkUu4nIUn9uvwVLEroJ_WRPdS45Z9Kp37g2-IGCYM_kWrfOnG0gyHs/s320/Cluster+-+HA.jpg&quot; width=&quot;292&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Cluster em HA&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; Como podemos ver na figura acima, podemos ter dois ou mais servidores fazendo o serviço de HA, sendo cada nodo com um IP e um IP virtual no nodo ativo. Os nodos ficam sempre se comunicando entre si e replicando os dados necessários.&amp;nbsp; Ao parar o nodo que está em funcionanmento, automaticamente o nodo secundario assume o serviço já startando o IP virtual. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; Balanceamento de carga (Load Balancing):&lt;/b&gt;&lt;/i&gt; Cluster de balanceamento de carga tem a finalidade de distribuir igualmente o processamento entre todos os nodos do cluster, sendo que se um nodo venha falhar é feita a redistribuição de processamento. Nesse tipo de cluster todos os nodos são responsaveis por controlar as requisições.&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFcdrsCuCAs26X1B0tJQEziLQcMkxsZmQWsyKuPcTs5d4kv6ByIrurDsGuLiVgRkcnuxRuk3ZmChzqhiwjlI7KcfCbbcei3VAJeRYghGhD70XbcMBO3u6lYkKYoXF0-l2XX_pQgA4R7RM/s1600/Cluster+-+LB.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFcdrsCuCAs26X1B0tJQEziLQcMkxsZmQWsyKuPcTs5d4kv6ByIrurDsGuLiVgRkcnuxRuk3ZmChzqhiwjlI7KcfCbbcei3VAJeRYghGhD70XbcMBO3u6lYkKYoXF0-l2XX_pQgA4R7RM/s320/Cluster+-+LB.jpg&quot; width=&quot;290&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Cluster em Load Balance&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; Conforme mostrado na figura acima, o cluster em Load Balance todos os nodos estão ativos e recebendo conexões, ou seja, fazendo o balanceamentro entre os server, logo abaixo irei explicar os 3 tipos de Load Balance possíveis.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp; Least Connections&lt;/b&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; Este tipo de Load Balance envia as requisições para o servidor com menor número de requisições/conexões. Por exemplo, se o servidor 1 está controlando atualmente 50 requisições/conexões, e o servidor 2 controla 25 requisições/conexões, e o servidor 3 controla 35 requisições/conexões, a próxima requisição/conexão será automaticamente direcionado para o servidor 2, pois o mesmo possui o menor numero de requisições ativas no momento.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp; Round Robin&lt;/b&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; O Load Balance em Round Robin, sempre envia uma requisição para cada servidor. Por exemplo, as conexões são enviadas para o servidor 1, depois servidor 2 e finalmente servidor 3 e depois retorna ao servidor 1.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp; Weighted Fair&lt;/b&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; O Load Balance em Weighted Fair, envia as requisições baseado na performance de cada servidor, caso um servidor tenha a performance melhor que o outtro, são enviadas mais requisições para o servidor de melhor perfomance. Por exemplo, se o servidor 1 é cinco vezes mais rápido no atendimento aos pedidos do que o servidor 2, e o servidor 2 é 2 vezes mais rápido que o servidor 3, o administrador coloca um peso maior de trabalho para o servidor 1, depois ao servidor 2 e por ultimo ao servidor 3.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; Alto Desempenho (HA and Load Balancing):&lt;/b&gt;&lt;/i&gt; Cluster de alto desempenho é o conjuto dos cluster de HA e Load Balancing, tem a finalidade de processar um grande volume de dados (LB) e estar sempre disponivel.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; Software de cluster baseado em linux&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; Existem alguns software para o serviço de cluster em linux, um dos mais conhecidos é o HeartBeat. Mas existem outros tais como piranha. mosix, UltraMonkey entre ourtos.&lt;br /&gt;
&amp;nbsp;&amp;nbsp; Também existem alguns software para fazer a sincronização dos dados entre servidores, tais como: drdb, glusterfs, rsync, entre outros.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; Agora que já falamos o que é cluster e os tipos de cluster, num próximo tópico irei instalar e configurar um cluster baseado no HeartBeat. &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; Até a próxima pessoal.</content><link rel='replies' type='application/atom+xml' href='http://rafaeltomelin.blogspot.com/feeds/5945901813013937184/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://rafaeltomelin.blogspot.com/2010/12/cluster.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5785733457648885241/posts/default/5945901813013937184'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5785733457648885241/posts/default/5945901813013937184'/><link rel='alternate' type='text/html' href='http://rafaeltomelin.blogspot.com/2010/12/cluster.html' title='&lt;div style=&quot;color: orange; text-align: center;&quot;&gt; &lt;span style=&quot;font-size: large; text-align: center;&quot;&gt;&lt;b&gt;&lt;i&gt;O que é cluster&lt;/i&gt;&lt;/b&gt;&lt;/span&gt; &lt;span style=&quot;font-size: large;&quot;&gt;&lt;/span&gt;&lt;/div&gt;'/><author><name>Rafael Tomelin</name><uri>http://www.blogger.com/profile/13705154019737635144</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguGhW5mfu_1LWP1IuPV7Yt1yeN7eZf75hgdoOj0V3N9E3abKuVIJGGTKGI21fDgNjtesi0CYQC7-WbGOkCwQOihGkUu4nIUn9uvwVLEroJ_WRPdS45Z9Kp37g2-IGCYM_kWrfOnG0gyHs/s72-c/Cluster+-+HA.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5785733457648885241.post-3374918110582937570</id><published>2010-12-21T15:37:00.023-02:00</published><updated>2011-02-12T22:35:46.651-02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Roteamento"/><title type='text'> Roteamento dinâmico com mais de um link</title><content type='html'>Bom pessoal, esse é o meu primeiro post e pretendo mostrar aqui como funciona o roteamento avançado com dois ou mais links.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Pretendo ser o mais claro possível na explicação, para que todos possam entender como funciona, então mãos a obra.&lt;br /&gt;
&lt;br /&gt;
Aqui nesse nosso ambiente de exemplo, iremos usar um servidor linux, com dois links de internet OI e GVT e a nossa rede interna.&lt;br /&gt;
O objetivo é demonstrar como se configura e o funcionamento de balancemanto de links, iremos mostrar as conexões saírem por links diferentes e caso um link pare de funcionar o outro assume imediatamente.&lt;br /&gt;
No final do post, irei colocar um script que fica monitorando o link e caso algum dos links fique fora, o script chaveia as conexões para o outro link, quando voltar o link o script retorna as regras padrão.&lt;br /&gt;
&lt;br /&gt;
Vamos agora então as configurações do nosso ambiente de rede para que possamos configurar o roteamento avançado, irei ir numerando o nosso passo-a-passo.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;1) Vamos para anotações de redes e IPs&lt;/span&gt;&lt;br /&gt;
Nossas redes:&lt;br /&gt;
REDE INTERNA: 192.168.1.0/24&lt;br /&gt;
REDE MODEM ADSL GVT: 10.10.10.0/30&lt;br /&gt;
REDE OI: 200.215.219.248/29&lt;br /&gt;
&lt;br /&gt;
IPs do nosso servidor firewall&lt;br /&gt;
IP ETH0 (LAN): 192.168.1.1&lt;br /&gt;
IP ETH1 GVT: 10.10.10.2&lt;br /&gt;
IP ETH2 OI: 200.215.219.250-254&lt;br /&gt;
ID do LINK OI:2&lt;br /&gt;
ID do LINK GVT:1 &lt;br /&gt;
&lt;br /&gt;
Agora que já temos nossas redes e IPs é só configurar os mesmos no nosso servidor linux. A nossa tabela de roteamento ficou assim:&lt;br /&gt;
&lt;br /&gt;
#route -n&lt;br /&gt;
Kernel IP routing table&lt;br /&gt;
Destination&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Gateway&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Genmask&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Flags Metric Ref&amp;nbsp;&amp;nbsp;&amp;nbsp; Use Iface&lt;br /&gt;
200.215.219.248 0.0.0.0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 255.255.255.248 U&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 eth2&lt;br /&gt;
192.168.1.0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.0.0.0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 255.255.255.0&amp;nbsp;&amp;nbsp; U&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 eth0&lt;br /&gt;
10.10.10.0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.0.0.0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 255.255.255.0&amp;nbsp;&amp;nbsp; U&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 eth1&lt;br /&gt;
0.0.0.0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 200.215.219.249 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.0.0.0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; UG&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 eth2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Agora iremos configurar nossa tabela de roteamento avançado é muito importante saber que cada tabela de roteamento tem que ter todas as rotas, podemos ver as tabelas exestentes atualmente em nosso servidor no arquivo &quot;/etc/iproute2/rt_tables&quot;. É nesse arquivo que iremos criar as nossas tabelas GVT e OI.&lt;br /&gt;
Vamos criar a nossa tabela da GVT com o id 200 e oi 201, ficando da seguinte forma nosso arquivo de tabelas: Para editar a tablea de toteamento acessa o arquivo com o comando vim&lt;br /&gt;
&lt;br /&gt;
#vim /etc/iproute2/rt_tables&lt;br /&gt;
&lt;br /&gt;
Arquivo após editado&lt;br /&gt;
#cat /etc/iproute2/rt_tables &lt;br /&gt;
255&amp;nbsp;&amp;nbsp;&amp;nbsp; local&lt;br /&gt;
254&amp;nbsp;&amp;nbsp;&amp;nbsp; main&lt;br /&gt;
253&amp;nbsp;&amp;nbsp;&amp;nbsp; default&lt;br /&gt;
200&amp;nbsp;&amp;nbsp;&amp;nbsp; gvt&lt;br /&gt;
201 &amp;nbsp;&amp;nbsp; oi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;2) Configurando tabelas de roteamento&lt;/span&gt;&lt;br /&gt;
Agora que já temos configurado nosso servidor e nossa tabela de roteamento, vamos popular nossas regras.&amp;nbsp; Vamos iniciar abrindo um arquivo em branco e vamos colocar as rotas de cada tabela.&lt;br /&gt;
&lt;br /&gt;
vim temp.txt&lt;br /&gt;
&lt;br /&gt;
#Table a da roteamento - ip route list table tabela&lt;br /&gt;
&lt;br /&gt;
#Tabela OI&lt;br /&gt;
ip route add 192.168.1.0/24 dev eth0 table oi&lt;br /&gt;
ip route add 10.10.10.0/30 via 10.10.10.1 dev eth1 table oi&lt;br /&gt;
ip route add default via 200.215.219.249 dev eth2 table oi&lt;br /&gt;
&lt;br /&gt;
#Table GVT&lt;br /&gt;
ip route add 192.168.1.0/24 dev eth0 table gvt&lt;br /&gt;
ip route add 200.215.219.248/29 dev eth2 table gvt&lt;br /&gt;
ip route add default via 10.10.10.1 dev eth1 table gvt&lt;br /&gt;
&lt;br /&gt;
Exemplo de cada tabela.&lt;br /&gt;
ip route list table oi&lt;br /&gt;
ip route list table gvt &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OBS.: Se tiver mais redes tais como VPN, DMZ, ... é só inserir em cada tabela as mesmas.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Se tiver outros links como MPLS, internet e VPN, crie uma nova tabela para o link, colocando as outras redes dentro da tabela. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;3) Marcação de pacotes&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Agora que já temos nossas rotas prontas, precisamos informar ao linux, qual pacote sai por qual link, isso se faz marcando os pacotes com o comando ip rule.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Quando marcamos o pacote temos algumas opções como from e to. Também é necessário dar uma prioridade a marcação de pacotes entre os numeros 0 e 32766.&amp;nbsp;&amp;nbsp; Vamos trabalhar com o numero 1000.&lt;br /&gt;
&lt;br /&gt;
Vamos começar a marcar os pacotes então&lt;br /&gt;
#Marcando os pacotes&lt;br /&gt;
#O fwmark indica o id do link que setamos no início, junto com os ip de interfaces&lt;br /&gt;
ip rule add from 200.215.219.250 lookup oi&lt;br /&gt;
ip rule add from 10.10.10.2 lookup gvt&lt;br /&gt;
ip rule add to 8.8.4.4 lookup gvt prio 900&lt;br /&gt;
ip rule add to 8.8.8.8 lookup oi prio 900&lt;br /&gt;
ip rule add to 200.215.219.248/29 lookup oi prio 1000&lt;br /&gt;
ip rule add to 10.10.10.0/24 lookup gvt prio 1000&lt;br /&gt;
ip rule add fwmark 1 lookup gvt prio 1500&lt;br /&gt;
ip rule add fwmark 2 lookup oi prio 1500&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Beleza a marcação de pacotes está pronta, vamos listar elas.&lt;br /&gt;
ip rule list&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;4)&amp;nbsp; Definindo uso dos links&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; Agora é onde iremos informar o que irá sair por cada link de internet, pois até o momento configuramos a saída.&lt;br /&gt;
&amp;nbsp;&amp;nbsp; Para configurar é necessário usar o IPTABLES sempre na tabela MANGLE na CHAIN PREROUTING&lt;br /&gt;
&lt;br /&gt;
Vamos antes definir que o nosso link da GVT é o padrão, ou seja, o que não for pela OI, irá sair pela GVT&lt;br /&gt;
&lt;br /&gt;
#conexões pela OI.&amp;nbsp; http, https e 110 - Aqui podemos colocar outras configurações se necessário&lt;br /&gt;
#O --set-mark indica o id do link que setamos no início, junto com os ip de interfaces e no fwmark do ip rule. &lt;br /&gt;
&lt;br /&gt;
iptables -t mangle -A PREROUTING -i eth0 -s 192.168.1.0/24 -j MARK --set-mark 1&lt;br /&gt;
iptables -t mangle -A PREROUTING -i eth0 -p icmp -d 8.8.8.8 -j MARK --set-mark 2&lt;br /&gt;
iptables -t mangle -A PREROUTING -i eth0 -p icmp -d 8.8.4.4 -j MARK --set-mark 1&lt;br /&gt;
iptables -t mangle -A PREROUTING -i eth0 -s 192.168.1.0/24 -p tcp -m multiport --dport 80,443,110 -j MARK --set-mark 2&lt;br /&gt;
&lt;br /&gt;
Após todas as regras criadas, iremos fazer os testes da seguinte forma:&lt;br /&gt;
&lt;br /&gt;
No nosso firewall, iremos executar o seguinte comando&lt;br /&gt;
tcpdump -i any host IP-da_maquina_de_teste(192.168.1.x) -nn&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Acessa o sire do terra e deve ir para um link&lt;br /&gt;
Fazer uma conexão via telnet na porta 25 deve ir para outro link Ex.: telnet smtp.terra.com.br 25&lt;br /&gt;
&lt;br /&gt;
É isso aí pessoal, agora estamos com duallink de forma a usar os dois links separandos por protocolos.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;5)Scripts finais&lt;/span&gt;&lt;br /&gt;
Agora irei colocar todas as regras juntas:&lt;br /&gt;
##########################&lt;br /&gt;
### SCRIPT COM TODAS AS REGRAS#&lt;br /&gt;
########################## &lt;br /&gt;
echo 1 &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;
&lt;br /&gt;
#Tabela OI&lt;br /&gt;
ip route add 192.168.1.0/24 dev eth0 table oi&lt;br /&gt;
ip route add 10.10.10.0/30 via 10.10.10.1 dev eth1 table oi&lt;br /&gt;
ip route add default via 200.215.219.249 dev eth2 table oi&lt;br /&gt;
&lt;br /&gt;
#Table GVT&lt;br /&gt;
ip route add 192.168.1.0/24 dev eth0 table gvt&lt;br /&gt;
ip route add 200.215.219.248/29 dev eth2 table gvt&lt;br /&gt;
ip route add default via 10.10.10.1 dev eth1 table gvt&lt;br /&gt;
&lt;br /&gt;
#Marcando os pacotes&lt;br /&gt;
ip rule add from 200.215.219.250 lookup oi&lt;br /&gt;
ip rule add from 10.10.10.2 lookup gvt&lt;br /&gt;
ip rule add to 8.8.4.4 lookup gvt prio 900&lt;br /&gt;
ip rule add to 8.8.8.8 lookup oi prio 900&lt;br /&gt;
ip rule add to 200.215.219.248/29 lookup oi prio 1000&lt;br /&gt;
ip rule add to 10.10.10.0/24 lookup gvt prio 1000&lt;br /&gt;
ip rule add fwmark 1 lookup gvt prio 1500&lt;br /&gt;
ip rule add fwmark 2 lookup oi prio 1500&lt;br /&gt;
&lt;br /&gt;
iptables -t mangle -A PREROUTING -i eth0 -s 192.168.1.0/24 -j MARK --set-mark 1&lt;br /&gt;
iptables -t mangle -A PREROUTING -i eth0 -p icmp -d 8.8.8.8 -j MARK --set-mark 2&lt;br /&gt;
iptables -t mangle -A PREROUTING -i eth0 -p icmp -d 8.8.4.4 -j MARK --set-mark 1&lt;br /&gt;
iptables -t mangle -A PREROUTING -i eth0 -s 192.168.1.0/24 -p tcp -m multiport --dport 80,443,110 -j MARK --set-mark 2&lt;br /&gt;
&lt;br /&gt;
#Compartilhar a internet&lt;br /&gt;
iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -o eth1 -j MASQUERADE&lt;br /&gt;
iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -o eth2 -j MASQUERADE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;6) Monitorando o link&lt;/span&gt;&lt;br /&gt;
SCRIPT DE MONITORAMENTO DO LINK&lt;br /&gt;
OBS.: Colocar o script na crond para rodar a cada 3 minutos&lt;br /&gt;
###############################&lt;br /&gt;
### SCRIPT MONITORAMENTO DO LINK###&lt;br /&gt;
###############################&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#####################################&lt;br /&gt;
#### VARIAVEIS&amp;nbsp; #####################&lt;br /&gt;
#####################################&lt;br /&gt;
OI=&quot;8.8.8.8&quot;&lt;br /&gt;
GVT=&quot;8.8.4.4&quot;&lt;br /&gt;
LINKOI=&quot;200.215.219.248/29&quot;&lt;br /&gt;
LINKGVT=&quot;10.10.10.0/24&quot;&lt;br /&gt;
&lt;br /&gt;
PING=&quot;ping -c 1&quot;&lt;br /&gt;
&lt;br /&gt;
LINK=0&lt;br /&gt;
&lt;br /&gt;
#####################################&lt;br /&gt;
#### TESTE DE LINKS #################&lt;br /&gt;
#####################################&lt;br /&gt;
if (( ! `$PING&amp;nbsp; $GVT -I eth1 &amp;gt; /dev/null` ) &amp;amp;&amp;amp; ( `$PING&amp;nbsp; $OI -I eth2 &amp;gt; /dev/null` ));then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; LINK=$GVT&lt;br /&gt;
elif (( `$PING&amp;nbsp; $GVT -I eth1 &amp;gt; /dev/null` ) &amp;amp;&amp;amp; ( ! `$PING&amp;nbsp; $OI -I eth2 &amp;gt; /dev/null` ));then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LINK=$OI&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#for i in $OI $GVT ; do&lt;br /&gt;
#&lt;br /&gt;
#&amp;nbsp;&amp;nbsp;&amp;nbsp; if ( !&amp;nbsp; `$PING&amp;nbsp; $i &amp;gt; /dev/null` );then&lt;br /&gt;
#&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if [ $LINK == 0 ]; then&lt;br /&gt;
#&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; LINK=$i&lt;br /&gt;
#&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;br /&gt;
#&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; LINK=1&lt;br /&gt;
#&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; fi&lt;br /&gt;
#&amp;nbsp;&amp;nbsp;&amp;nbsp; fi&lt;br /&gt;
#done&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#####################################&lt;br /&gt;
#### ALTERACAO DE STATUS ############&lt;br /&gt;
#####################################&lt;br /&gt;
if [ &quot;$LINK&quot; == 0 ];then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if [ -e /tmp/link ];then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; ip rule del prio 1200&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; rm -rf /tmp/link&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; fi&lt;br /&gt;
elif [ &quot;$LINK&quot; == 1 ];then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; exit&lt;br /&gt;
elif [ &quot;$LINK&quot; == &quot;$OI&quot; ]; then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if [ ! -e /tmp/link ];then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; ip rule add fwmark 2 lookup gvt prio 1200&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; echo &quot;oi&quot; &amp;gt; /tmp/link&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; fi&lt;br /&gt;
elif [ &quot;$LINK&quot; == &quot;$GVT&quot; ]; then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if [ ! -e /tmp/link ];then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; ip rule add fwmark 1 lookup oi prio 1200&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; echo &quot;gvt&quot; &amp;gt; /tmp/link&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; fi&lt;br /&gt;
fi</content><link rel='replies' type='application/atom+xml' href='http://rafaeltomelin.blogspot.com/feeds/3374918110582937570/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://rafaeltomelin.blogspot.com/2010/12/roteamento-dinamico-com-mais-de-um-link.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5785733457648885241/posts/default/3374918110582937570'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5785733457648885241/posts/default/3374918110582937570'/><link rel='alternate' type='text/html' href='http://rafaeltomelin.blogspot.com/2010/12/roteamento-dinamico-com-mais-de-um-link.html' title='&lt;div style=&quot;color: lime; text-align: center;&quot;&gt; &lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Roteamento dinâmico com mais de um link&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;'/><author><name>Rafael Tomelin</name><uri>http://www.blogger.com/profile/13705154019737635144</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>