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.

How To Delete ALL Email Forwarders

Discussion in 'E-mail Discussions' started by drfb, Feb 9, 2009.

  1. drfb

    drfb Member

    Joined:
    Jan 8, 2009
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Australia
    :confused::confused:
    I've imported email forwarders using .xls spreedsheet in cpanel.
    They loaded all fine however it kept the old settings (email forwarders)..
    Is there a way of deleting all email forwarders so i can add new ones without
    having to click on delete next to each individual forwarder that needs removing?

    Please Help -- I wanna save some time if possible.
     
  2. apogee

    apogee Well-Known Member

    Joined:
    Nov 8, 2004
    Messages:
    107
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Europe
    cPanel Access Level:
    DataCenter Provider
    use vi and edit /etc/valiases/domain.tld
     
    JawadArshad likes this.
  3. drfb

    drfb Member

    Joined:
    Jan 8, 2009
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Australia
    I can view my /etc/ folder but do not have the /valiases/ folder within it.

    I'm assuming i will have to get my server provider to change the file?
    I'm a reseller but have one of my domains that need this domain.tld file updated.
     
  4. brianoz

    brianoz Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,146
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    Melbourne, Australia
    cPanel Access Level:
    Root Administrator
    actually you have permission from PHP scripts, depending on how your server is setup, something like this might work:

    <php system("cp /dev/null /etc/valiases/yourdomain.com"); ?>

    Be aware that will instantly destroy all your aliases, if it works!

    This version might error log to the browser, if it works at all:

    <php passthru("cp /dev/null /etc/valiases/yourdomain.com 2>&1"); ?>
     
Loading...

Share This Page