From: mouss (no email)
Date: Mon Aug 01 2005 - 12:50:22 EDT
Scott Merrill wrote:
>Hello all.
>
>I've searched for some time, and read a fair number of archive messages,
>but I haven't found anything addressing my need (quite possibly due to
>poor search terms on my part).
>
>Management wants to ensure that all emails from any sender at CLIENT are
>automatically sent to several local recipients. This needs to be done
>on the mail server to ensure that mail from CLIENT is always distributed
>internally regardless of which recipient PCs are running.
>
>I originally asked that we encourage CLIENT to manually include the
>necessary recipients, but my suggestion was rejected. =(
>
>As a first attempt, I created an alias, 'client', and used this in a
>sender_bcc_maps:
>sender_bcc_maps = hash:/etc/postfix/sender_bcc_maps
>
>$ cat /etc/postfix/sender_bcc_maps
>@client.com
>
> is an alias populated by the virtual users who need to
>receive these messages.
>
>This works fine for people not directly addressed by CLIENT in the
>original messages; but people included on the To or Cc lines are getting
>duplicate messages, causing some confusion.
>
>I _think_ I want to use an after-queue content filter to modify the
>incoming messages from CLIENT. I hacked Bennett Todd's smtpprox filter
>to determine which local recipients were not already recieiving the
>message, and then add a BCC header for them.
>
>During testing, adding the header worked fine, but the message was never
>delivered to the BCC recipients.
>
>It was my understanding that Postfix uses a single queue file for all
>recipients of a message. As such, I thought that adding the BCC header
>and requeueing the message would accomplish what I wanted. I guess my
>initial understanding was mistaken.
>
>Most of the search results I found so far deal with _archiving_ messages
>based on some condition(s). I want to actually deliver the messages to
>additional recipients based on some condition(s).
>
>I'm using virtual users, so I can't rely on procmail.
>
>Management really wants the _original_ message sent to all necessary
>local recipients, so that they can see who else was included in the
>original delivery. Otherwise I'd just use a script to forward copies to
>the necessary recipients.
>
>I tried using smtpprox as a before-queue filter, but kept getting:
>"warning: received garbage from proxy 127.0.0.1:10025: Received DATA
>command, beginning filtering."
>The warnings on the before-queue readme that it is only suitable for
>low-volume sites have me concerned, too. What specifically is
>considered "low-volume" in the context of that document?
>
>Is it possible for me to accomplish what's been asked of me? If so, any
>pointers or suggestions would be greatly appreciated!
>
>
The BCC header is used by the MUA (outlook, thunderbird, pine, ...).
If you use smtpproxy, you just need to issue the "RCPT TO" command for
every recipient that should get the message.
You can of course use procmail or maildrop with virtual. see
virtual_transport and the MAILDROP README.
This is a simpler approach. here is an excerpt from maildropex manpage.
....
Check if the Message-ID: header in the message is identical to the
same
header that was recently seen. Discard the message if it is,
otherwise
continue to filter the message:
`reformail -D 8000 duplicate.cache`
if ( $RETURNCODE == 0 )
exit
The reformail command maintains a list of recently seen
Message-IDs in
the file duplicate.cache.
....
|
|
|