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.

Script: Import multiple email accounts into a domain

Discussion in 'E-mail Discussions' started by SeanLee, Mar 30, 2009.

  1. SeanLee

    SeanLee Well-Known Member

    Joined:
    May 23, 2004
    Messages:
    50
    Likes Received:
    0
    Trophy Points:
    6
    Hi all,

    Here's a simple script I wrote which imports multiple email accounts and passwords into a single domain in cPanel. It works with the awesome plugin for FireFox - iMacros.

    I had the need to import about 1000 email accounts into cPanel since we were migrating away from an old email server. This script imports email accounts from a MS-DOS formatted CSV file into a single domain using the cPanel interface.

    Should be self explanitory - I've commented my code and included an example.

    Let me know if you have any questions.

    Thanks,

    -SeanLee
     

    Attached Files:

  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Are there any issues with our existing CSV import feature for emails that we should be aware of?
     
  3. SeanLee

    SeanLee Well-Known Member

    Joined:
    May 23, 2004
    Messages:
    50
    Likes Received:
    0
    Trophy Points:
    6
    Where can this function be found?

    I didn't have a non-production server to play around with, so I just went with an iMacro since I wanted to "throttle" the import. (specify a "wait" time between account creation.)

    -Sean
     
  4. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    If you are on cPanel 11.24 or later, you can import CSV files by going to your cPanel interface and under Mail click on "Import Addresses/Forwarders"
     
  5. SeanLee

    SeanLee Well-Known Member

    Joined:
    May 23, 2004
    Messages:
    50
    Likes Received:
    0
    Trophy Points:
    6
    Very nice to know! I didn't even look there.
     
  6. jingrosso

    jingrosso Registered

    Joined:
    Mar 11, 2009
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Thank you! look forward to trying this!
     
  7. hermit

    hermit Active Member

    Joined:
    Sep 22, 2004
    Messages:
    35
    Likes Received:
    1
    Trophy Points:
    8
    Fetchmail

    I need something that would also run fetchmail at the same time. Anyone have a solution for that? I just tried the script in cpanel but I need to pop the messages at the same time to get everything off the old machine. Thanks.
     
  8. gstrock

    gstrock Registered

    Joined:
    May 3, 2009
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    no import email addresses function

    I'm using 11.24.4 of Cpanel on Host Gator and I don't see
    an import email address function.

    I don't understand how to get these Cpanel scripts to execute.

    In the supplied cPanel-x3-import-email-passwd.iim, can the
    password be in unix encrpyted format?

    I'm also interested in using fetchmail to pull the mail off the
    old machine and forward it to the addressees which are now
    on a new server.
     
  9. anditkj2004

    anditkj2004 Registered

    Joined:
    Nov 17, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
Loading...

Share This Page