[GTER] Errata: Re: Fwd: Emails com MTA diferente do sender sendo bloqueados pelo UOL

Antonio Augusto de Cintra Batista antonio at CintraBatista.net
Sat Oct 11 00:05:33 -03 2003


Errata:
Onde se lê $MEU_SMTP, substitua literalmente pelo
smtp.server.que.eu.uso.com.br
Ou seja, a variável MEU_SMTP se torna inútil.
É desta forma que eu faço na prática, e ao tentar disponibilizar o
script de uma forma mais genérica me esqueci que a variável do shell não
é expandida dentro dos comandos do awk.

Se alguém souber como fazer para o awk receber o conteúdo de uma
variável do shell, que seja bem-vinda a sua ajuda.

On Fri, Oct 10, 2003 at 06:00:53PM -0300, Antonio Augusto de Cintra Batista wrote:
> 
> >>>>>> recorte aqui <<<<<<<<<
> #!/bin/bash
>                                                                                                         
> # Copyright (c) 2003 Antonio Batista <antonio at CintraBatista.net>
> #
> # This program is free software; you can redistribute it and/or modify
> # it under the terms of the GNU General Public License as published by
> # the Free Software Foundation; either version 2 of the License, or
> # (at your option) any later version.
> #
> # This program is distributed in the hope that it will be useful,
> # but WITHOUT ANY WARRANTY; without even the implied warranty of
> # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> # GNU General Public License for more details.
>                                                                                                         
> PATH=/bin:/usr/bin:/usr/local/bin
> MAILBOX="/meu/mailbox/de/emails/indesejados"
> MEU_SMTP="smtp.server.que.eu.uso.com.br"
> WHITE_LIST="/minha/white/list/de/enderecos/ip"
>                                                                                                         
> cat $MAILBOX |awk '{ linha2 = linha1 ; linha1 = $0 ; if ( linha1 ~ /by
> $MEU_SMTP/ ) print linha2 }' |grep "^Received" |awk -F "[" '{ print $2
> }' |awk -F "]" '{ print $1 }' |grep "\." |grep -v "^$" |sort |uniq |grep
> -v -f $WHITE_LIST
>                                                                                                         
> >>>>>> recorte aqui <<<<<<<<<
> 



More information about the gter mailing list