What are the default parameter values for mail_add_user()

Discussion in 'ISPConfig 3 Priority Support' started by Jonathan Marsden, Jul 23, 2016.

  1. Jonathan Marsden

    Jonathan Marsden New Member

    I am new to ISPConfig, and beginning to explore using the API to import a bunch of email users.

    When using mail_add_user() there are many possible items in the params array. Which ones are required for a working normal email user?

    Specifically, is there a way to have (at least) uid, gid, maildir, homedir, move_junk and postfix default to logical and useful values, without writing my own wrapper function to do that? I feel that the result would be a cleaner and more readable codebase.

    More generally, the API documentation I have found seems to lack any description of each item within the params array, what each one does and what the default value of it is if it is omitted from the array. Is there some more comprehensive API documentation that I should be reading (other than the source code itself)?


  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The parameters correspond with the columns of the mail_user table (only the sys_* parameters and the primary ID of the database table can not be set). I recommend to add a mailbox in ispconfig, then look at the mail_user table with phpmyadmin to see whcih parameters are set and use this as example for your function call.
  3. Jonathan Marsden

    Jonathan Marsden New Member

    OK, thanks, I will try that. Longer term, I think it would be helpful if the API documentation included the list of all these parameters, what they do, and what the default is when they are not present in the params array.

    While talking about that API documentation: in the ISPConfig manual, it in essence says that the API documentation "is not here". It might be more helpful to say where it is, rather than where it is not.


Share This Page