Hello everybody,

A software we use in house is sending e-mails that are processed by postfix 
which relays them to an exchange server that has a connection to the internet 
(unlike the sending server).

Recently, the admin of the exchange server forwarded me the following error 
message our server is causing:

   
-------------------------------------------------------------------------------------------------------------
   The client at "10.xxx.xxx.xxx" sent a "rcpt" command and the SMTP server 
responded with "501 5.5.4 Invalid
   Address ". The full command sent was "rcpt TO:<""@domain.com> 
ORCPT=rfc822;""@domain.com". This will probably
   cause the connection to fail.
   
-------------------------------------------------------------------------------------------------------------

In order to find out what messages were causing this, I had them deliver to a 
local mailbox. Here how ist headers are looking like:

-------------------------------------------------------------------
From ""@domain.com  Tue Oct 13 13:53:47 2009
Return-Path: <""@domain.com>
X-Original-To: iselie
Delivered-To: ise...@internal.domain.com
Received: from domain.com (internal [10.xxx.xxx.xxx])
        by internal.domain.com (Postfix) with SMTP id 0F3A4D2579
        for <iselie>; Tue, 13 Oct 2009 13:53:47 +0200 (CEST)
From:Name <usern...@domain.com>
To: <ise...@internal.domain.com>
Subject:Topic of mail
Date: Tue, 13 Oct 2009 11:53:47 0
MIME-Version: 1.0
Content-Type: text/plain
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: SOME-CUSTOM Mailer
X-MimeOLE: Produced By SOME-CUSTOM Mime
Message-Id: <20091013115347.0f3a4d2...@internal.domain.com>
-------------------------------------------------------------------

Now this confirms the error message coming from the exchange server. However 
things are not that simple. I then asked Postfix to keep the message internally 
with the following changes in header_checks

/From: ....@domain\.com/    HOLD
/To: ....@domain\.com/      HOLD

I then had a look at the messages kept in /var/spool/postfix/hold with postcat 
and I couldn't believe my eyes: actually postfix must be mangling something 
since the "from"-address is absolutely correct! Does anyone see why postfix 
removes the username from the from-information and just sends an empty string? 
Note that some mails actually do get through so it's not an overall problem. Is 
there a mistake in the format the "SOME-CUSTOM Mailer" is generating? If yes, 
can anyone point me to the specification so that I can get in touch with the 
company?


-----------------------------------------------------------------------------
*** ENVELOPE RECORDS 08192D2576 ***
message_size:             682             551               1               0
message_arrival_time: Tue Oct 13 12:05:51 2009
create_time: Tue Oct 13 12:05:51 2009
named_attribute: rewrite_context=local
sender: @domain.com
named_attribute: log_client_name=internal
named_attribute: log_client_address=10.xxx.xxx.xxx
named_attribute: log_message_origin=internal[10.xxx.xxx.xxx]
named_attribute: log_helo_name=domain.com
named_attribute: log_protocol_name=SMTP
named_attribute: client_name=internal
named_attribute: reverse_client_name=internal
named_attribute: client_address=10.xxx.xxx.xxx
named_attribute: helo_name=domain.com
named_attribute: client_address_type=2
named_attribute: dsn_orig_rcpt=rfc822;my.addr...@domain.com
original_recipient: my.addr...@domain.com
recipient: my.addr...@domain.com
*** MESSAGE CONTENTS 08192D2576 ***
Received: from domain.com (internal [10.xxx.xxx.xxx])
        by internal.domain.com (Postfix) with SMTP id 08192D2576
        for <my.addr...@domain.com>; Tue, 13 Oct 2009 12:05:51 +0200 (CEST)
From:Name <usern...@domain.com>
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
To: <my.addr...@domain.com>
Subject:Topic of mail
Date: Tue, 13 Oct 2009 10:05:51 +0000
MIME-Version: 1.0
Content-Type: text/plain
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: SOME-CUSTOM Mailer
X-MimeOLE: Produced By SOME-CUSTOM Mime
Message-Id: <20091013100551.08192d2...@internal.domain.com>

Message Body

*** HEADER EXTRACTED 08192D2576 ***
*** MESSAGE FILE END 08192D2576 ***
-----------------------------------------------------------------------------

Thanks a lot for your insights.

Regards,
Erich



P.S. I'm running postfix-2.3.3 on RHEL 5

Reply via email to