Solved

Mail Monitoring

Posted on 1998-10-24
11
209 Views
Last Modified: 2010-04-20
Is it possible to make a copy of all incoming mail for certain accounts and send it to another account to be monitored ??  Also is it possible to stop certain accounts receiving attachments ??  If any of these are possible how can I acheive this ?
0
Comment
Question by:checkin
  • 3
  • 3
  • 3
  • +2
11 Comments
 
LVL 3

Expert Comment

by:marcelofr
ID: 1638339
If you can put privacy issues aside, qmail (http://www.qmail.org/) does this by default: each incoming mail is forwarded to the account and to an special account for accounting pourposes. You can turn this to whatever you want.

Cutting off attachments may need some more work but it´s not impossible...
0
 
LVL 84

Expert Comment

by:ozo
ID: 1638340
you can add an entry in the aliases file
0
 
LVL 2

Expert Comment

by:JYoungman
ID: 1638341
To elaborate on ozo's answer, for Sendmail you put this in /etc/aliases:-

james: \james, /var/spy/mail/james

This makes james's mail go to him, but also saves a copy in that file.

0
 

Author Comment

by:checkin
ID: 1638342
JYoungman :

If I wanted to make a copy to say my account could I point the file directly to my mailbox ?


0
 
LVL 4

Accepted Solution

by:
davidmwilliams earned 100 total points
ID: 1638343
 Yes, you can point directly to your mailbox using the aliases file.
  If you wanted to spy on 'james', and your account was 'fred', you would edit /etc/aliases or /etc/mail/aliases to have a line that read -

james:  james, fred

  After you edit the file, be sure to run the newaliases command.

  Now James gets his mail as normal, and without knowing you are spying, and you will also receive mail for him in your mailbox.
0
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 

Author Comment

by:checkin
ID: 1638344
Thank you David, thats just what I needed.  Now all is I have to figure out is how to stop certain accounts receiving attachments.
0
 
LVL 4

Expert Comment

by:davidmwilliams
ID: 1638345
Unfortunately, I don't think that is actually possible, because the SMTP server does not know what it is receiving.  However, if you have any control over the mail reader that people use, perhaps you could prevent any readers being installed that handle MIME - because then any attachments received will not be decodable.
0
 
LVL 84

Expert Comment

by:ozo
ID: 1638346
james:"| /usr/local/bin/filterattachments"
0
 
LVL 4

Expert Comment

by:davidmwilliams
ID: 1638347
 Is 'filterattachments' a real program?  Where do you get it from?  It certainly doesn't come with any release of Unix that I know of ...
0
 

Author Comment

by:checkin
ID: 1638348
Where do I get the filterattachments program from OZO ?
0
 
LVL 84

Expert Comment

by:ozo
ID: 1638349
sorry, as far as I know, you would write it. (which is why I thought it would be in /usr/local/bin/)
the above notation is just how you would invoke it from aliases

perhaps such a program might look something like:

#!/usr/bin/perl
$/="\n\n";
$_ = <>;
die "attachments rejected" if /^Content-Type: multipart/im;
open(MAIL,">>/usr/spool/mail/james") or die "can't append to mailbox:$!";
print MAIL;
while( <> ){ print MAIL }
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now