Local Mail Server Help


Active Member
I have a very cheap CCTV DVR that i bought some years back, and yes, it is rubbish. It will be replaced at some point, but for now it works.

However, i would rather like it to send me E-Mail alerts, but there is no way i am connecting in to the internet, because it is so FULL of security holes, and probably phones home to its Chinese manufacturer too.

So i came up with the following plan:
Connect the DVR to an intermediate windows box which has internet access, but do not allow the DVR internet access through this connection. This could be done with VLAN's ( i think ) however my current router does not support them, so my plan is to have two NIC's on the Windows box: One connected to WAN through my regular router, and one connected to the DVR.

Then, i would run some software on the Windows box, a mail server or something, that would do EITHER:

a) SMTP server that the DVR can connect to, and send email to my regular outlook account through this,
b) Some setup that would look like an SMTP server to my DVR, but then look like a regular client to an external service such as Gmail, and then the mail would actually be send from a Gmail account, to my outlook account (or any other email account) through some setup on the Windows box.

And i do not want to give ANY inbound access or port forwarding to the Windows box for security reasons (Don't see why this is needed for outbound email, my regular email client manages it without inbound access), or have to use a registered domain name.

However i have no idea how to really set this up, i seem to find all the mail protocols etc confusing. I have played around with hMailServer, but i have got nowhere and not actually sure if this is the best software for the job.

Sorry if my question is confusing, i can explain further if needed.

It all depends on what the DVR box accepts in terms of SMTP (outbound mail) settings. If you can get it to interact with any SMTP server, you might as well just put it on your network and create an account for it to send mail from using an online mail account. I know you're worried about the security of the device. You could segment the device on its own VLAN like you suggested to keep it away from traffic on the rest of your network. You could also firewall it by MAC address or IP filtering.
Thanks for the reply.
I have not experimented much with the SMTP settings on the DVR, however i think it is likely it will accept any server bar any compatibility issues, and although i could put it on the network with VLAN's, unfortunately my current setup (Router etc) will not support VLAN's. :(
So basically i need a recommendation of a simple SMTP software i can run on windows, that i can use with minimal configuration ideally for outbound only email. As i mentioned, it is OK if this does actually use an online mail account, and the local software just "Relays" the mail from the DVR to the online mail outbox.
Your plan to connect the DVR to an intermediate Windows box with two NICs and run some software to send email alerts sounds feasible. Here are some steps you can take to set up the email alerts:
  1. Set up the Windows box with two NICs. Connect one NIC to the DVR and the other to the internet.
  2. Install a mail server software like hMailServer on the Windows box. Configure the software to listen on the NIC connected to the DVR. You can set up the SMTP server on hMailServer and configure it to send emails to your regular email account.
  3. Configure the DVR to send emails to the IP address of the Windows box on the NIC connected to the DVR. The DVR should be configured with the SMTP server details you set up in hMailServer.
  4. Test the setup by triggering an event on the DVR that should send an email alert. If everything is set up correctly, you should receive an email on your regular email account.
If you don't want to expose your Windows box to the internet, you can use a third-party SMTP service like SendGrid or Mailgun. These services allow you to send emails using their servers, so you don't need to set up your own mail server. You can configure hMailServer to use the third-party SMTP service to send emails.
To summarize, your setup would look like this:
DVR ---(NIC1)--> Windows Box ---(NIC2)--> Internet | (hMailServer configured to send emails to your regular email account)
Your plan to use an intermediate Windows machine to send email notifications from your CCTV DVR while keeping it isolated from the internet is a smart approach for security reasons. Here are some steps you can follow to put it up:

Install a mail server on the Windows box. hMailServer is an excellent solution as it is free, simple to use, and supports both SMTP and POP3 protocols.​

Configure hMailServer to allow relaying from the IP address of your CCTV DVR. By default, hMailServer only accepts connections from the localhost, so you need to add an IP range that contains the IP address of your DVR. You can do this by going to Settings -> Advanced -> IP Ranges in the hMailServer Administrator.​

Set up an email account on hMailServer that will be used by your CCTV DVR to transmit alerts. You can create a new domain or use an existing one, such as Gmail or Outlook.com.​

Configure your CCTV DVR to use the SMTP server of your Windows box to send email alerts. You will need to input the IP address of your Windows box and the email address and password of the account you created in step 3.​

Test the email alert system by initiating an event on your CCTV system that should initiate an email alert. Check the logs in hMailServer to ensure that the email was sent successfully.​

As an alternative to using hMailServer, you can also use a straightforward SMTP server such as "Free SMTP Server" or "Papercut SMTP Server". These lightweight servers can be configured swiftly and easily and should suffice for your requirements.​

Remember to keep your Windows box updated with the latest security updates and minimize the risk of any potential security threats using antivirus software. See here some antivirus​

Last edited: