Multiple Domains, Seperate Mailboxes.

Discussion Room for the Synology MailStation Package

Multiple Domains, Seperate Mailboxes.

Postby Spuddy » Wed Apr 27, 2011 6:46 pm

Hello,

I currently have two domains setup to use mailstation. Works fine. However I would like

joebloggs@domain1.com & joebloggs@domain2.com to have seperate mailboxes. Unfortunately, mail to both domains gets put in the same mailbox.

Is this possible?


Thanks,
DS1010+ w/ 3072MB Memory - DSM 4.1-2668 - 10*2TB HDS722020ALA330 - 20TB RAID6 Array
Spuddy
Experienced
Experienced
 
Posts: 106
Joined: Wed May 13, 2009 11:10 am

Re: Multiple Domains, Seperate Mailboxes.

Postby HarryPotter » Sat Apr 30, 2011 9:55 am

Yes, the keyword is "virtual users"
*Please do not Private Message me for support questions; leave it on the forum so all members can learn. Thanks!*

DS712+ / DSM 4.2 3211 / 2 x HD204UI (RAID0) / LMS 7.7.2-007
DS110+ / DSM 4.2 3211 / HD154UI
DS408 / DSM 4.0 2228 / 3 x ST31000340AS (RAID0) + 1 x HDS721010KLA330
DS207+ / DSM 3.1.1637 / ST31000340AS + WD5000KS
DS-106x / DSM 4.0 2228 (from DS108j) /

2 Squeezebox 3 + Boom
Rapsody N35

APC Smart UPS SUA750i
User avatar
HarryPotter
Honorary Moderator
Honorary Moderator
 
Posts: 12453
Joined: Mon Oct 23, 2006 12:48 pm
Location: Switzerland

Re: Multiple Domains, Seperate Mailboxes.

Postby Spuddy » Thu May 05, 2011 9:47 am

HarryPotter wrote:Yes, the keyword is "virtual users"


Hi,

Thanks for the response. Unfortunately searching for "virtual users" under the mailstation forum isn't really giving me the results I'm looking for? I'm looking for a guide to setting up usera@domain1.com and usera@domain2.com as different mailboxes. They are currently the same mailbox.

Thanks,
DS1010+ w/ 3072MB Memory - DSM 4.1-2668 - 10*2TB HDS722020ALA330 - 20TB RAID6 Array
Spuddy
Experienced
Experienced
 
Posts: 106
Joined: Wed May 13, 2009 11:10 am

Re: Multiple Domains, Seperate Mailboxes.

Postby chillspace » Sat May 07, 2011 5:12 am

Spuddy wrote:Hello,

I currently have two domains setup to use mailstation. Works fine. However I would like

joebloggs@domain1.com & joebloggs@domain2.com to have seperate mailboxes. Unfortunately, mail to both domains gets put in the same mailbox.

Is this possible?


Thanks,



Check this site:
http://www.postfix.org/VIRTUAL_README.html

This will allow you to set up the users with separate mailboxes/domains and alias them properly. I have this set up on my DS1511+ with six different domains and the same username aliased to separate mailboxes on separate domains.

You'll also need to look up the man page for the vi text editor as you'll be editing main.cf as well.

