Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Set Default Address to Fail for all users

Discussion in 'E-mail Discussion' started by kavos1332, Apr 19, 2013.

  1. kavos1332

    kavos1332 Active Member

    Joined:
    Dec 17, 2012
    Messages:
    40
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Hi.

    I need to set Default Address of all users to Fail automatically via a script because there are lots of users so I cannot afford to do this from their cpanels.

    What is the commands required to write such shell or perl script?
     
  2. bellwood

    bellwood Member
    PartnerNOC

    Joined:
    Sep 25, 2012
    Messages:
    14
    Likes Received:
    1
    Trophy Points:
    3
    cPanel Access Level:
    DataCenter Provider
    Hello,

    You can use:

    sed -i 's/^\*: [^ ]*$/*: :fail: ADDRESS DOES NOT EXIST/g' /etc/valiases/*

    You'd be doing yourself a disservice if you didn't make a backup first just in case =)
     
  3. kavos1332

    kavos1332 Active Member

    Joined:
    Dec 17, 2012
    Messages:
    40
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    What do you mean by this?

    Does this one line command sets for all users?
     
  4. quietFinn

    quietFinn Well-Known Member

    Joined:
    Feb 4, 2006
    Messages:
    998
    Likes Received:
    11
    Trophy Points:
    168
    Location:
    Finland
    cPanel Access Level:
    Root Administrator
    That you should make a backup ot the /etc/valiases/ folder before you execute the command.



    Yes it does.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice