Score:0

Postfix bounce mail without subject nor from address

th flag

I have a problem with my postfix servers. When I send an email to an non-existing domain or mail address I get a bounce mail (which is normal) without From address nor Subject. I tried to create my custom template for bounced mail as the documentation shows but I had no luck. I still receive the mail like that.

This is my bounced mail:

This is a MIME-encapsulated message.

--3F0F416065D.1642072227/server.domain.com
Content-Description: Notification
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

This is the mail system at host server.domain.com.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

                   The mail system

<[email protected]>: host mail.domain.com[45.82.82.50] said: 550 5.1.1
    <[email protected]>: Recipient address rejected: User unknown in
    virtual mailbox table (in reply to RCPT TO command)

--3F0F416065D.1642072227/server.domain.com
Content-Description: Delivery report
Content-Type: message/delivery-status

Reporting-MTA: dns; server.domain.com
X-Postfix-Queue-ID: 3F0F416065D
X-Postfix-Sender: rfc822; [email protected]
Arrival-Date: Thu, 13 Jan 2022 11:10:26 +0000 (UTC)

Final-Recipient: rfc822; [email protected]
Original-Recipient: rfc822;[email protected]
Action: failed
Status: 5.1.1
Remote-MTA: dns; mail.domain.com
Diagnostic-Code: smtp; 550 5.1.1 <[email protected]>: Recipient address
    rejected: User unknown in virtual mailbox table

--3F0F416065D.1642072227/server.domain.com
Content-Description: Undelivered Message
Content-Type: message/rfc822
Content-Transfer-Encoding: 8bit

Return-Path: <[email protected]>
Received: from [10.0.0.6] (181.red-2-136-168.staticip.rima-tde.net [2.136.168.181])
    by server.domain.com (Postfix) with ESMTP id 3F0F416065D
    for <[email protected]>; Thu, 13 Jan 2022 11:10:26 +0000 (UTC)
Message-ID: <[email protected]>
Date: Thu, 13 Jan 2022 12:10:25 +0100
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
 Thunderbird/91.5.0
To: [email protected]
From: address Popescu <[email protected]>
Subject: ee
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

ee


--3F0F416065D.1642072227/server.domain.com--

Postfix template:

failure_template = <<EOF
Charset: us-ascii
From: [email protected] (Mail Delivery System)
Subject: Undelivered Mail Returned to Sender
Postmaster-Subject: Postmaster Copy: Undelivered Mail

This is the mail system at host $myhostname.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to <postmaster>

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

                   The mail system
EOF

Postfix config (main.cf):

bounce_template_file = /etc/postfix/bounce.cf
myorigin = $mydomain
cm flag
You obfuscate way too much. What is your server ($myhostname)? mail.mydomain.com, server.domain.com, mail.domain.com or even domain.com? Please explain which hostname has what role.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.