multiserver mail setup

Discussion in 'Installation/Configuration' started by mmmexp, Sep 13, 2014.

  1. mmmexp

    mmmexp New Member

    I have set a multiserver with mail server as a separate server.

    The problem i have is if i create or update an e-mail through remote api it doesn't get replicated to mail server if i don't go to panel and click edit and Save under created e-mail address.
    how to manually trigger replication so i wouldn't need to click "Save" for thousands of created mailboxes?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The replication is triggered automatically when you update an record with the remote api. so tere must be something wrong in your api call, e.g. you use a wrong server_id or something similar.
     
  3. mmmexp

    mmmexp New Member

    thanks, yes i just saw that it went through.

    but the problem now i am facing is that it doesn't create maildirs until i click 'Save' through panel.
    Code:
    13.09.2014-21:38 - DEBUG - Created Directory: /var/mail/domain [I]
    13.09.2014-21:38 - WARNING - Action aborted, file is a symlink: /var/mail/domain/user1/Maildir/.Sent
    13.09.2014-21:38 - WARNING - Action aborted, file is a symlink: /var/mail/domain/user1/Maildir/.Sent
    13.09.2014-21:38 - WARNING - Action aborted, file is a symlink: /var/mail/domain/user1/Maildir/subscriptions
    13.09.2014-21:38 - DEBUG - Created Maildir /var/mail/domain/user1/Maildir with subfolder: Sent
    13.09.2014-21:38 - WARNING - Action aborted, file is a symlink: /var/mail/domain/user1/Maildir/.Drafts
    13.09.2014-21:38 - WARNING - Action aborted, file is a symlink: /var/mail/domain/user1/Maildir/.Drafts
    ...........
    
    But if i go to panel and click Save on existing mailbox it creates directories fine.

    any clue?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

  5. mmmexp

    mmmexp New Member

    Unfortunately they are not symlinks (i think that checkpath() fails on non-existing directories, but before clicking 'Save' in ispconfig panel there exists no directories whatsoever anyway, but somehow directories are created when clicking 'Saved' from panel, but not executing mail_user_update).
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    The api function uses the same code then the interface to create the folders. The most likely reason for your problem is that your api call is incomplete and misses some detail. Compare a mailbox in mail_user table that yu create in the interface with one that you created with the api to see what your api call is missing.
     
  7. mmmexp

    mmmexp New Member

    Ok thanks.

    I thought, maybe it would be nice to make such feature:

    if i create an e-mail through remote api it wouldn't encrypt password? (maybe as an option or some kind of flag or variable like 'AlreadyEncryptedPassword' = ' '

    it is very useful when you migrate for example from postfixadmin and you have already passwords encrypted
     

Share This Page