Community Discussions and Support
Managing many users

Thanks again for your help Peter.

 

Regards,

Richard

<p>Thanks again for your help Peter.</p><p> </p><p>Regards,</p><p>Richard </p>

I need ways to bulk manage Mercury mail accounts, hundreds at a time, from information in a database.

Looking at Mercury's files, there seems to be a PMAIL.USR, and then a directory for each user containing a PASSWD.PM and a HIERARCH.PM that Mercury creates as required.

If I wrote a tool to create or delete the user directorys, whilst maintaining suitable entries in PMAIL.USR, is that all there is to it?

Regards,

Richard

 

<p>I need ways to bulk manage Mercury mail accounts, hundreds at a time, from information in a database. </p><p>Looking at Mercury's files, there seems to be a PMAIL.USR, and then a directory for each user containing a PASSWD.PM and a HIERARCH.PM that Mercury creates as required.</p><p>If I wrote a tool to create or delete the user directorys, whilst maintaining suitable entries in PMAIL.USR, is that all there is to it?</p><p>Regards,</p><p>Richard </p><p> </p>

If I wrote a tool to create or delete the user directories, whilst

maintaining suitable entries in PMAIL.USR, is that all there is to it?

 Pretty much that's it but you do not need the hierarch.pm.  I wrote one in BASIC years ago to take data from a file and it's not all that difficult.  You send the command "Reload Users" after you make the changes so the running version of Mercury gets the changes. 

If this is a really significant change then I would pause or unload Mercury during the process so you would not lose mail.  For example, it you delete a user you would want MercuryS to bounce the message but Mercury was still running MercuryS would receive the message and core try to deliver to a non-existent user.  If mail for a new user was received it would be bounced.  All in all is makes more sense to stop all the processes during the update.

 

<blockquote><p>If I wrote a tool to create or delete the user directories, whilst maintaining suitable entries in PMAIL.USR, is that all there is to it?</p></blockquote><p> Pretty much that's it but you do not need the hierarch.pm.  I wrote one in BASIC years ago to take data from a file and it's not all that difficult.  You send the command "Reload Users" after you make the changes so the running version of Mercury gets the changes.  </p><p>If this is a really significant change then I would pause or unload Mercury during the process so you would not lose mail.  For example, it you delete a user you would want MercuryS to bounce the message but Mercury was still running MercuryS would receive the message and core try to deliver to a non-existent user.  If mail for a new user was received it would be bounced.  All in all is makes more sense to stop all the processes during the update. </p><p> </p>

[quote user="Peter Strömblad"]yes, have a look at: http://community.pmail.com/files/folders/codesnippets/entry167.aspx[/quote]

Thanks Peter, thats what I was intending to use, Delphi & MSSQL.

I'll read your code with interest and if I produce anything useful post it back here.

 

Regards,

Richard

 

<p>[quote user="Peter Strömblad"]yes, have a look at: <a href="http://community.pmail.com/files/folders/codesnippets/entry167.aspx" mce_href="http://community.pmail.com/files/folders/codesnippets/entry167.aspx">http://community.pmail.com/files/folders/codesnippets/entry167.aspx</a>[/quote]</p><p>Thanks Peter, thats what I was intending to use, Delphi & MSSQL.</p><p>I'll read your code with interest and if I produce anything useful post it back here.</p><p> </p><p>Regards,</p>Richard <p> </p>

Good. I'm in the middle of porting all to C#, as a webservice where the SQL end will contact each service to update domains, aliases, users, lists etc.

That code will be available here in due time.

<P>Good. I'm in the middle of porting all to C#, as a webservice where the SQL end will contact each service to update domains, aliases, users, lists etc.</P> <P>That code will be available here in due time.</P>

Hi Thomas,

Thank you for your reply.

I think this is asking the same question, but in a different way, but I assume this implies that Mercury saves nothing to do with any particular user, such as which folders they have created in their mailbox and which mail is in which folder, anywhere other than somewhere within that users folder eg c:\MERCURY\MAIL\john.

Do the names of the files corresponding to mail in a users mailbox have to be unique to that user, or system wide unique? If they only have to be unique for each user, would that also imply that if I had 2 different Mercury servers and I wanted to move john's account from one to the other, moving c:\MERCURY\MAIL\john from server1 to server2 and maintaining PMAIL.USR is sufficient.

Thanks for your help,

Richard

<p>Hi Thomas,</p><p> Thank you for your reply.</p><p>I think this is asking the same question, but in a different way, but I assume this implies that Mercury saves nothing to do with any particular user, such as which folders they have created in their mailbox and which mail is in which folder, anywhere other than somewhere within that users folder eg c:\MERCURY\MAIL\john. </p><p>Do the names of the files corresponding to mail in a users mailbox have to be unique to that user, or system wide unique? If they only have to be unique for each user, would that also imply that if I had 2 different Mercury servers and I wanted to move john's account from one to the other, moving c:\MERCURY\MAIL\john from server1 to server2 and maintaining PMAIL.USR is sufficient. </p><p>Thanks for your help,</p><p>Richard </p>

Files/folders need be unique to the maildrop (=user), but the file/folder structure within imap in Mercury isn't that straightforward as to just create directories... - but yes if you have a user named John, you can create that user on the second server, then move the files from Johns maildrop on server1 to 2 and all works - this is one benefit of a file based maildrop - when it comes to a sort of lazy redundancy.

Files/folders need be unique to the maildrop (=user), but the file/folder structure within imap in Mercury isn't that straightforward as to just create directories... - but yes if you have a user named John, you can create that user on the second server, then move the files from Johns maildrop on server1 to 2 and all works - this is one benefit of a file based maildrop - when it comes to a sort of lazy redundancy.
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft