Add Anti Spam As Brightmail on your NAS Synology

As for some Mid and small company, Synology that integrate DSM allows to install/implement a mail server and others… 🙂

The Mail server is based on Postfix, one of the most common Mail server as an alternative to sendmail.(http://www.postfix.org/).

As spam is everywhere, you might consider to implement some solution as Brightmail instead of the spam assassin which is indeed also part of the available package from DSM.

To do so, add these lines to your main.cf from Postfix:

smtpd_milters = inet:IP:41001
milter_protocol = 2
milter_default_action = accept

IP: is the IP of the machine that have Brightmail software.

On Synology, the file is located to:

/var/packages/MailServer/target/etc/

You might also wish to implement the change into the template file, as if some postfix update are applied this settings might be overwritten.

/var/packages/MailServer/target/etc/template.main

OR

/var/packages/MailServer/target/etc/template/main.template

 

Have fun.

 

 

Send spam to Junk folder on Synology NAS

I am currently have an Anti-Spam solution plugged in with Postfix of my NAS.

I have been looking for on how could I set/specify all spam been send to a specific folder; On the NAS, sieve is involved and used to apply action against the mailflow.

Located on your nas :

/var/packages/MailServer/target/scripts/sieve_before/move_spam.sieve

Set the potential X-Header that your solution can mark the spam. This sieve script would apply the action and send the spam to your Personal Junk folder, or others if needed.

Here is the default sieve script to do it:

require ["fileinto"];
if anyof (header :contains "X-Spam-Flag" "YES")
{
fileinto "Junk";
}

Htpc Manager on Synology NAS

I had a quick look over this interface that integrate some common tool as Sabnzbd, Sicxkbeard and XBMC (also some others).

If you wish to run this interface on your Syno NAS:

– From another machine running linux, GIT is needed to download Htpc Manager; However you can copy the files from to any others machines and run this interface as soon as Python is present.

	git clone git://github.com/styxit/HTPC-Manager.git
      • once the download is done. Copy the entire folder onto your NAS; In my case I did copy it on the volume1 of my NAS.
	cp -r /volume1/share/HTPC-Manager/ /volume1/@htpc
  • Now, navigate into the folder, once there; verify if the python is well found; run this command start it:
  • /usr/local/htpc/env/bin/python /volume1/@htpc/HTPC-Manager/Htpc.py
    

Customize MailServer setting on NAS Synology

Synology NAS.

I have been looking to customize the MailServer SMTP Banner.(removing the Postfix name from the banner)

You can add or and customize as much as Postfix 2.x would accept it from this path:

	/var/packages/MailServer/target/etc/template/

 

I have edit the file main.template and add the following line:

	smtpd_banner = $myhostname ESMTP

 

Saved and restart the SMTP component from the NAS web interface.

Update:

For DSM 5.1-5022 Update 4; The main.cf is located to :

/var/packages/MailServer/target/etc/main.cf

If you need to reload Postfix; Run :

/var/packages/MailServer/target/sbin/syno_mailserverd reload