| Creating mail aliases on Synology MailStation 2 |
|
|
|
| News - Ubuntu / Linux / Unix |
| Written by Mark Veenstra |
| Wednesday, 07 September 2011 14:58 |
|
So you got MailStation 2 up and running on your Synology, but you can't find any webinterface in DSM that helps you configure mail aliases? Yep, they didn't add this feature in DSM (yet?). Therefore I search around the Internet and had a look at the Postfix manual. While searching and looking into the Postfix manual I found a way to configure mail aliases from the CLI. So here is what I did. UPDATE!!! If you don't like manually changing configurations or you just don't want to. I have created a Synology 3rd party package (SPK file). That installs into DSM, so you can add/remove/change mail aliases for MailStation directly into DSM. Click the next: People who do like to know howto do it manually, please follow the guide below. You have to log into your Synology using SSH and being the root user. Once you are logged into your Synology open and edit the next file: root-nas> vi /usr/syno/mailstation/etc/aliases
Once you open the file search for the next line: # Put your local aliases here.
From this point you can add your local aliases. For example you can add the following line: # Put your local aliases here. I'll explain above configuration in short. For example you configured your MailStation 2 for the domain 'markinthedark.nl'. And you creeated a user in DSM called 'happy' and a user called 'joy'. If your MailStation is correctly configured you are receiving mails on the accounts happy@markinthedark.nl and joy@markinthedark.nl. With the configuration above, emails that are send to info@markinthedark.nl will be delivered to happy@markinthedark.nl and joy@markinthedark.nl. Mails send to sales@markinthedark.nl will be delivered to happy@markinthedark.nl. Also aliases that send mails to external addresses can be added. As you see I have added the alias 'alert'. When someone sends emails to alert@markinthedark.nl, these emails will be delivered to jolly@gmail.com. When you are done editing the aliases file, save and close it. Then ofcourse you need Postfix to reload these newaliases. There is a script added in Synology to do this pretty fast without a reboot, you can reload the aliases file by executing the following: root-nas> /usr/syno/mailstation/bin/newaliases
Hope this helps some of the Synology users! |
| Last Updated on Tuesday, 20 September 2011 12:55 |




Click here to hear this article
Comments
Sweet add-on the mail station plus !!
I have one minor problem though..
Is there a solution or work around when you would like to use 2 alias with the same (virtual user) name but for a different domain ?
f.e. :
info
info
Many, many thx for your mailstation package! Fantastic tool to manage my accounts! Finally the days of complex editing are over. Many thx again!
Franck