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.

MailMan copy/move account fix

Discussion in 'E-mail Discussions' started by Lyttek, Feb 24, 2006.

  1. Lyttek

    Lyttek Well-Known Member

    Joined:
    Jan 2, 2004
    Messages:
    770
    Likes Received:
    3
    Trophy Points:
    18
    Just moved a bunch of accounts using WHM. Of course, as others have mentioned, the mailing lists didn't move correctly.

    Why, you may ask?

    To make the transfer easy, I suspended the account, copied it using the WHM copyaccount function on the new server, modified the DNS on the old server (to point to the new one) and then un-suspended the account on the new server.

    All's fine and dandy except the mailing lists. The list archives transferred fine.

    This is because the act of suspending the account moves the list from one directory to another. The pkgacct script doesn't take this into account (no pun intended).

    To fix:

    open /scripts/pkgacct and look for the following code:

    Code:
    foreach $domain (@DNS) {
       nooutputsystemsh("cp ${cpargs} /usr/local/cpanel/3rdparty/mailman/lists/*_${domain} ${tarroot}/${prefix}${user}/mm");
    }
    Add a line to make the following:

    Code:
    foreach $domain (@DNS) {
       nooutputsystemsh("cp ${cpargs} /usr/local/cpanel/3rdparty/mailman/lists/*_${domain} ${tarroot}/${prefix}${user}/mm");
    
    nooutputsystemsh("cp ${cpargs} /usr/local/cpanel/3rdparty/mailman/suspended.lists/*_${domain} ${tarroot}/${prefix}${user}/mm");
    }
    
    This adds the lists that have been suspended to the cpmove-domain.tar.gz file. Once copied and extracted, it works fine.
     
  2. Spokuz

    Spokuz Well-Known Member
    PartnerNOC

    Joined:
    Apr 24, 2003
    Messages:
    119
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Lisbon - Portugal
    cPanel Access Level:
    Root Administrator
    Maybe cpanel team should add this code?:)
     
Loading...

Share This Page