Below are some instructions I came across (can't remember what site it's from but I did copy and save them for my own personal reference:



2. vi main.cf
3. Add this line at end:

virtual_alias_maps=hash:/usr/syno/mailstation/etc/virtual

4. Select virtual:
You can list any mail address to any username!

your_domain1.dk anything
tom@ your_domain1.dk TomPrivate
birthe@ your_domain1.dk BirthePrivate

your_domain2.dk anything
tom@ your_domain2.dk TomWork
birthe@ your_domain2.dk BirtheWork

5. Next you need to compile this file into virtual.db. Login with the PuTTYtel as: User=root, Password=your admin password.
6. Write this: /usr/syno/mailstation/sbin/postmap /usr/syno/mailstation/etc/virtual
7. Check it: cd /usr/syno/mailstation/etc
8. Write: dir
9. Now a virtual.db should be available on the server.
10. Now you need to restart the postfix program:

/usr/syno/mailstation/sbin/postfix stop
/usr/syno/mailstation/sbin/postfix start

11. Now you are done however please allow up to 1 minute before postfix is updated.

If you later change something in the “virtual”, remember to recompile it (step 6).

Also remember if you update the mailstation package or update the Diskstation OS it will overwrite any edits you made before. Backup your files!

Eric
chillspace
Trainee
Trainee
 
Posts: 13
Joined: Tue Mar 01, 2011 7:49 am

Re: Multiple Domains, Seperate Mailboxes.

Postby Spuddy » Sat May 07, 2011 10:27 am

chillspace wrote:
Spuddy wrote:Hello,

I currently have two domains setup to use mailstation. Works fine. However I would like

joebloggs@domain1.com & joebloggs@domain2.com to have seperate mailboxes. Unfortunately, mail to both domains gets put in the same mailbox.

Is this possible?


Thanks,



Check this site:
http://www.postfix.org/VIRTUAL_README.html

This will allow you to set up the users with separate mailboxes/domains and alias them properly. I have this set up on my DS1511+ with six different domains and the same username aliased to separate mailboxes on separate domains.

You'll also need to look up the man page for the vi text editor as you'll be editing main.cf as well.

Below are some instructions I came across (can't remember what site it's from but I did copy and save them for my own personal reference:



2. vi main.cf
3. Add this line at end:

virtual_alias_maps=hash:/usr/syno/mailstation/etc/virtual

4. Select virtual:
You can list any mail address to any username!

your_domain1.dk anything
tom@ your_domain1.dk TomPrivate
birthe@ your_domain1.dk BirthePrivate

your_domain2.dk anything
tom@ your_domain2.dk TomWork
birthe@ your_domain2.dk BirtheWork

5. Next you need to compile this file into virtual.db. Login with the PuTTYtel as: User=root, Password=your admin password.
6. Write this: /usr/syno/mailstation/sbin/postmap /usr/syno/mailstation/etc/virtual
7. Check it: cd /usr/syno/mailstation/etc
8. Write: dir
9. Now a virtual.db should be available on the server.
10. Now you need to restart the postfix program:

/usr/syno/mailstation/sbin/postfix stop
/usr/syno/mailstation/sbin/postfix start

11. Now you are done however please allow up to 1 minute before postfix is updated.

If you later change something in the “virtual”, remember to recompile it (step 6).

Also remember if you update the mailstation package or update the Diskstation OS it will overwrite any edits you made before. Backup your files!

Eric


Perfect Eric, just what I was looking for. Thank you.
DS1010+ w/ 3072MB Memory - DSM 4.1-2668 - 10*2TB HDS722020ALA330 - 20TB RAID6 Array
Spuddy
Experienced
Experienced
 
Posts: 106
Joined: Wed May 13, 2009 11:10 am

Re: Multiple Domains, Seperate Mailboxes.

Postby pstaub » Mon May 23, 2011 6:04 pm

Hi,
I followed all the suggestion with virtual users/domains.
multiple domains works fine but regardless of the virtual file all mail goes into one mailbox
I need multiple domains and seperate mailboxes for the same user in the different domains.
like peter@domain1.com and peter@domain2.com.
How can I do that, and where are the different mailboxes located?
Also can I have users that do not have a system login?

virtual

domain1.org anything
user1@domain1.org user1
user2@domain1.org user2

domain2.net anything
user1@domain2.net user1

domain3.com anything
user1@domain3.com user1


vmailbox


user1@domain1.org domain1.org/user1
user1@domain2.org domain2.net/user1
user2@domain1.org domain1.org/user2



vdomains

#virtual domains
domain1.org
domain2.net
domain3.com



main.cf
inet_protocols = ipv4, ipv6
mailbox_size_limit = 0
broken_sasl_auth_clients = yes
cyrus_sasl_config_path = /usr/syno/mailstation/etc
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_sender_restrictions = reject_unknown_sender_domain
smtpd_sasl_authenticated_header = yes
smtpd_tls_cert_file = /usr/syno/etc/ssl/ssl.crt/server.crt
smtpd_tls_key_file = /usr/syno/etc/ssl/ssl.key/server.key

smtpd_tls_security_level = may

virtual_alias_domains = /usr/syno/mailstation/etc/vdomains
virtual_alias_maps = hash:/usr/syno/mailstation/etc/virtual

#virtual_mailbox_domains = /usr/syno/mailstaion/etc/vdomains
#virtual_mailbox_base = /var/pool/vhosts
#virtual_mailbox_maps = hash:/usr/syno/mailstation/etc/vmailbox
#virtual_minimum_uid = 100
#virtual_uid_maps = static:5000
#virtual_gid_maps = static:5000


myhostname = domain1.org
smtpd_sasl_auth_enable = yes
message_size_limit = 20971520

Thanks
for any help
Last edited by pstaub on Tue May 24, 2011 5:38 pm, edited 1 time in total.
pstaub
I'm New!
I'm New!
 
Posts: 2
Joined: Mon Aug 23, 2010 5:11 pm
Location: Corona California

Re: Multiple Domains, Seperate Mailboxes.

Postby Spuddy » Mon May 23, 2011 7:02 pm

pstaub wrote:Hi,
I followed all the suggestion with virtual users/domains.
multiple domains works fine but regardless of the virtual file all mail goes into one mailbox
I need multiple domains and seperate mailboxes for the same user in the different domains.
like peter@domain1.com and peter@domain2.com.
How can I do that, and where are the different mailboxes located?
Also can I have users that do not have a system login?

Thanks
for any help


Hello, Erics guide worked for me.
DS1010+ w/ 3072MB Memory - DSM 4.1-2668 - 10*2TB HDS722020ALA330 - 20TB RAID6 Array
Spuddy
Experienced
Experienced
 
Posts: 106
Joined: Wed May 13, 2009 11:10 am

Re: Multiple Domains, Seperate Mailboxes.

Postby pstaub » Mon May 23, 2011 7:24 pm

I'm glad to hear it.
I know I must be doing somthing wrong.
Where do you get the maolboxes for the different domains.
Do all of you users have a login on the server?
pstaub
I'm New!
I'm New!
 
Posts: 2
Joined: Mon Aug 23, 2010 5:11 pm
Location: Corona California

Re: Multiple Domains, Seperate Mailboxes.

Postby Spuddy » Mon Sep 03, 2012 1:54 pm

These Virtual mailboxes have stopped delivering mail since I updgraded to DSM 4.1-2636 and the latest MailStation.

I have ensured all the setting above are adhered to and even updated the virtual alias maps are pointing to the new location

virtual_alias_maps=hash:/volume1/@appstore/MailServer/etc/virtual

Any idea what the issue could be?

Code: Select all
mailserver.domain.com #<mailserver.domain.com #5.1.1 smtp; 550 5.1.1 <mailbox@domain.com>: Recipient address rejected: User unknown in local recipient table> #SMTP#


Please help, this is quite critical!

Thanks,
DS1010+ w/ 3072MB Memory - DSM 4.1-2668 - 10*2TB HDS722020ALA330 - 20TB RAID6 Array
Spuddy
Experienced
Experienced
 
Posts: 106
Joined: Wed May 13, 2009 11:10 am

Re: Multiple Domains, Seperate Mailboxes.

Postby HarryPotter » Mon Sep 03, 2012 3:30 pm

Did you check if the vituel and virtual.db files are there?
Did you rebuild the virtual.db file?
*Please do not Private Message me for support questions; leave it on the forum so all members can learn. Thanks!*

DS712+ / DSM 4.2 3211 / 2 x HD204UI (RAID0) / LMS 7.7.2-007
DS110+ / DSM 4.2 3211 / HD154UI
DS408 / DSM 4.0 2228 / 3 x ST31000340AS (RAID0) + 1 x HDS721010KLA330
DS207+ / DSM 3.1.1637 / ST31000340AS + WD5000KS
DS-106x / DSM 4.0 2228 (from DS108j) /

2 Squeezebox 3 + Boom
Rapsody N35

APC Smart UPS SUA750i
User avatar
HarryPotter
Honorary Moderator
Honorary Moderator
 
Posts: 12453
Joined: Mon Oct 23, 2006 12:48 pm
Location: Switzerland

Re: Multiple Domains, Seperate Mailboxes.

Postby hansm » Mon Oct 08, 2012 10:27 am

Spuddy wrote:These Virtual mailboxes have stopped delivering mail since I updgraded to DSM 4.1-2636 and the latest MailStation.

I have ensured all the setting above are adhered to and even updated the virtual alias maps are pointing to the new location

virtual_alias_maps=hash:/volume1/@appstore/MailServer/etc/virtual

Any idea what the issue could be?

Code: Select all
mailserver.domain.com #<mailserver.domain.com #5.1.1 smtp; 550 5.1.1 <mailbox@domain.com>: Recipient address rejected: User unknown in local recipient table> #SMTP#


Please help, this is quite critical!

Thanks,


I have the same problem. When i change my main.cf file with the 'virtual_alias_domains' and 'virtual_alias_maps' rules postfix stops running. I checked everything and use DSM 4.1-2647 at the moment.

Can anyone explain what is changed and if i can still can use virtual domains?
Thanks!
hansm
I'm New!
I'm New!
 
Posts: 1
Joined: Mon Oct 08, 2012 10:21 am

Re: Multiple Domains, Seperate Mailboxes.

Postby wrt54gs » Wed Dec 05, 2012 3:01 am

Great post. bookmark it and will try it later.
wrt54gs
Trainee
Trainee
 
Posts: 10
Joined: Thu Nov 22, 2012 7:25 am

Re: Multiple Domains, Seperate Mailboxes.

Postby deadkenny » Tue Feb 19, 2013 8:29 pm

Has this been resolved? I've been putting off upgrading to DSM 4.1, still on 4.0, due to a large amount of issues reported with it. 4.2 is in beta and I'm getting quite out of date.

This would be very critical to me to have working properly, although I'm hearing 4.2 has some kind of multi domain support? Does it do what we want here, i.e. separate mailboxes? If it does have this support, is there a simple migration path from the hack here to the official support?
deadkenny
Novice
Novice
 
Posts: 46
Joined: Sat Jun 18, 2011 1:44 pm

Re: Multiple Domains, Seperate Mailboxes.

Postby Parcye » Sun Apr 14, 2013 6:03 pm

I have just unpacked my Synology and was trying to get it all working as mentioned above, but somehow I am not getting it to work. Now it could be ofcourse because I am new to Synology, but could also be due to, as mentioned, files moved to other location.
Parcye
I'm New!
I'm New!
 
Posts: 1
Joined: Sun Apr 14, 2013 5:52 pm

Re: Multiple Domains, Seperate Mailboxes.

Postby HarryPotter » Sun Apr 14, 2013 7:48 pm

Yes MailStaion and MailServer are now separated from firmeware/dsm and are optional packages.
Files of packages can be found on /volume1/@appstore
*Please do not Private Message me for support questions; leave it on the forum so all members can learn. Thanks!*

DS712+ / DSM 4.2 3211 / 2 x HD204UI (RAID0) / LMS 7.7.2-007
DS110+ / DSM 4.2 3211 / HD154UI
DS408 / DSM 4.0 2228 / 3 x ST31000340AS (RAID0) + 1 x HDS721010KLA330
DS207+ / DSM 3.1.1637 / ST31000340AS + WD5000KS
DS-106x / DSM 4.0 2228 (from DS108j) /

2 Squeezebox 3 + Boom
Rapsody N35

APC Smart UPS SUA750i
User avatar
HarryPotter
Honorary Moderator
Honorary Moderator
 
Posts: 12453
Joined: Mon Oct 23, 2006 12:48 pm
Location: Switzerland

Next

Return to MailStation

Who is online

Users browsing this forum: No registered users and 0 guests