So far I thought that our mail server is correctly configured, but now something happened that I do not understand:
I sent out several mails by running a script on our mail server castor.foo.bar that pipes the messages to sendmail, which delivers them. The script is run by user business.
Some of the mails came back from reputed ISPs with an error "Relaying denied. Proper authentication required"
Here is one of them, originally sent to
addressee@somedomain.com:
-----------------
The original message was received at Wed, 18 Feb 2004 15:23:07 +0100 (CET)
from business@localhost
with id i1IEN7C26044
----- The following addresses had permanent fatal errors -----
addressee@somedomain.hu
(reason: 550 5.7.1 <addressee@somedomain.hu>... Relaying denied. Proper authentication required.)
----- Transcript of session follows -----
... while talking to mx.axelero.hu.:
>>>>>> RCPT To:<addressee@somedomain.hu>
<<< 550 5.7.1 <addressee@somedomain.hu>... Relaying denied. Proper authentication required.
550 5.1.1
addressee@somedomain.hu... User unknown
Reporting-MTA: dns; castor.foo.bar
Arrival-Date: Wed, 18 Feb 2004 15:23:07 +0100 (CET)
Final-Recipient: RFC822;
addressee@somedomain.hu
Action: failed
Status: 5.7.1
Remote-MTA: DNS; mx.axelero.hu
Diagnostic-Code: SMTP; 550 5.7.1 <addressee@somedomain.hu>... Relaying denied. Proper authentication required.
Last-Attempt-Date: Wed, 18 Feb 2004 15:23:11 +0100 (CET)
Return-Path: <business>
Received: (from business@localhost)
by castor.foo.bar (8.11.7/8.11.7) id i1IEN7C26044;
Wed, 18 Feb 2004 15:23:07 +0100 (CET)
Date: Wed, 18 Feb 2004 15:23:07 +0100 (CET)
Message-Id: <200402181423.i1IEN7C26044@castor.foo.bar>
--------------------
What I do not understand:
- how can a message sent to a mailbox in a certain domain come back with a "relaying denied" error from a different domain?
- why was the hostname of our mail server (castor) in the header of the message sent out? It should be, in my opinion, masqueraded to mail.foo.bar, since I use the masquerade_all and masquerade_envelope features in sendmail.conf! The real hostname of our mail server is undesirable as it is not an existing host on the internet, only an internal hostname.
Could you help me to find out if these problems are due to a misconfiguration of our mail server?