The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Mass delete E-mail Accounts

Discussion in 'E-mail Discussions' started by Lightninghawk, Sep 3, 2009.

  1. Lightninghawk

    Lightninghawk Member

    Joined:
    Sep 3, 2009
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    I'm trying to delete several email accounts at one time. Is this possible to do within cPanel? build=11.24.5 reseller panel

    Any help is greatly appreciated
    Thanks
     
  2. MattCurry

    MattCurry Well-Known Member

    Joined:
    Aug 18, 2009
    Messages:
    275
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Houston, Tx
    Removing Email accounts

    Hello,


    Here is a script that you can use to remove a single account, this can be added to a script to delete multiple, however that would be something we would not support directly; but this should get you started I hope.

    su --login -s /bin/bash USERNAME -c "/usr/local/cpanel/cpanel-email 'delpop' 'test10' '0' 'domain.com'"

    This has to be run from that user. You will replace USERNAME with the user you are trying to delete and the domain.com with the domain.

    Thank you,
    Matthew Curry
     
    #2 MattCurry, Sep 3, 2009
    Last edited: Sep 3, 2009
  3. Lightninghawk

    Lightninghawk Member

    Joined:
    Sep 3, 2009
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Could I execute this from a php file?

    Because I don't know much about anything to be honest with you. So as of right now I don't even know where i would run this from.
     
  4. MattCurry

    MattCurry Well-Known Member

    Joined:
    Aug 18, 2009
    Messages:
    275
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Houston, Tx
    Delete Pop users

    Hello,


    That would be run from the command line interface or "CLI" and you may see it referred to, as far as scripting unfortunately its not something we can support directly; but if you only have a few you can do them one at a time with that command from the CLI.

    Thank you,
    Matthew Curry
     
  5. Lightninghawk

    Lightninghawk Member

    Joined:
    Sep 3, 2009
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    I have 2,700 to delete... so if you have any other suggestions please let me know. One at a time is scaring me

    It doesn't matter to me if i dump all emails. I can easily recreate them. So if there is a way to do that. It would be fine
     
  6. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,453
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    ConfigServer Mail Manage might make it a little easier. You could list accounts and click to delete, but still, 2700 accounts is a lot of clicks.
     
  7. Lightninghawk

    Lightninghawk Member

    Joined:
    Sep 3, 2009
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Yes but it is so much better than 8100 clicks and waiting on screen load time to delete them one at a time from the cPanel interface.

    Thank you so much :)
     
  8. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,453
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Happy to help. No need to thank me though, thank Chirpy at that site I've linked you to. :)
     
Loading...

Share This Page