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.

Can exim force route to an IP?

Discussion in 'E-mail Discussions' started by heyjohnboy, Jul 11, 2007.

  1. heyjohnboy

    heyjohnboy Well-Known Member

    Joined:
    Oct 7, 2003
    Messages:
    62
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Valencia, CA
    We have a client with their own exchange server, but they would like us to act as the primary MX for their domain, so that their email is filtered through our server, and then gets routed to their server.

    We know we can use cpanel forwarders to route mail to another email account, but how would we go about sending it to an IP or a FQDN?
     
  2. Bima

    Bima Member

    Joined:
    Jan 2, 2002
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    Hello,

    You should be able to achive this by adding this on top of the ROUTERS CONFIGURATION in Exim's config file:
    Code:
    smart_host_your_client:
      driver = manualroute
      route_list = your_client's_domain.com 123.123.123.123
      transport = remote_smtp
    This should forward all mail addressed to your_client's_domain.com to the IP address 123.123.123.123 (which should be the address of the machine running your client's Exchange).

    Marek
     
  3. heyjohnboy

    heyjohnboy Well-Known Member

    Joined:
    Oct 7, 2003
    Messages:
    62
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Valencia, CA
    Thanks. Could this be done on an individual email basis as well, so that the email addresses that they use are routed, but any that they don't use are ignored?
     
  4. mtindor

    mtindor Well-Known Member

    Joined:
    Sep 14, 2004
    Messages:
    1,281
    Likes Received:
    37
    Trophy Points:
    48
    Location:
    inside a catfish
    cPanel Access Level:
    Root Administrator
    There is no way for the server to easily know what email addresses are actually in use and which ones are not.

    When you become a secondary MX (or an ETRN host), you accept _all_ mail for the customer domain, whether it is sent to a legitimate email address in their domain or not. Then your server forwards _all_ that mail to them.

    There is a problem with that though - If you choose to be an ETRN host or a secondary MX (with a server that does not know about the useraccounts on the primary mail server), you are forced to accept all mail. Then, let's say an email comes in for a nonexisting email address in thier domain (mtindor@blahblahblah.net), your server forwards the mail to their Exchanger server. Their Exchange server rejects the message during SMTP phase because the user does not exist locally, and then your system is forced to create a bounce and send it back to the reported sender. If this is a spam message that was sent to mtindor@blahblahblah.com, then likely the FROM address was forged. So your server ends up sending backscatter spam. It's not spam in that your server didnt _generate_ the spam, and your server's bounce is a legitimate bounce, but most remote mail hosts who have to accept/deal with that bounced message to a faked or nonexistent sender will probably not like it and may even end up blacklisting you for it.

    If your customer really doesn't have a dependable connection (or one where they can directly send/receive mail from/to their Exchange server), then you could so something like this:

    1. set up domain email on your server for their specific domain
    2. create one POP3 user
    3. create forwarders for _every_ valid email user in their domain and forward that mail to the one POP3 user that you created in their account.
    4. have them POP the mail on a regular basis to get it to their machine (and their machine would then have to distribute it to all of the actual recipients)

    This would mean that each time they added a new email address on their Exchange server, they would need to log into Cpanel and add a new forwarder for that new email address so that it gets forwarded into their POP3 mailbox. In this way, your server would know of all valid email addresses for their domain (and thus be able to reject on recipient addresses that are invalid during SMTP phase). Obviously this is something you'd have to discuss with them beforehand - and then you'd have to be the primary MX.

    If your server is a Cpanel server, I think these are really the only viable options. Ideally, for them, if they absolutely need a secondary MX because for some reason their connection isn't reliable, then they would get backup MX service from another Exchange server that can 'talk to' their server and know of the valid email addresses before acepting delivery - Could do this with LDAP between an Exchange server and a non-Exchange server. Or the secondary MX could do a callout to their Exchange server during the SMTP phase of the incoming mail and could 'ask' their exchange server if the address existed prior to accepting mail for it.

    But Cpanel really is not the platform to use if you must be doing secondary MX service effectively for customer domain email.

    That's my opinion.

    Mike
     
Loading...

Share This Page