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.

Exim redirect mail to another server?

Discussion in 'E-mail Discussions' started by cburchell, Apr 24, 2007.

  1. cburchell

    cburchell Member

    Joined:
    Dec 8, 2004
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Is there a setting / configuration change that can be made in Exim to redirect incoming mail for one domain to another mail server?

    MX records currently point to my cPanel server so that the cPanel server provides spam filtering, etc. However, I want to configure Exim so that once mail arrives for a particular domain, messages are forwarded to the client's in-house e-mail server.

    I know I can change MX records to point directly to their own server, but I'd like to relay through mine to provide e-mail / spam filtering service.

    Can this be done with an Exim or cPanel hack / tweak?
     
  2. bking

    bking Well-Known Member

    Joined:
    Mar 1, 2004
    Messages:
    206
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Sydney
    Maybe add the domain to /etc/secondarymx and remove the domain from /etc/localdomains ?

    Hrmm.. actually I dont think that will work if you are listed as best pref MX...

    You could always go into cPanel and then the mail options and enable Email Domain Forwarders to goto another domain on this other server...
     
    #2 bking, Apr 24, 2007
    Last edited: Apr 24, 2007
  3. cburchell

    cburchell Member

    Joined:
    Dec 8, 2004
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    I've thought of this approach (hiding the lower MX priority host behind a firewall and setting up rules to only allow relay forwarding from the host in question) but I'm looking for a solution that is configurable at the transport / Exim level on the host itself rather than through MX relaying.

    Any ideas?
     
  4. abubin

    abubin Well-Known Member

    Joined:
    Dec 7, 2004
    Messages:
    393
    Likes Received:
    1
    Trophy Points:
    18
    so, you are saying you only want to redirect the email from your server and not through MX records?

    That means you definitely want email to come into this server and then from this server forward the email to another server? Am I getting it right?

    Can I know what is the reason for it? Maybe the first server will have antispam to scan for spams and after scanning, forward the email to the correct server?
     
  5. nickp666

    nickp666 Well-Known Member

    Joined:
    Jan 28, 2005
    Messages:
    770
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    /dev/null
  6. cburchell

    cburchell Member

    Joined:
    Dec 8, 2004
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    abubin / nickp666:

    Thanks for your replies.

    The artilce nickp666 provided is _exactly_ what I'm trying to achieve. I want to act as primary MX for a customers e-mail domain to provide virus and spam filtering and then push the mail directly to their non-MX-published Exchange host. thanks for the link - this is exactly what I was looking for.
     
Loading...

Share This Page