procmail
[Top] [All Lists]

Re: Procmailers beware: BCC handling

1996-11-15 17:06:38
Mark Jared Nightingale <mark(_at_)aecinfo(_dot_)com> writes:
At 01:23 PM 11/14/96 -0600, P.Guenther wrote:
I'm Bcc'ing this message to both
you and list.  You'll get two copies which will differ in their envelope
_senders_, *not* their envelope recipients.  The envelope recipient will
be your address, even for the copy that goes through the list.

       The envelope *recipient* is exactly what I want.

Then you'll have to ask sendmail for it.  In the normal case
(non-virtual domains), you have the envelope recipient in $LOGNAME, as
procmail is being run as the recipient.  We've seen a lot of simple
minded implementations of virtual domains that result in the envelope
being lost while the message is being processed by sendmail.  Many
people have then asked how to recreate the envelope from the header
from inside of procmail, and then get frustrated when told it's
impossible.  This is not procmail's fault, but rather the fault of
whoever designed your virtual domain implementation.


....
       From your knowledge of my dilemma, do you think sendmail 8.8
       will resolve this issue for me?


DISCLAIMER: while I have hacked sendmail.cf's before, I do not consider
myself a sendmail 'expert'.  In particular, I have never used the
virtusertable "FEATURE" myself, and thus can only base my answer from
staring at the docs and the proto.m4 file.  That said...

It is my understanding that an m4 config line of:

Cw baz
FEATURE(virtusertable, `hash -o /etc/virtusertable')


Combined with a database in Berkeley DB 'hash' format named
/etc/virtusertable.db that contains:

foo(_at_)baz            foo(_at_)another(_dot_)site
bar(_at_)baz            bar
error(_at_)baz  error: NOUSER "The user error doesn't exist"
@baz            other_addresses(_at_)another(_dot_)site


Will result in mail sent to foo(_at_)baz going to foo(_at_)another(_dot_)site, 
mail sent
to bar(_at_)baz going to the local user/address 'bar' (possibly an alias),
mail sent to error(_at_)baz will be bounced with a "no such user" error, and
mail to any other 'user' at "baz" going to 
other_addresses(_at_)another(_dot_)site(_dot_)

If this mapping needs to be edited by untrusted or non-root users, then
the situation is more complex, but still managable.  You would need to
write your own cf lines to do the lookups in a separate database for
just the 'baz' domain, and perhaps check the result for foo(_at_)bar format,
but it's not impossible.

If the above capability solves your problem, then bingo.  If not, I
suggest you try posting to comp.mail.sendmail, and if this is important
enough, I'm sure there are people out there (not me) who would be
willing to be paid to work out a solution for you that covers all the
bases.  Just be sure they understand what you've tried before and what
didn't work with it before they start working on a solution.


Philip Guenther

<Prev in Thread] Current Thread [Next in Thread>