Bug 42874

Summary: Box used as forworder generate messages with wrong destination MX
Product: [Retired] Red Hat Linux Reporter: G. Bersano <giorgio.bersano>
Component: sendmailAssignee: Florian La Roche <laroche>
Status: CLOSED WORKSFORME QA Contact: David Lawrence <dkl>
Severity: high Docs Contact:
Priority: medium    
Version: 7.1   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-05-30 15:13:44 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description G. Bersano 2001-05-30 15:13:41 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.76 [en] (X11; U; Linux 2.2.19-6.2.1 i686)

Description of problem:
In a setup where my box is a relay only MX for 'otherdomain.com'
mail is flowing fine from everywhere->myhost->otherdomain.com but does not
go in the other direction: otherdomain.com->myhost->rest-of-the-world.

I had the following lines in /var/log/maillog 

 May 28 11:19:41 myhost sendmail[12697]: f4S8Jdk12697: timeout waiting
for input from mail.otherdomain.com during message collect
 May 28 11:19:41 myhost sendmail[12697]: f4S8Jdk12697:
from=<X.Y>, size=0, class=0, nrcpts=1,
msgid=<200105280819.f4S8Jdk12697.com>, proto=ESMTP,
daemon=Daemon0, relay=mail.otherdomain.com [1.2.3.4]
 May 28 11:19:41 myhost sendmail[12697]: f4S8Jdk12697: to=<xy>,
delay=01:00:02, pri=30000, relay=yahoo.it., stat=timeout waiting for
input during message collect

You may notice two strange things in the log:
1) size is zero: this is "correct": I traced messages exchanged in the
protocol and after EHLO ...... myhost there is the 
  <<< DATA  
  >>> 354 Enter mail, end with "." on a line by itself
dialog that exits with timeout (and so size=0).
2) in the to=<...> line we have relay=yahoo.it. and not something like
relay=host.yahoo.it. 

This is a visible simptom: in the sending phase relay= is always a
domain, not an host. I don't understand why!

How reproducible:
Always

Steps to Reproduce:
1. have two hosts: A and B, A cannot reach internet, B is his mail relay
2. describe this setup in DNS: A is higher precedence MX, B the other one
3. B also is the mail forwarder for A
4. send a mail from A to yourfriend

Actual Results:  A tries to send the mail to B but in the collect phase B
has a timeout and does not get any data.

Expected Results:  mail from A delivered to yourfriend

Additional info:

Michael Abadjiev suggested to me that sendmail-8.11.2 is broken and to grab
sources from sendmail-8.11.0 (RedHat 7.0); done, rebuild (on RH 7.1) and
all went fine.

Comment 1 Florian La Roche 2001-08-06 10:33:24 UTC
From your description I think that sendmails's behaviour is correct.
You have to configure sendmail as relay for this domain and forward mail
and you have to add another configuration that hosts within that domain
can use your server as open email-relay for the rest of the world.

Florian La Roche