Howdy,

I'd like to be able to record all incoming and outgoing mail for a
particular user on an IMail box running on NT. Since it provides no such
functionality, but does allow all in-/out-going mail to be forwarded
elseware, I was thinking of forwarding them all to an account on our
qmail box, which would then filter (massively) the incoming mail to
stick only those mails to or from the particular user into the maildir,
discarding the rest. (Network traffic would be sacrificed in return for
sparse disk usage).

FAQ 8.2 gave me the idea that as incoming mail hits the .qmail file, I
can use (g)awk to see if the username appears in the stream. If I exit,
the message is bit bucketed, otherwise it drops to the next line the
.qmail, which would be delivery to a Maildir.

Something like:
  | awk '/^$/ { exit } /^[uU][sS][][eE][rR]-/ { print }'

Any flaws to my thinking? Is there something better than a bare username
I should be searching for? As I understand it, the envelope has already
been removed by the time it hits the individual .qmail files, and
parsing headers leads to gray hairs. My thinking is that thsi would
catch all of the email, plus some unnecessary garbage, which is probably
acceptable.

TIA,

-Tillman Hodgson

Reply via email to