[Mimedefang] recipient deal

Joseph Brennan brennan at columbia.edu
Wed Feb 10 11:18:52 EST 2010



--On Wednesday, February 10, 2010 10:21 AM +0000 Juan Vicente Piñero Perez 
<alegria at ing.iac.es> wrote:

> Hi List
> We are using mimedefang to add a disclaimer test at messages footer and
> work perfect but now we want to add it only to mails sent to outside of
> our domain. We don't want add disclaimer to mail send between us. I'm
> using @Recipients array and the current recipient $Recipients[-1], but
> does not work for us. If the list of recipients is just one everything is
> ok, but if we mix several recipients from inside and outside the single
> recipient currently under consideration is mistaken.
>
> We tested a  set of things.
>
> sub filter_recipient
> mimedefang with -t option
> write recipients to a file in sub filter_begin
>
> What is the best way to check recipient to act in consequence?
> What I'm doing wrong?


A message to many recipients is still one message.  It either has the
disclaimer in it, or not.

In filter_begin, you could loop through @Recipients, and if at least
one is not local, add the disclaimer.

OK I know what you really want to do.  I think it is possible to
generate a second message with disclaimer, remove the outside recipients
from the original, and put them as the recipients of the second message,
but, ugh... enjoy.


Joseph Brennan
Columbia University Information Technology






More information about the MIMEDefang mailing list