Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 8 of 8
  1. #1
    Member
    Join Date
    Nov 2007
    Posts
    865

    Lightbulb how to remove / deleted all email forwarders from particular domain ??

    we have a domain which has 2000 numbers of email forwarders created & which want to remove them.

    how to remove / deleted all email forwarders from particular domain at one go ?

  2. #2
    Member
    Join Date
    Jan 2011
    Posts
    505
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: how to remove / deleted all email forwarders from particular domain ??

    Hello,

    You can delete the forwarders of a particular domain from the file /etc/valiases/${domain} .
    Cheers !

  3. #3
    Member
    Join Date
    Nov 2007
    Posts
    865

    Thumbs up Re: how to remove / deleted all email forwarders from particular domain ??

    do i just need to enter only /etc/valiases/${domain} (replace with actual domain) from SSH ??

  4. #4
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Apr 2008
    Location
    PK
    Posts
    443

    Default Re: how to remove / deleted all email forwarders from particular domain ??

    Yes. Rather than deleting the file, you could move the file into the user's home folder as it would have been a quite an effort to add so many forwarders.

    Quote Originally Posted by nileshparmar View Post
    do i just need to enter only /etc/valiases/${domain} (replace with actual domain) from SSH ??
    Last edited by JawadArshad; 02-04-2011 at 02:52 AM.
    1 solution works for all problems. Trying harder!
    HostMasterTips - Understanding Tech Support

  5. #5
    Member
    Join Date
    Nov 2007
    Posts
    865

    Default Re: how to remove / deleted all email forwarders from particular domain ??

    Quote Originally Posted by JawadArshad View Post
    Yes. Rather than deleting the file, you could move the file into the user's home folder as it would have been a quite an effort to add so many forwarders.
    I have tried but it gives an error
    Code:
    root@server [~]# /etc/valiases/$example.net
    -bash: /etc/valiases/example.net: No such file or directory
    root@server [~]# cd /etc/valiases/
    root@server [/etc/valiases]# /etc/valiases/$example.net
    -bash: /etc/valiasesexample.net: No such file or directory
    root@server [/etc/valiases]# /etc/valiases/${example.net}
    -bash: /etc/valiases/${example.net}: bad substitution
    root@server [/etc/valiases]#

  6. #6
    Member
    Join Date
    Jan 2011
    Posts
    505
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: how to remove / deleted all email forwarders from particular domain ??

    Hello,

    root@server [/etc/valiases]# vi domain.com

    You will be able to see the forwarders of the domain.

  7. #7
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    6,305
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: how to remove / deleted all email forwarders from particular domain ??

    Hello Nilesh,

    You cannot directly enter the file name without a corresponding command before it. If you want to move the file, you can do:

    Code:
    cd /etc/valiases
    mv domain.com /home/user/domain.com
    Here you are changing directory (cd) to /etc/valiases, then moving (mv) the domain's forwarder file to the user's home location. Replace domain.com with the domain in question and replace user with the cPanel account's username.

    I did want to mention that vi isn't necessary to see the contents of a file also. You can use cat:

    Code:
    cat /etc/valiases/domain.com
    Thanks.
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Forums Technical Analyst, cPanel Tech Support

    Submit a ticket | Check an existing ticket

  8. #8
    Member rhenderson's Avatar
    Join Date
    Apr 2005
    Location
    Oklahoma
    Posts
    742

    Default Re: how to remove / deleted all email forwarders from particular domain ??

    Quote Originally Posted by nileshparmar View Post
    we have a domain which has 2000 numbers of email forwarders created & which want to remove them.

    how to remove / deleted all email forwarders from particular domain at one go ?
    I would install ConfigServer Mail Manage and do it from there, it will show the forwarders in a text file you can cut and past save it before you delete them ConfigServer Mail Manage
    Regards,
    Randy
    Affordable Web Hosting
    _________________________

Similar Threads & Tags
Similar threads

  1. Y/A Email/Domain Forwarders ques (Parked)
    By Networkologist in forum E-mail Discussions
    Replies: 8
    Last Post: 09-11-2010, 01:59 PM
  2. Email Domain Forwarders
    By soisix in forum E-mail Discussions
    Replies: 5
    Last Post: 12-30-2009, 04:08 PM
  3. Forwarders and Domain Forwarders in applist
    By intrwrks in forum cPanel Developers
    Replies: 1
    Last Post: 07-01-2009, 04:01 PM
  4. IMAP issue - email marked as deleted but not deleted
    By webstyler in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 05-06-2009, 03:18 PM
  5. Domain missing from EMail forwarders
    By DigitalSurgeon in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 09-05-2005, 04:58 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube