If there are more than 2 users at sibs.com then the
number of cases becomes astronomical. As Soren
said, it's best to use sendmail!
Well, the cases are not that bad if you play with the rewrite rules to
provide the full envelope address on hte commadn line (as the variable
option to -a for example). It is still pretty clear that this is the
_totally_ wrong way to do it.
Another (kludgy) alternative would be to have a logfile for each of the
recepients (joe.log, tom.log) somewhere, and feed the messageid into
each one. Then, after checking each recepient, you'd check to see
whether THIS messageid was already processed for that person, and if
so, skip out and continue (to process for any other reciepients).
In any case, you _still_ miss it when the headers have something to:
Who do I deliver it to... I hate to harp, but you _NEED_ the
envelope. Everything else is simply broken and fails in _common_ cases.
Since I have an interest in setting up such a forwarding system myself
((I'm getting a domain soon, and I'll be forwarding my own mail, as
well as family members and some friends), this is a rather important
issue to me. I'm not root on the system (i.e. it is a domain to which
ALL uids forward into the one mailbox on someone else's physical
system), which I believe presents some issues with using sendmail to
resolve this sort of thing, does it not?
Yup. But to make this work, you _must_ be able to get ruleset 0
rewritten a little. Without it there is simply no hope of making this
work at all.