Qmail
[Top] [All Lists]

Re: Putting delivered mail back in the queue

To: qmail@list.cr.yp.to
Subject: Re: Putting delivered mail back in the queue
From: John Levine <johnl@iecc.com>
Date: 23 Jan 2007 22:51:33 -0000
Cc: rick.root@webworksllc.com
Delivered-to: sp-com-lists@consult.net
Delivered-to: gmail-qmail@securepoint.com
Delivered-to: sp.com.list@gmail.com
Delivered-to: mailing list qmail@list.cr.yp.to
In-reply-to: <b528d9d90701230805j6e70ceffn1e4558dbffbfc32d@mail.gmail.com>
Mailing-list: contact qmail-help@list.cr.yp.to; run by ezmlm
Organization:
>I actually came up with something similar on my own, except
>that all of the mail in my maildir is to me.  so my script looked
>like this:
>
>    #!/bin/bash
>    for X in *viviotech*
>    do
>            cat $X | /var/qmail/bin/qmail-inject
>    done
>
>However, using qmail-inject applied the current date/time stamp,
>which is undesirable.  I'd like the mail to be delivered with
>the original datetime information.

Use forward, which is a small wrapper around qmail-queue and doesn't
reformat its input at all.  Its main peculiarity is that it insists on
having environment variables SENDER and DTLINE set, so you can do
something like this:

    export SENDER=$LOGNAME
    export DTLINE="Delivered-To: me
    "

    for X in *viviotech*
    do
            /var/qmail/bin/forward newaddress@some.where < $X
    done

<Prev in Thread] Current Thread [Next in Thread>