modoboa / modoboa-postfix-autoreply

Away message editor for Modoboa (postfix compatible)
MIT License
6 stars 10 forks source link

Add Auto-Submitted, In-Reply-To, References, Precedence headers in autoreply messages #3

Closed tonioo closed 9 years ago

tonioo commented 9 years ago

From @themr0c on April 10, 2014 7:44

According to https://tools.ietf.org/html/rfc3834#section-3.1 some fields are mandatory in autoreply messages:

The In-Reply-To and References fields SHOULD be provided in the header of a response message if there was a Message-ID field in the subject message.

The Auto-Submitted field, with a value of "auto-replied", SHOULD be included in the message header of any automatic response.

The Subject field SHOULD contain a brief indication that the message is an automatic response, followed by contents of the Subject field (or a portion thereof) from the subject message. The prefix "Auto:" MAY be used as such an indication. If used, this prefix SHOULD be followed by an ASCII SPACE character (0x20).

A response MAY include a Precedence field. The field-body of the Precedence field MAY consist of the text "junk", "list", "bulk", or other text deemed appropriate by the responder.

[NB: for Precedence: auto_reply is also an option]

Actual message is like :

Return-Path: <uuu@uuu.uuu>
Delivered-To: ttt@ttt.ttt
Received: [...]
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: I'm off
From: Uuu Uuu <uuu@uuu.uuu>
To: ttt@ttt.ttt
Message-ID: <NNN@vvv.vvv.vvv>
User-Agent: Modoboa
Date: Thu, 10 Apr 2014 09:06:09 +0200

I'm currently off. I'll answer as soon as I come back.

Best regards,

Copied from original issue: tonioo/modoboa#544

tonioo commented 9 years ago

Actually this feature is more complicated to add than expected.

The current autoreply script is using Postfix's pipe service. Unfortunately, this one does not provide the original message-id, so we can't add the In-Reply-To header to the response.

It seems the right way to build an autoreply is to build a MILTER but that's a completly different story! I see three options :

I think the last solution would be the quickest to implement but it would be available to sieve/managesieve servers only.

What do you think?

tonioo commented 9 years ago

From @piwats on July 20, 2014 21:45

Hi,

according to http://wiki2.dovecot.org/Pigeonhole/Sieve/Examples#Vacation_auto-reply it is possible to include the original subject using the variables extension.

Since dovecot can do sieve, why not use it for the auto-replies?

-Paul

tonioo commented 9 years ago

@themr0c Finally, I may have found a solution!