[MASOCH-L] postfix, procmail and Return-Path

Christian Lyra lyra at pop-pr.rnp.br
Wed Aug 22 18:25:51 BRT 2007


Caros,

	Eu utilizo uma combinação de aliases e procmail para criar mailing 
lists simples. A ideia é ter um arquivo com os endereços de email, que 
são lidos por um "script" procmail disparado a partir de um alias. Ou 
seja:

no /etc/aliases eu tenho:
teste:          |"procmail -m /etc/alias.d/procmail-teste"

o /etc/alias.d/procmail-teste tem:

SHELL=/bin/sh
PATH=/bin:/usr/bin:/usr/local/bin:
WHITELIST=/etc/alias.d/allow_list_teste

FROM=`formail -IReply-To: -rtzxTo:`

:0
* ^TOteste
* ? fgrep -sixq $FROM $WHITELIST
{
        SUBJECT=`formail -xSubject:`
        :0 fw
        * ! ? egrep -sixq ".*\[TESTE\].*"
        | formail -i "Subject: [TESTE]$SUBJECT"

        TO=`cat $WHITELIST | tr "\n" " "`
        :0
        ! $TO
}

:0
* ^TOteste
/home/foo/listas/teste/

E finalmente o arquivo /etc/alias.d/allow_list_teste tem a lista de 
endereços de destino. Aparentemente tudo funciona como deveria: pessoas 
que não estão estão nessa lista não conseguem enviar mails para a 
lista, emails vindos de pessoas inscritas são aceitos e distribuidos.

No entanto, esbarrei num problema... quando um mail é enviado para 
a "lista", o procmail/postfix troca o Return-Path para "nobody", e se 
por acaso algum dos endereços da lista estiver incorreto o sender nunca 
vai ficar sabendo. 

Tem solução isso?


-- 
Christian Lyra
POP-PR - RNP

http://lyra.soueu.com.br

  A novice asked the master: ``I have a program that sometime runs and 
sometimes aborts. I have followed the rules of programming, yet I am 
totally baffled. What is the reason for this?'' 
  The master replied: ``You are confused because you do not understand 
Tao. Only a fool expects rational behavior from his fellow humans. Why 
do you expect it from a machine that humans have constructed? Computers 
simulate determinism; only Tao is
  perfect. 
						The Tao Of Programing


More information about the masoch-l mailing list