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!

Exim and wildcard subdomain addresses

Discussion in 'E-mail Discussion' started by FlyFoxUK, Jan 30, 2011.

  1. FlyFoxUK

    FlyFoxUK Registered

    Jun 14, 2010
    Likes Received:
    Trophy Points:
    I am trying to come up with an exim router that can handle mail addressed to any subdomain of one of my hosted domains, and deliver it to a given address on the system. (Ultimately, the received email will be piped to a script for automated processing by my application - the subdomain will represent a client's account name). For example: -> -> ->

    I have to be able to use wildcards in the router as the rule must handle unknown subdomains in the address - I cannot hard code or list specific subdomains like "subone", "subtwo", "subanother" in the example above.

    So far I have created a file called /etc/wildcard_subdomains containing:
    I have tried adding a router as below to the Advanced Exim Config editor of WHM under the "ROUTERS CONFIGURATION" section, directly under the "democheck" router:

        driver = redirect
        domains = partial-lsearch;/etc/wildcard_subdomains
        data = ${lookup{$local_part}lsearch*{/etc/valiases/$domain_data}}
    I have not added any extra lines to /etc/localdomains or /etc/userdomains.

    When I do this, I cannot send email to an example address of from my GoogleMail account - it bounces with this error:
    550-<google IP> is currently
    550-not permitted to relay through this server. Perhaps you have not logged
    550-into the pop/imap server in the last 30 minutes or do not have SMTP
    550 Authentication turned on in your email client.
    If I attempt to send an email to that address from a local user account instead, it will route but to the catchall mailbox of (I have a forward set for to forward mail to my main email address).

    Can anyone help me achieve the desired re-routing with an appropriate Exim rule?

    Many thanks for any help.

    Flying Fox

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