Rumor has it that Gregory J. Forkin may have mentioned these words:
>Tim--
>I have a suggestion for you. But first, I think that you should look at the 
>real implications of the request, that is if this starts for one employee 
>you can be sure there will be others.

I agree with Gregory on being aware of the implications, and what I have to
suggest may not be pretty either, but here goes:

*If* this person has a static IP address, and you're using tcpserver, you
can log all outbound mail from his IP address, so at least you'll have
proof of "email-infidelity"...

I will *not* go into the illegalities of hijacking someone's outbound email
in this manner..... let the PHB's get in trouble for that. I'm just letting
you know it's possible.

Add a line to the /etc/tcp.smtp file, like this:

xx.xx.xx.xx:allow,RELAYCLIENT="pookie"

where xx.xx.xx.xx is the person's static IP address, then in
/var/qmail/control/virtualdomains, put in this line:

pookie:alias-pookie

then make the file /var/qmail/alias/.qmail-pookie-default which contains:
|/var/qmail/alias/logeverything.pl

where logeverything.pl is a perl script that logs all messages to a file,
here's my quick&dirty, but it may help for starters...

#!/usr/local/bin/perl
# This is a quick test program to see if the selective mail routing will work.
# Open a file to store all of the environment variables,

open (Q,">>/var/qmail/alias/pookie-logger.txt");

# go thru each environment variable and write them to my logfile...

foreach $quack ( sort(keys(%ENV))) {
        print Q "ENV - $quack = $ENV{$quack}\n";
}

print Q "\n\n";

# open a mail to re-mail everything that comes in to my real mail account...

open (MAIL,"|/var/qmail/bin/qmail-inject $ENV{'EXT2'}");
open (MAIL2,"|/var/qmail/bin/qmail-inject mail\@me.too");

@zline = <STDIN>;

foreach $liner (@zline) {

        print MAIL "$liner";
        print MAIL2 "$liner";

# and also send a copy of the mail to the logfile that I have.

        print Q "OrgMail: $liner";
}


# Shut 'er down, boys!!! ;-)

close (Q);
close (MAIL);
close (MAIL2);

=================

This proggie will output some extra info to the logfile, like the
environment variables - it's good for a beginner so s/he can find out what
the ENV variables look like, what to expect for parameters, etc...

Hope this helps,
Roger "Merch" Merchberger
--
Roger "Merch" Merchberger   ---   sysadmin, Iceberg Computers
Recycling is good, right???  Ok, so I'll recycle an old .sig.

If at first you don't succeed, nuclear warhead
disarmament should *not* be your first career choice.

Reply via email to