# Setting up smtp server



## Criosphinx (May 6, 2010)

Hi everybody, I hope you can give me advice about this.

I work fixing computers for small business/home users, its mostly removing virus, replace damaged HD, PSU, reinstall Windows,etc.

One of my clients has 25-30 employes and he suspects someone is sending information to his competitors, he asked me if there is a way to save all the outgoing emails. Right now they have a POP3 email service with "@companyname" and use Outlook to send and receive(they don't have a fixed IP)

I was thinking in setting up a FreeBSD machine with a smtp server and configure it to save the emails

Is that possible? and, easy? or is there and easier way to do it? I want to give him the best solution

I'm not new to freebsd but use it mostly for hobby, I have setup Apache, Mysql, and other database servers but never an email server, and the idea is that I could later put more services in this server like network storage and database that he could find useful too


----------



## graudeejs (May 6, 2010)

try this (I haven't done this)
http://www.freebsdonline.com/content/view/570/520/


----------



## ondra_knezour (May 6, 2010)

I would use "builtin" Sendmail for SMTP and mail/dovecot for POP3/IMAP as solution, which can be extended with antivirus (ClamAV?), antispam (Spamassasin?) etc.

I don't consider it hard to setup, but it will require lot of doc reading, if you are doing it first time.

Others may and probably will recommend additional solutions, i.e. Postfix and Exim are well known MTA (mail transfer agents) used instead of Sendmail etc.

As first step I recommend making exact list of functions you are asking, i.e. all mails saved, all mails scanned for viruses, spam deleted/marked for further processing by clients software, which clients (SW) will clients (people) use to connect to your server, if you will require encryption of password/data transmission, if clients will be allowed to send/read messages using this server from outside of your network etc. With this list by hand browse through documentation to mentioned software, check if it is able to meet your requirements and compare, which can done it in way you will prefer. Exact knowledge of desired result is most useful "tool" to acomplish it.


----------



## phoenix (May 6, 2010)

Very easy to do if you have FreeBSD running on the router/firewall.  We do this at all our secondary schools so that we can track e-mail-spewing virus infections back to the private IP of the sending system.

It's one IPFW rule to proxy all outgoing SMTP connections (no changes on clients required):

```
ipfw add fwd localhost:25 tcp from <local subnet> to any in recv <internal interface>
```
.

Install Postfix on the firewall.  Configure it with relayhost=[the.real.smtp.server].  And set the always_bcc option to some e-mail address.

Then every outgoing SMTP connection will be proxied via the FreeBSD box, and every outgoing message will be copied to the always_bcc address.

Unless they pull out telnet, no one will know.


----------



## kdemidofff (May 17, 2010)

if they use secure mail host like gmail or something it will not work
better place some monitoring program on PC and take screenshoots or keystroke recording


----------



## SirDice (May 17, 2010)

Criosphinx said:
			
		

> One of my clients has 25-30 employes and he suspects someone is sending information to his competitors, he asked me if there is a way to save all the outgoing emails.





			
				kdulep said:
			
		

> better place some monitoring program on PC and take screenshoots or keystroke recording



Check your local laws concerning privacy before actually implementing it. What your client is asking may not be legal.


----------

