Welcome to the JaguarPC Community
JaguarPC
Sales: (888) 338-5261
Support: (888)-551-3050
+ Reply to Thread
Results 1 to 3 of 3

This is a discussion on automatic creation of email accounts in the VPS & Dedicated forum
Is it possible to create a web-based application (preferably a PHP class) that will create POP email accounts? Or can this only be done directly ...

  1. #1
    JPC Addict
    Join Date
    Aug 2004
    Location
    Canada
    Posts
    135

    automatic creation of email accounts

    Is it possible to create a web-based application (preferably a PHP class) that will create POP email accounts? Or can this only be done directly through Plesk?

  2. #2
    Loyal Client Down2TheC's Avatar
    Join Date
    Feb 2008
    Posts
    33
    Anything on linux can be scripted... though I'd be lost on where to start.

  3. #3
    Community Leader jason's Avatar
    Join Date
    Sep 2001
    Location
    Rochester, NY
    Posts
    5,985
    I don't know what plesk uses for its mail server, but it should be scriptable. Most systems simply add a folder someplace to store the incoming mail and add a user to a passwd file.

    For example, in cPanel, mail is stored in the /home/user/mail directory structure (with sub directories for each domain hosted on the account and further directories for individual accounts) and the user account settings are stored in /home/user/etc/passwd or some such.

    Where you may run into problems is with ownership and permissions. Most web scripts run as nobody, apache, or the owner of the script, but in order for the mail server to put mail into that user's directory it generally needs to either own or have group rights to directory. Most commonly you'll see setups where the directory is owned by the account owner with the group set to "mail," "vpopmail," or something similar depending on platform. This requires a chown which is only available to root.

    The way the control pannels handle it, I presume, is to execute scripts on the server with setuid permissions. Of course, if you choose to do this, you should use EXTREME caution as you are effectively elevating a web user to root for a moment.

    --Jason
    Jason Pitoniak
    Interbrite Communications
    www.interbrite.com www.kodiakskorner.com

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