Sending From DomainX to DomainX (hosted on diff servers)

Discussion for developers using MailEnable.
Post Reply
christrinder
Posts: 4
Joined: Wed Jul 11, 2012 12:20 pm

Sending From DomainX to DomainX (hosted on diff servers)

Post by christrinder »

I build and host a number of websites for different clients. Almost all of my clients have their own email server which is completely separate to my web server. The websites I build for them almost always need to be able to send emails (such as password reminders etc). For sending emails from my web server, I use MailEnable and generally it works really well.

The problem is that a lot of my website's notification emails need to go to a mailbox at the same domain as my website is hosted, yet the mailbox is actually on their email server. So for example, lets say I have a website hosted on my Server (server A) at domainX.com. Something happens and I want to send an email to that client - e.g. client@domainX.com. Because I am sending from website@domainX.com to client@domainX.com, it seems that MailEnable doesn't bother trying to resolve the mail server (server B) of that address and just tries to send it locally - which fails of course because that mailbox doesn't exist locally.

My knowledge of email servers is pretty sketchy but I was wondering if there was a way to configure my MailEnable instance to be able to send to these remote mailboxes despite the fact it is using a local mail account with the same domain?

Thanks so much for any help that anybody can give! Chris

MailEnable
Site Admin
Posts: 4441
Joined: Tue Jun 25, 2002 3:03 am
Location: Melbourne, Victoria Australia

Re: Sending From DomainX to DomainX (hosted on diff servers)

Post by MailEnable »

In the scenario you mention, MailEnable will behave just like any other mail server (ie: its not a quirk or a problem, it is more a matter of understanding the principals of how to send to remote domains).
You cant have the domain registered as a local domain as well as expecting it to be routed to the true authoritative server. If a domain is not owned by your server, you should not have it defined on your server.
The first thing you should do is remove domainX.com from your server (since you are not responsible for that domain).
You should also ensure that your application authenticates against mailenable before attempting to send messages.

Finally, to resolve your impersonation problem, you have 2 options:

1. Should either modify your script or application to send as another domain (one that your server is actually responsible for). This is the preferred option; since it means that any bounce notifications will actually come back to you. It also means that remote servers wont detect your message as Spam, since they are likely to know that your server is not defined as being authoritative (either by MX lookup or DKIM).

2. You should grant the IP of your application as being autorised for relaying, and you should tweak the SMTP options to allow your application to impersonate another domain.
- Turn off "Authenticated Senders must use a valid sender address".
- Under "Address Spoofing..", select the option where authenticated senders can spoof sender addresses.
- Turn off "Reject mail is sender address is from an invalid domain".

The scenario of sending to another domain is called relaying (sending to a non-local domain). I also suggest you search the mailenable Knowledge Base using relay as the search criteria, since it will provide more insight as to how to send to remote domains.
This article provides a breif explanation in the context of sending as a local application:
http://www.mailenable.com/kb/Content/Ar ... D=me020044
Regards, Andrew

christrinder
Posts: 4
Joined: Wed Jul 11, 2012 12:20 pm

Re: Sending From DomainX to DomainX (hosted on diff servers)

Post by christrinder »

Just wanted to say thanks for taking the time to reply to this. I had posted the same question under another topic on this forum and that proposed solution seemed to solve my issue (http://forum.mailenable.com/viewtopic.php?f=2&t=24103). I hadn't seen this reply at the time. I can't say I fully understand it all at the moment, but how would you rank the smart host solution amongst these solutions? Obviously it would be ideal to send from another email address entirely, but if consumers are visiting a website at domainX.com, they surely expect the website to send emails to them from domainX.com? Anyway, it seems to be resolved for now but I will continue to research this further in the hope to understand it all properly. Thanks again.

Post Reply