RESENDING my reply to the first posting of this question because
apparently it didn't make it to the list...
On 2025-07-17 at 10:34:51 UTC-0400 (Thu, 17 Jul 2025 16:34:51 +0200)
Jean-Luc Bourguignon via MIMEDefang <[email protected]>
is rumored to have said:
Dears,
I've migrated mimedefang filter from a system running mimedefang-2.75
(with
sendmail) to a new system running mimedefang-3.6-1 (with postfix).
It's working fine for some mails (if recipient is (are) in the same
domain)
but for some others (if recipients are in different domains) it's
sending
the mail but completely mixed up with mimedefang internal variable
values.
example :
X-MIMEDefang-Relay-37414ae06ce1243c7514ed3240814f6b33b29e14:
xxx.xxx.xxx.xxx
Received: from HOST (HOST [xxx.xxx.xxx.xxx])
by hostname (envelope-sender <UID@HOST>) (MIMEDefang) with ESMTP id
3F93410052FF; Thu, 17 Jul 2025 15:47:27 +0200
That line was added by MIMEDefang, and the ESMTP ID (3F93410052FF) looks
very much like a traditional Postfix form ID.
Received: (from root@localhost)
by HOST (8.15.2/8.15.2/Submit) id 56HDlC7B667845;
That is a line added by Sendmail, specifically by a v8.15.2 installation
using a submit.cf file. It is NOT Postfix.
This very likely means that you have a somewhat broken Postfix
installation, as it seems to have left the Sendmail version of
/usr/sbin/sendmail in place.
Thu, 17 Jul 2025 15:47:12 +0200
From: UID@HOST
Message-Id: <202507171347.56HDlC7B667845@HOST>
That form is a MID generated by Sendmail.
Date: Thu, 17 Jul 2025 15:47:12 +0200
To: [email protected], [email protected]
Subject: test
User-Agent: Heirloom mailx 12.5 7/5/10
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
this is the body of the email
I do not see how this is "completely mixed up with mimedefang internal
variable values" unless you are referring to the one Received header
which MIMEDefang added.
and in the log file I get :
Jul 17 14:43:01 hostname postfix-out/cleanup[790588]: D823F10052FF:
milter-discard: END-OF-MESSAGE from HOST [xxx.xxx.xxx.xxx]: milter
triggers
DISCARD action; from=<UID@HOST> to=<[email protected]> proto=ESMTP helo=<HOST>
The 'D823F10052FF' is the SMTP queue ID, and this is a Postfix format.
And of course the sender tag is postfix/cleanup, so this definitely
comes from Postfix, which DISCARDs the message instead of delivering it.
The absolutely should be more relevant and informational lines in the
log. Some may be from Sendmail or MIMEDefang.
Which I don't have with the old version + sendmail.
Note that a DISCARD action won't result in the message being sent
anywhere. Postfix will give the client a success message as if it is
going to deliver the message but will actually simply discard it.
I am never in favor of actually discarding mail for any reason but you
can configure MIMEDefang do it. The most common reason to do so is if
MIMEDefang is re-injecting the message with changes (e.g. to the
envelope values) and so can tell Postfix to discard the copy it is
working with.
Any idea where this can come from ?
Assuming you don't have any other milters configured, the only reason
that MIMEDefang will cause a DISCARD is if the code in your
mimedefang-filter file tells it to. Since everyone has a unique
mimedefang-filter, it isn't possible for anyone to know why yours caused
a DISCARD. The "END-OF-MESSAGE" piece says that this came from one of
the subroutines that runs after the MTA has received the whole message.
mimedefang configuration ?
Yes, positively. The mimedefang-filter file (normally in /etc/mail/ but
possibly elsewhere depending on the distro) is the core operational
configuration for MIMEDefang and contains Perl subroutines that are
called for each of the milter API hooks. Somewhere in that file
something is calling the MIMEDefang action_discard() function.
postfix milter configuration ?
No. There is not much too that. It's basically just a connection
definition.
The most common means of debugging problems in mimedefang-filter is to
include detailed logging in that file by calling the md_syslog() and/or
md_graphdefang_log() functions to log actions.
Thx in advance for your help.
I hope this is helpful. It is a bit difficult to assist with MIMEDefang
problems because every mimedefang-filter is different, it's all Perl
code, and that's where all the action is.
This is all made less obvious because it *looks* like you mail is
traveling via
Sendmail(Submit)->Postfix->MD(discard)->(re-inject)Delivery
And it is not clear why Sendmail is there at all or what MD is doing by
re-injection to effect delivery after it has told Postfix to discard the
message.
--
Bill Cole
[email protected] or [email protected]
(AKA @[email protected] and many *@billmail.scconsult.com
addresses)
Not Currently Available For Hire
_______________________________________________
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID. You may ignore it.
MIMEDefang mailing list [email protected]
https://lists.mimedefang.org/mailman/listinfo/mimedefang_lists.mimedefang.org