Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Mail Monitoring

Posted on 1998-10-24
11
Medium Priority
?
215 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

 

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 400 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
 

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses

610 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