Results 1 to 7 of 7

Thread: Change a cpp file, but it is not applied!

  1. #1
    Junior Member
    Join Date
    Jun 2012
    Posts
    20

    Change a cpp file, but it is not applied!

    Dear users,
    I have installed zarafa-7 community edition from sources. Now, I change a cpp file (src/zarafa-7.0.7/provider/client/ECMsgStore.cpp), say I add a "cout << hello;" at CreateUser section. Then I run make clean;make;make install in that folder. I expect that when I run zarafa-admin to create a new user, I can see the "hello" message, but I do not.
    Is something wrong? what should I do to get the changes effective?
    Can anybody help me?

  2. #2
    Zarafa

    Join Date
    Jan 2009
    Location
    Hanover, Germany
    Posts
    1,891
    Hi rafigh82,

    can you tell me what exactly you want to achive? You dont have to modify binaries to execute additonal tasks on user creation. When a user is created the scripts inside /etc/zarafa/userscripts/createuser.d are executed. This could be used to send for instance welcome mails.
    Regards Felix

    How to get Kopano

    Zarafa ALPHA/BETA/RC feedback in BETA forum please.
    Zarafa IRC chat: irc.freenode.com > #zarafa
    Zarafa documentation: http://documentation.zarafa.com/

    No support via PM! Please contact our sales team for an offer if you want my full attention.

  3. #3
    Junior Member
    Join Date
    Jun 2012
    Posts
    20
    Hi fbartels
    Thank you for your help.
    What I exactly want is to add some additional information to user account when I'm creating it. For example, I want to get secondary email address (for recovery reasons) from user and insert it into database. In some cases, I want to retrieve this email address and send the new password to it.

  4. #4
    Senior Member Dominique's Avatar
    Join Date
    May 2010
    Location
    The Netherlands
    Posts
    186
    Hi,

    ostream is not used by zarafa-admin, sure you can add it but then it will likely only show at the daemon itself if you run it in the foreground.
    If you want to log something to server.log you can do something like:

    m_lpLogger->Log(EC_LOGLEVEL_INFO, "I logged something !");

    Post added 20-06-2012 at 11:57 AM:

    Honestly, I would not put this into zarafa-admin. Instead you would want to do this within a php user interface or similar and add it to a mysql database.
    Before making a new thread, please make sure that you have searched on our forums and read the Zarafa documentation.

  5. #5
    Zarafa

    Join Date
    Jan 2009
    Location
    Hanover, Germany
    Posts
    1,891
    Hi rafigh82,

    i would also recommend to save such data into an additional mysql table or maybe even ldap (which also would give you other interesting options for your usermanagement). Please be informed that we only support multi-tennency/hosted setups with our Zarafa Enterprise and Zarafa Hosting Editions. But especially for the Hosted Editon we have some very interesting offers which allow for a monthly payment of used mailboxes.

    Please contact sales (at) zarafa.com for an according written offer,
    Regards Felix

    How to get Kopano

    Zarafa ALPHA/BETA/RC feedback in BETA forum please.
    Zarafa IRC chat: irc.freenode.com > #zarafa
    Zarafa documentation: http://documentation.zarafa.com/

    No support via PM! Please contact our sales team for an offer if you want my full attention.

  6. #6
    Junior Member
    Join Date
    Jun 2012
    Posts
    20
    I used m_lpLogger but I didn't see the effect of my changes.
    I think there is a misunderstanding in source compilation: suppose that I've changed ECMsgStore.cpp and now I want the changes to be applied in system. To the best of my knowledge, by using (make clean; make; make install) in the zarafa-7.0.7 folder, it will be done. But it seems that I forgot somethings.
    Maybe I should stop some services, or remove some binary files from PATH and uninstall something to allow the changes to be effective. Is it true?

    For example I found some other targets in makefile (install-exec, install-data, ...). How can I apply all the changes in cpp files?

  7. #7
    Junior Member
    Join Date
    Jun 2012
    Posts
    20
    Hi, I decided to take your advice and create a php user interface for it. Now here is my question: to create zarafa users in php code, is it better to do it by executing zarafa-admin script (exec("/usr/bin/zarafa-admin -c USER ...")) or I have to do it be calling the function of server (in C++)?

Similar Threads

  1. IMAP Server down since package updates applied (6.40.15)
    By guruspeaker in forum Installation, Configuration and Maintenance
    Replies: 2
    Last Post: 23-04-2012, 03:43 PM
  2. Change default file as in contacts
    By syscoel in forum Migration
    Replies: 1
    Last Post: 05-07-2011, 09:40 AM
  3. Hyperlink to file
    By rortin in forum WebAccess usage Archives
    Replies: 1
    Last Post: 23-03-2011, 08:39 AM
  4. Out of file descriptors
    By grenzlaeufer in forum Installation and Configuration Archives
    Replies: 2
    Last Post: 14-07-2010, 02:59 PM
  5. configuration file
    By original in forum Administration and Integration Archives
    Replies: 5
    Last Post: 06-07-2008, 06:18 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •