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.

Set Default Address to Fail for all users

Discussion in 'E-mail Discussions' 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:
    12
    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:
    10
    Trophy Points:
    18
    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.
     
Loading...

Share This Page