Solved

Mail Monitoring

Posted on 1998-10-24
11
208 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

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…
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
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.

746 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

13 Experts available now in Live!

Get 1:1 Help Now