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 all vailiases to *: :fail server wide...

Discussion in 'E-mail Discussion' started by 4u123, Jul 5, 2008.

  1. 4u123

    4u123 Well-Known Member
    PartnerNOC

    Joined:
    Jan 2, 2006
    Messages:
    841
    Likes Received:
    14
    Trophy Points:
    168
    Hi, does anyone know of an easy way to perform the following?...


    1. Check all valiases for an asterisk entry. (i.e catch-all alias)
    2. If one exists but is not set to fail (i.e it does not contain *: :fail: ) replace it with...

    *: :fail: No Such User Here
     
    #1 4u123, Jul 5, 2008
    Last edited: Jul 5, 2008
  2. 4u123

    4u123 Well-Known Member
    PartnerNOC

    Joined:
    Jan 2, 2006
    Messages:
    841
    Likes Received:
    14
    Trophy Points:
    168
    We are doing this is because of dictionary spam issues and also customers setting up catch-alls to external addresses. Going forward we are only allowing customers to use catch-all addresses on request if they provide a valid reason.

    With my limited scripting ability and limited knowledge of using tools like sed, all I can think of currently is to use grep to locate the aliases and then update them manually.

    i.e

    grep "*: a" /etc/valiases/* >a.txt;
    grep "*: b" /etc/valiases/* >b.txt;

    etc etc. This will give me 26 files containing all domains using wildcard aliases.

    I've run this as a test up to letter d and there are already 43 that would need changing. This could take a while.

    If anyone is capable of writing a perl script to do this I'd be more than happy to pay you for your time! Send me a PM
     
  3. support

    support Active Member

    Joined:
    Aug 30, 2003
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    151
    If you used :*: in the past for all your domains, you can quickly substitute :fail: instead using:

    replace :*: :fail: -- /etc/valiases/*
     
  4. 4u123

    4u123 Well-Known Member
    PartnerNOC

    Joined:
    Jan 2, 2006
    Messages:
    841
    Likes Received:
    14
    Trophy Points:
    168
    Hi, thanks for your reply. Could you elaborate? I dont understand what you mean by "If you used :*: in the past".

    These are set automatially from cpanel. For domains using catch-all addresses, they are set like this...

    *: cpanelusername

    or

    *: name@mydomain.com

    I dont beleive any of them start with :*: and if they did, after that they would contian the cpanel user account or an email address, in which case I think using your replace suggestion, the line would end up like this...


    :*: :fail: cpanelusername

    or

    :*: :fail: name@mydomain.com
     
  5. LBJ

    LBJ Well-Known Member

    Joined:
    Nov 1, 2003
    Messages:
    78
    Likes Received:
    2
    Trophy Points:
    158
    The following perl script from chirpy works exactly as you've described...

    http://forums.cpanel.net/showthread.php?t=30987
     
  6. 4u123

    4u123 Well-Known Member
    PartnerNOC

    Joined:
    Jan 2, 2006
    Messages:
    841
    Likes Received:
    14
    Trophy Points:
    168
    Excellent, thank you very much! I did search but that thread didnt come up.
     
  7. ed.kalk

    ed.kalk Well-Known Member

    Joined:
    Jun 19, 2008
    Messages:
    76
    Likes Received:
    0
    Trophy Points:
    56
    Location:
    Minneapolis, MN
    How do I stop EXIM from accepting mail to anything@domain.com?

    How do I stop EXIM from accepting mail to anything@domain.com?

    I only want to have exim accept mail to real addresses on a per domain basis.

    I'm filtering 3-4 domains and my spam filter does user verification by telneting to the mail server and performing mail from: then rcpt to: and if the mail server accepts mail to: it figures that it is a valid user and created a quarentiene DB and so on and so forth...

    There is currently 658 streams in the quarentiene DB for one of the domains! eek!

    I tested telnetting to my mail server and sure enough is accepted mail to: gshdfj@domain.com...

    I have entered :fail: in the default address and still it accepts, help!

    This is the line from /etc/vailiases/domain.com :
    *: :fail:

    Is this wrong?
     
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