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.

Forwarding all messages in mailbox?

Discussion in 'E-mail Discussions' started by WillDashwood, Dec 10, 2004.

  1. WillDashwood

    WillDashwood Member

    Joined:
    Oct 12, 2004
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    I have many mailboxes set up on an account and they're getting a lot of emails and I need to forward all of them to a single person. I don't want to log into each mailbox and forward each one manually so is there an easier way? Once the emails are forwarded I want to close each mailbox. I don't suppose closing the mailbox automatically copies mail into the default account? I can't find anything in the reseller control panel either!

    I'm using WHM 9.9.3 cPanel 9.9.6-C9.

    Thanks.
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    You can reprocess an inbox from a Mail account and forward it elsewhere using:


    cd home/username/mail/domain.com/username
    cp -a inbox inbox.for
    cat /dev/null > inbox
    cat inbox.for | formail -s /usr/sbin/sendmail an@other.com
    rm -f inbox.for
     
  3. WillDashwood

    WillDashwood Member

    Joined:
    Oct 12, 2004
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    Unfortunately I don't have direct access to the server. I'm basically working through cPanel.
     
  4. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Well, you could create a shell script with the above commands in, upload it and then write a perl script to run the shell script, upload it then run the perl script ;)
     
Loading...

Share This Page