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.

Changing default settings for default address

Discussion in 'E-mail Discussions' started by rklei3434, Jul 19, 2016.

  1. rklei3434

    rklei3434 Registered

    Joined:
    Jul 19, 2016
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Chicago
    cPanel Access Level:
    DataCenter Provider
    We have several cPanel servers that are not rejecting messages to mailboxes that don't exist -- they are simply passing them on to the default address. What we want is for all domains to have the setting: "Discard the email while your server processes it by SMTP time with an error message."

    Is there a way to globally change this for all domains present and future? Maybe with an ACL in Exim?

    If not, I suppose we'll have to change this setting for all accounts by hand, but is there a way to make "discard the email . . ." the default for all new domains?

    Thanks very much!
     
  2. ssfred

    ssfred Well-Known Member

    Joined:
    Jan 6, 2012
    Messages:
    62
    Likes Received:
    2
    Trophy Points:
    8
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello

    If you are looking to change the "Default Email Account" from cPanel user to "fail" for all accounts server wide, you may check the option available in WHM -> Tweak Settings -> Mail -> Initial default/catch-all forwarder destination .
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    650
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    This will change the default value for new accounts. There's no native feature that will change the value for existing accounts, however if you wanted to change it for every account on the system you could use commands like this:

    Code:
    cp -a /etc/valiases /etc/valiases-backup
    for f in /etc/valiases/*; do >$f; done
    echo "*: :fail: No such person at this address." | tee -a /etc/valiases/* >/dev/null

    Note this will backup the existing /etc/valiases directory to /etc/valiases-backup, remove any existing default address entries for the domain names, and then replace them all with "*: :fail: No such person at this address.".

    Thank you.
     
Loading...

Share This Page