Comments for "Mail_Admin"

» Submit Your Comment
Please log in to enter your comment. If you are not a registered PEAR developer, you can comment by sending an email to pear-dev@lists.php.net.
» Comments
  • Till Klampaeckel  [2007-09-11 03:37 UTC]

    I like the idea to provide a unified API to numerous mailservers/installations. (But I just have no idea how to test this since my postfix setup is pretty different. ;))

    Is your driver based on some opensource project (e.g. postfixadmin or pmwh(2))?

    Some things I noticed:
    1)
    Sometimes you just throw a regular "Exception".

    2)
    I think your Exceptions should be "stacked", e.g. all come from Mail_Admin_Exception() to allow catching *all* exceptions which related to your package in a single catch.

    3)
    Sometimes you echo errors inside the class.

    4)
    Also, would driver and base class be seperated?

    5)
    MDB2 should be an optional dep since not all drivers will use a DB.

    6)
    The one class per file rule, or did that get dropped?


    P.S.
    Linking directly to your code would be a huge plus, since your WebSVN is pretty "crowed". ;)
  • Christian Weiske  [2007-09-11 08:03 UTC]

    Till, thanks for the comments.
    I changed the status to "proposal" to gather feedback from other devs - but I failed to mention in which areas :)

    To your notes:
    0) The code is completely new, not based on some other project
    1) Will be fixed, I just needed to get it work for a project of mine
    2) Same as 1
    3) Debug leftovers :)
    4) Do you mean putting Mail/Admin/Driver/Base.php into Mail/Admin/?
    5) I will be optional dep once we have more drivers
    6) Has to do with the open issues I have.


    My problems so far:
    - Anyone who has ever setup any mail server with user account data stored in a RDBMS/LDAP: Is the distinction into Alias, Mailbox and Domain common? (Mailboxes and aliases belong to domains, and aliases redirect to either a mail box or a different email address not on this server)
    - The package uses a driver-based approach. A driver potentially comprises multiple classes. Should the class names have the same "base name" like Mail_Admin_Driver_Postfix resulting in class names like Mail_Admin_Driver_Postfix_Alias - or should I extend the names of classes I extend to get names like
    Mail_Admin_Alias_Postfix
    Mail_Admin_Mailbox_Postfix
    ?
  • Till Klampaeckel  [2008-03-09 19:34 UTC]

    (Could have commented earlier. :-))

    > Anyone who has ever setup any mail server with user account data stored
    > in a RDBMS/LDAP: Is the distinction into Alias, Mailbox and Domain common?
    > (Mailboxes and aliases belong to domains, and aliases redirect to either a
    > mail box or a different email address not on this server)

    On my end both are stored in the same table. While for example an alias bar@example.org has foo@example.org as destination, the foo@example.org entry would have the path "/virtual/example.org/foo" in destination - making it a mailbox.

    > The package uses a driver-based approach. A driver potentially comprises
    > multiple classes. Should the class names have the same "base name"

    I'm all for the same "base name" because this allows me to stack it into the same directory to keep things that belong together, together. At least it "looks" better to me.