Ubuntu – How to copy outgoing messages on sendmail

sendmailsmtpUbuntuvpswebmail

I've searched the serverfault and Google, but did not find anything related to my question yet.

So, I have a customer that wants to read all emails sent by his employees.
I've configured a VPS with dovecot and sendmail. So he wants to controlthe quality of service by monitoring all the sent emails from our server.

What the solution may be?

P.S.: VPS is on Ubuntu. ISPmanager installed and Roundcube as the webmail agent.

Best Answer

The short answer is "you can't".

The longer answer, from the sendmail FAQ, is

How can I automatically copy messages based on sender or recipient addresses?

It would require custom programming [...] Note that no such feature has been added to sendmail. When asked about this one of the sendmail developers said it was "because we still believe a bit in privacy."

Basically, the person who's asking you to do this is foolish to believe that it can be done. Sure, you could use a different MTA, maybe something written by people who don't care about privacy. But unless he proxies and screens all outbound HTTP and blocks all other outbound TCP including HTTPS, and all outbound UDP full-stop, he hasn't a hope of preventing a determined employee from emailing something, somehow.

Moreover, although we can't do legal advice here, you may find that computer privacy legislation in your jurisdiction forbids or tightly regulates email interception, and it is possible that you could find yourself liable for what you implement.

30,000-foot view: this is a social problem. Don't look for a technical solution. That never works.

Related Topic