LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   Mail forwarders are bouncing but mail sent from server is working. (http://www.linuxquestions.org/questions/linux-server-73/mail-forwarders-are-bouncing-but-mail-sent-from-server-is-working-4175437889/)

jim.thornton 11-19-2012 11:27 PM

Mail forwarders are bouncing but mail sent from server is working.
 
I hope I can explain this clearly:

- Mail sent from a website (via contact form / script) using SMTP settings or PHP Mail will successfully send.

- Mail that is responded to via an email client bounces "Unroutable address".

For example:
- email sent from website that is configured to send submission to: name@mydomain.com

--> Within DA there is NO email account for this address setup. There is a forwarder in DA setup for name@mydomain.com to forward to another.name@gmail.com

-> I go onto the website and submit contact form. Mail successfully delivers.
-> I go into my email client and send a message to the same email address (utilizing my ISP SMTP server) and the mail is bounced. The message I get back indicates that it was unroutable.

I can't figure this one out and would greatly appreciate some help debuging it please.

jim.thornton 11-19-2012 11:57 PM

Further investigation, I think might have a fubar'd configuration. Let me try to explain:

1. Let's call the main domain "maindomain.com". The hostname for the server is s1.maindomain.com and this is the main admin account/domain for the DA panel.
2. DNS Entry for mail.maindomain.com points to a different mail server. Let's say 1.2.3.4 which is a custom mailserver that I'm running Zimbra on.
3. I have configured DA to NOT use the DA server for local mail on maindomain.com
4. My mail server is correctly working on the Zimbra box. Properly sending and receiving mail.
5. Any messages sent via phpmail (or my SMTP settings on my Zimbra server) are delivered successfully.
6. Any messages sent to an alias/forwarder setup on my DA server (even through a different user account who's mail is being handled by the DA server) is getting bounced as unroutable.

I'm thinking that there might be something wrong with the setup that I have. I ran a query on mxtoolbox on the mail.maindomain.com and it showed up that it resolved to my Zimbra server. So I'm thinking that when my DA server is receiving a request for an account, then forwarding it (no matter who the user is) that it is sending out the banner for my Zimbra server which is a completely different IP address and therefore bouncing??

I'm not really sure how to debug this and would appreciate any help that I can get.

descendant_command 11-20-2012 03:51 AM

Very hard to make sense of from your description and the obfuscated data.
No idea what 'DA' means but I guess it is some type of 'control panel'?

Does your webform send using a valid from address?
From what you have said, my guess would be no.

Can you set it to send via your zimbra server rather than the local sendmail (or such)?

jim.thornton 11-20-2012 06:33 AM

DA = Direct Admin -- You are correct, a control panel.

Could you please let me know where to expand and I will try to clarify it?

jim.thornton 11-20-2012 10:11 AM

I think I may have solved the problem. Through testing and debugging I discovered that there was no PTR record set for the IP address. I guess Gmail has a setting to reject any emails from a server with no PTR record set.

After setting the PTR record, I have tried sending another email and it succeeded.

lrtward 11-20-2012 02:29 PM

A lot of mail servers will reject mail if they cannot do a reverse lookup on the sender.

In other words, a receiving mail server can tell that a message came from IP 1.2.3.4 and it is supposed to be from sender.domain.com

The receiving mail server will frequently look up 1.2.3.4 to ensure it resolves to sender.domain.com, and also sender.domain.com to ensure it resolves to 1.2.3.4. This is simplified, of course; things like aliases (CNAME records) and mail routing hosts (MX) records also come into play. But basically that is why a PTR record is important: so the receiving mail server can resolve 1.2.3.4 and ensure it matches to sender.domain.com

Good job on resolving your problem!


All times are GMT -5. The time now is 06:41 PM.