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!

Force Default Mail Address for all accounts?

Discussion in 'E-mail Discussion' started by Arun, Jun 15, 2010.

  1. Arun

    Arun Active Member

    Joined:
    Jan 28, 2006
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    151
    Is there any way to mass change the "Default Mail Address" for all domains (existing accounts) in the server to use ":fail: No such person at this address" with "Discard with error to sender (at SMTP time)"?
     
  2. vanessa

    vanessa Well-Known Member
    PartnerNOC

    Joined:
    Sep 26, 2006
    Messages:
    834
    Likes Received:
    29
    Trophy Points:
    178
    Location:
    Virginia Beach, VA
    cPanel Access Level:
    DataCenter Provider
    Here's a sexy one-liner:

    Code:
    sed "s/^\*:.*/\*: :fail: No such person at this address/g" -i /etc/valiases/*
    Back up your valiases folder first.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #2 vanessa, Jun 15, 2010
    Last edited: Jun 16, 2010
  3. Arun

    Arun Active Member

    Joined:
    Jan 28, 2006
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    151
    ^^ Thank you!
     
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