#49 Custom Fields support for mailbox table



In brief: Add support for a number of fields to the mailbox table which will allow sysadmins to customise postfixadmin to their needs - e.g. to enable webmail or remote pop3/imap access access on a per user basis etc etc.


  • Ruben Laban

    Ruben Laban - 2009-04-24

    In addition to custom fields for mailboxes, I'd like to see custom fields for domains as well.

    Example use case:

    Store the backend server in a field which can be used by the frontend servers to use as a transport.

  • Christian Boltz

    Christian Boltz - 2009-04-24

    @rlaban: Your usecase is probably already covered - see $CONF['transport'] and $CONF['transport_options'] in config.inc.php.
    (Nevertheless I agree that custom fields should be available.)

  • lexxai

    lexxai - 2009-05-28

    I use custom fileld before upgrdage...
    'ext' - Enable/disable external access by local/external IP, thanks new version of POSTFIX that now will send IP to DOVECOT auth.


    password_query = SELECT username as user, password, IF ext,NULL,',,') AS allow_nets FROM mailbox WHERE username = '%u' AND active="1"

    'expire' - date of end time for temporary email accounts. by crone will change 'active' state.

    export HOME=/root
    echo "UPDATE mailbox SET active=0,modified=now() WHERE active=1 AND expire > 'now()';" | /usr/local/bin/mysql --defaults-file=~/.my.cnf mailusers

    'glob-maillist' - 0/1 - enable users recieve mail for one global email "someone@mydomain.com"


    query = SELECT username FROM mailbox WHERE '%s'='someone\@mydomain.com' AND domain='mydomain.com' AND active='1' AND `


    virtual_alias_maps = mysql:$pfbase/sql/mysql-virtual_alias_maps.cf,mysql:$pfbase/sql/mysql-virtual_globalmaillist_alias_maps.cf

    For this case need custom field type too (bolean, data or numbering), depend of it web form (add/edit user) will changed.

  • Christian Boltz

    Christian Boltz - 2014-02-28
    • status: open --> closed-fixed
    • Group: --> SVN (please specify revision!)
  • Christian Boltz

    Christian Boltz - 2014-02-28

    The code in SVN trunk has several $CONF[*_struct_hook], and with those hook functions you can add, modify or remove fields as you like. The edit form will automatically adopt to the added/changed/removed fields, and I also have plans for a self-adopting listview.

    config.inc.php contains an example x_struct_admin_modify() function which you can use as base for your changes. Please also read the comment around this function.

    Also note that those *_struct_hook functions do not change the database layout, so you'll need to create the additional fields in the database manually.

    In other words: fixed in SVN trunk (since quite some time) :-)

    If you think one of the additional fields you use would be helpful for lots of users, please open a separate feature request for it.

    If you


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks