View Full Version : When you have custom MX and Web Forms

WestHost - CRussell
09-19-2003, 07:31 PM
Currently, when you have a custom MX record and a web form, the VPS attempts to deliver the mail from the web form locally instead of delivering the message to your custom mail servers.

Here's how to fix:

1) Edit /etc/mail/sendmail.mc -- add the following two entries

define(`MAIL_HUB', `theirdomain.com')

2) Rebuild the sendmail.cf file from the config file with this command:

m4 /usr/share/sendmail/sendmail.cf/m4/cf.m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf

3) Remove all catch-alls and conflicting domain-aliases from your SiteManager (these get processed as part of the LOCAL-RULES in sendmail -- if they exist, it will prevent sendmail from processing the relay rules, so the mail will not get delivered). You should not be using these settings anyway if you have custom MX servers since they would have no effect.

That's it.

02-08-2006, 03:04 PM
I have performed the steps in the post (twice) on one of my clients' accounts, but sendmail continues to attempt to deliver to a local user account. When you say to "remove all...conflicting domain-aliases", are you talking about user/email aliases or something else?

Thanks, Fritz

02-08-2006, 03:25 PM
Fritz I think he was speaking of what is listed at when you go to Site Manager > e-mail/FTP Management > Aliases/Forwarding. That is how I interpret it.

02-08-2006, 03:33 PM
I was pokeing around some more and you may also want to check Site Manager > Domain Management > DNS Records. Just a guess but you might want to look and see if there may be a conflict there.

02-14-2006, 09:59 AM
That is what I was wondering about. I've already removed all email/ftp accounts and forwarders.

I have MX records set up for email.domainname.com and mail.domainname.com. Then I have Type A records that point both of those to the IP address of the external mail server. I thought the problem might be that I still had smtp and pop CNAME records still pointing to the canonical "@", but I just deleted those records entirely and sendmail is still trying to use the "local" mailer for delivery.

Please note that I am not a DNS expert.

03-06-2006, 02:23 PM
I still don't have this figured out. Any ideas?

Thanks, Fritz

03-06-2006, 04:31 PM
This is really not my area. :) I wish Jalal would stop by. He seems to understand the email system really well. Just trying to think off the top of my head ... is your account a static IP account or a shared one. This fact seems to make a difference in many things and although I can't think why it would in this instance perhaps there is something in the set up of an account that is uses a static IP that would.

Also have you submitted a support ticket? It may be this is a case where they don't really support the changes but if you refrenced this post by Chris they may be able to give you some insight or perhaps check your account to see if you missed something.

03-06-2006, 04:43 PM
It is an IP-based account. I may have to submit a support ticket even though I don't like to bother them about custom setups I figure they probably don't support.

03-08-2006, 03:22 AM
Hi, I hope this isn't off-topic for this, but the discussion reminds me of a problem I have with changing the MX record and still wanting to deliver messages to a script. In doing this stickyhost thing, is there any modification you can suggest that would get regular email to the third-party server except for a specified email address that is delivered locally to a script?