Mailplus Server - change SMTP account from local to LDAP

Currently reading
Mailplus Server - change SMTP account from local to LDAP

2
0
NAS
DS918+, DS415+, DS412+
Operating system
  1. Windows
Mobile operating system
  1. Android
Hi guys

We are running Mailplus Server for a few years now and when we set it up we didn't think ahead and only set it up for local user accounts. Since then, we have acquired a couple additional NAS and have moved a few applications off the primary NAS so Mailplus Server doesn't need to share resources.

When we implemented the other NAS boxes we also setup an LDAP server, so we have central user management. That is, except for mail accounts - these still need to be setup separately on the Mailplus NAS - which is frustrating.

How do I go about migrating the mail for local users to the LDAP users? I see on the services tab how to change the SMTP users from local to LDAP, and when I do that i get asked if I would like to migrate the mails from local account to LDAP/domain account - I click yes.... but it doesn't work? I would expect it to then ask me to map local users to LDAP users, but I don't get that option. I let the process finish, and when opening Outlook, all of the mails slowly disappear - nothing has migrated. What am I doing wrong, how can I do this?

I have read Fredburts tutorial, but this is for Mailserver, not Mailplus - is there a solution similar to Fredburts for Mailplus?

Thanks for any help. Running DSM 6.2.3 and Mailplus Server 2.1.3-0713
 

fredbert

Moderator
NAS Support
Subscriber
1,700
692
NAS
DS1520+, DS218+, DS215j
Router
  1. RT2600ac
  2. MR2200ac
Operating system
  1. macOS
Mobile operating system
  1. iOS
Where does MailPlus Server store user mailboxes? In Mail Server it is in <user's home>/.Maildir

I did look at MailPlus Server but the 5 account limit was, well, too limited. It left behind a /MailPlus shared folder and looking in that I see various folders. The one called '@local' would seem to be the most likely place that user mailboxes are stored as I see a few folders here where the name matches Unix user id numbers of local accounts, e.g. 1026.

You might be able to identity the local users by their folders and also I would think there should be another folder named, for example, '@ldap' or some such thing for the LDAP users.

I'd look in these folders and see if the contents appear to be what you'd expect, is it still Dovecot? And if it is then I'd:
  1. Create a new test LDAP user and use it to log into MailPlus (hopefully this will create the necessary default setup for the mail account).
  2. Log out the user from MailPlus
  3. Select a current local mail account and copy across its mailbox folder content to the new test LDAP user's folder.
  4. Log back into MailPlus and see if the contents of the copied mail is now visible.
We don't want to change anything which why we work with a test MailPlus account and don't move or change original files.


[With LDAP users you can also configure high availability MailPlus Servers between two NAS. Can't do this with local users. If you do this can you let me know if the two NAS's free 5 accounts get combined into a shared 10 free accounts. I'm considering moving to MailPlus but I need 7 accounts and am not willing to pay for the licence :) ]
 
2
0
NAS
DS918+, DS415+, DS412+
Operating system
  1. Windows
Mobile operating system
  1. Android
Thanks for your help - I think you might be on the right track with your ideas (y)

The @local folder does hold all of the messages, and the folders are called 1024, 1026, 1027, etc... 56 in total. Each folder then has a folder inside with the same name as the parent and then that folder typically has 3 folders and 2 files - one of these folders is the Maildir folder containing all of the messages. .../1026/1026/Maildir

the 1st folder is owned by root, the 2nd folder (with the same name as the 1st) is owned by the mail account holder - so this is my UID reference that I need to cross reference with the relevant LDAP user account (which has a different numbering system as 0001, 0002, 0003, etc). A bit confusing but I think I got it

For me to create the test user and log into it, i first need to change the SMTP account from local to LDAP and then give that account mail privileges - this will mean all local users will not have access to email, so I will need to do this late one night, and if it works (which it looks like it will) I will need to copy all of the Maildir folders to the LDAP users folders

I can't help you with the high availability just yet sorry, I am using link aggregation on one of the NAS boxes and to set up SHA you need to connect one NAS directly to the other, which would mean disabling the link aggregation on our file server. I need to work out if this applies for Mailplus high availability also or just Synology High Availability. It's a bit of a chore to set up, a task for another day. I do recall reading somewhere that having 2 mailplus servers in HA does indeed give you 10 free accounts, but i can't remember if that was on synology documentation or just someone's opinion

I will report back once i have run this test and confirm it works
 

fredbert

Moderator
NAS Support
Subscriber
1,700
692
NAS
DS1520+, DS218+, DS215j
Router
  1. RT2600ac
  2. MR2200ac
Operating system
  1. macOS
Mobile operating system
  1. iOS
Good luck with that! Sounds like a plan. Any aliases will have to be check too.

Late night work ... that sounds like why I stopped running the primary mail service at home (~unlimited GB mailboxes). My email service provider gives 3GB mailbox and is now the primary server for connecting clients. The NAS is the archive mail server: all mail gets forwarded here 'just in case'.
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Similar threads

Similar threads

Trending threads

Top