Viktor Dukhovni:
> On Wed, Jun 26, 2019 at 12:39:02PM -0700, Ronald F. Guilmette wrote:
> 
> > When Postfix hands a message to something... say a script invoked via
> > some ~/.forward file... which one of these four formats will the message
> > be in?
> 
> See: 
> https://github.com/vdukhovni/postfix/blob/master/postfix/src/global/mail_copy.c#L235
> 
> So the answer is mboxo.

According to 'man 8 local', section 'EXTERNAL COMMAND DELIVERY':
       The local(8) daemon prepends a "From sender time_stamp" envelope header
       to each message, prepends an X-Original-To: header with  the  recipient
       address  as given to Postfix, prepends an optional Delivered-To: header
       with the final recipient  envelope  address,  prepends  a  Return-Path:
       header with the sender envelope address, and appends no empty line.

This seems to match the implementation.

In local/command.c:

    copy_flags = MAIL_COPY_FROM | MAIL_COPY_RETURN_PATH
        | MAIL_COPY_ORIG_RCPT;
    if (local_deliver_hdr_mask & DELIVER_HDR_CMD)
        copy_flags |= MAIL_COPY_DELIVERED;

In global/mail_copy.h:

#define MAIL_COPY_FROM          (1<<2)  /* prepend From_ */
#define MAIL_COPY_DELIVERED     (1<<3)  /* prepend Delivered-To: */
#define MAIL_COPY_RETURN_PATH   (1<<4)  /* prepend Return-Path: */
#define MAIL_COPY_ORIG_RCPT     (1<<7)  /* prepend X-Original-To: */

Note: this does not prepend '>' to lines starting with 'From '.

        Wietse

Reply via email to