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 reject all mail for root and parked domains.

Discussion in 'E-mail Discussions' started by chinesewhispers, Jan 25, 2004.

  1. chinesewhispers

    chinesewhispers Registered

    Joined:
    Dec 8, 2003
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    OK, let's say I have a cpanel account with a root domain, and it has several hundred parked domains on it.

    I don't want to get any mail from any of the domains, so basically I can ditch it all.

    At the moment, the default mailbox where the mail is going is the username of the account, as it is for all parked domains that have been added.

    This is filling up by over 1500 a day, and I am manually deleting all the mail.

    What I need is a solution, instead of going through the list and changing the default address to :blackhole:, what else can I do to stop all mail to the root domain and all parked domains.

    Many thanks.
     
  2. ciphervendor

    ciphervendor Well-Known Member

    Joined:
    Aug 26, 2002
    Messages:
    1,052
    Likes Received:
    0
    Trophy Points:
    36
    Two solutions:

    - Create a cron and zero the file once a day.

    - Write a bash/perl script to edit all your valiase files and send everything to the bit bucket.
     
  3. chinesewhispers

    chinesewhispers Registered

    Joined:
    Dec 8, 2003
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Hi again

    It seems like my only option is the cron option.

    Is there anybody who could assist or advise me on the task in hand?

    I would need to know (never having used any cron functions) how to delete or zero the inbox file.

    All help is very much appreciated, thanks in advance.
     
  4. ttremain

    ttremain Well-Known Member

    Joined:
    Feb 16, 2003
    Messages:
    212
    Likes Received:
    0
    Trophy Points:
    16
    I did one better, I wrote a script that removes specific domains from /etc/localdomains

    Each night I first run

    /scripts/updateuserdomains
    /scripts/mailperm

    Then I remove all the domains I don't want mail from...
     
Loading...

Share This Page