LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Postfix bounce message remove logs (https://www.linuxquestions.org/questions/linux-server-73/postfix-bounce-message-remove-logs-4175597778/)

ddstyles 01-18-2017 10:38 PM

Postfix bounce message remove logs
 
My Bounce email looks like this:
I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.


<duncan2@xxxxxxxxxxx>: host xxxxxxx.localdomain[private/dovecot-lmtp]
said: 550 5.1.1 <duncan2@xxxxnz> User doesn't exist:
duncan2@xxxx (in reply to RCPT TO command)

Final-Recipient: rfc822; duncan2@xxxxxx
Original-Recipient: rfc822;duncan2@xxxxx
Action: failed
Status: 5.1.1
Remote-MTA: dns; xxxxxxx.localdomain
Diagnostic-Code: smtp; 550 5.1.1 <duncan2@xxxxxx> User doesn't exist:
duncan2@xxxxxxx


---------- Forwarded message ----------
xxxxxxxxx
Cc:
Date: Thu, 19 Jan 2017 17:06:23 +1300
How can I tell postfix to remove all the logs and diagnostics?
i.e. from the "it's attached below" down to the original email?

many thanks,

bathory 01-20-2017 12:45 AM

Hi,

Take a look here

Regards

ddstyles 01-21-2017 02:00 PM

thanks bathory - I followed that link to configure the bounce message. My post is asking if I can configure postfix to only send the fail message - without all the Diagnostics the come after it.

i.e. I'm trying to get the email to look like this:

Code:

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

---------- Forwarded message ----------
xxxxxxxxx
Cc:
Date: Thu, 19 Jan 2017 17:06:23 +1300


bathory 01-22-2017 11:33 AM

Quote:

I followed that link to configure the bounce message. My post is asking if I can configure postfix to only send the fail message - without all the Diagnostics the come after it.
I don't run postfix, but you could try to create a failure template based on the instructions at the link above and see what you get.
From what I've read though, I think it's just changes the initial text to your linking and lets the diagnostic part intact, so it's not exactly what you want.
Most likely it's not possible to omit the 2nd part unless you recompile postfix sources.

You may ask your question to postfix lists and get a better answer

Regards


All times are GMT -5. The time now is 11:27 AM.