LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Sendmail & Masq problem (https://www.linuxquestions.org/questions/linux-server-73/sendmail-and-masq-problem-582420/)

robinh 09-05-2007 12:34 PM

Sendmail & Masq problem
 
Well, we are hosting a website which we will refer to as mysite.com


Basically mysite.com in the DNS listing points to our firewall and then any 80 & 443 requests are forwarded on to the NAT'd webserver 192.168.10.2


Part of our system we have a registration system, the web server which we'll call web0 hosts a sendmail relay to forward out those requests. The problem occurs on delivery, an example return email:

--------------------
----- The following addresses had permanent fatal errors -----
<xxxxx@xxxxxx.org>
(reason: 550-Verification failed for <root@web0.mysite.com>)

----- Transcript of session follows -----
... while talking to mail.xxxxxxxx.org.:
>>> DATA
<<< 550-Verification failed for <root@web0.mysite.com>
<<< 550-Unrouteable address
<<< 550 Sender verify failed
550 5.1.1 <xxxxxx@xxxxxxx.org>... User unknown
<<< 503 valid RCPT command must precede DATA

--l85GpJHV004905.1189011079/web0.mysite.com
Content-Type: message/delivery-status

Reporting-MTA: dns; web0.mysite.com
Received-From-MTA: DNS; web0.mysite.com
Arrival-Date: Wed, 5 Sep 2007 11:48:31 -0500

Final-Recipient: RFC822; xxxxxxx@xxxxxxxxx.org
Action: failed
Status: 5.1.1

---------------------

Here is a snippet from the sendmail config which is the 'problem' area:

---------------------
MASQUERADE_AS(`mysite.com')dnl
dnl #
dnl # masquerade not just the headers, but the envelope as well
dnl #
FEATURE(masquerade_envelope)dnl
dnl #
dnl # masquerade not just @mydomainalias.com, but @*.mydomainalias.com as well
dnl #
FEATURE(masquerade_entire_domain)dnl
dnl #
dnl MASQUERADE_DOMAIN(localhost)dnl
dnl MASQUERADE_DOMAIN(localhost.localdomain)dnl
MASQUERADE_DOMAIN(mysite.com)dnl
MASQUERADE_DOMAIN(web0.mysite.com)dnl

----------------------

Everything as far as I can tell is correct for the sendmail.mc config, every thread and mailing list I have searched through references these options (the ones in bold) as the proper ones to have enabled to do masquerading.

I had turned off any relay feature to see if perhaps that was causing the problem, so the actual relay features are still off. This sendmail instance is not accessible from the internet, the firewall allows outbound traffic for it but nothing in.

A general explanation of the problem:

When mail is sent from web0 it is trying to resolve user@web0.mysite.com instead of it having been re written as user@mysite.com through sendmail masq.

There are valid MX entries to our primary mail server which actually handles the routing of anything to mysite.com

All I am trying to achieve is to send messages from our webserver and have them go out as user@mysite.com instead of user@web0.mysite.com

Also web0 is not listed in the public DNS record for mysite.com so the world has no idea what web0 is.

I really appreciate any help that can be offered, if I was to general anywhere please let me know or if there is more information that needs to be known, let me know what you would like to see.

Thanks,
Robin

robinh 09-05-2007 01:33 PM

Also another error email:

(reason: 553 5.1.8 <myself@anotherdomain.com>... Domain of sender address root@web0.mysite.com does not exist)


All times are GMT -5. The time now is 08:27 AM.