RE: [Exim] Resending mail

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Michael Griffin
Datum:  
To: exim-users
Betreff: RE: [Exim] Resending mail
Greetings

Thank you for all the replies but I think I may not have put my point
across correctly.

The situation I have is that I have a number of domains whose email is
stored using MailDir format.

From time to time I need to convert a email address (with MailDir
delivery) to an Alias. This in itself is easily done however there is
still mail in the MailDir directory for this address that I need to put
back into Exim's MailQ for delivery using the new alias / setting.

A brief example may be of assistance : (info supplied is fictitious
for security reasons)

I have an address EG : snowball@???
The mail is received by exim and stored in :

    /var/spool/exim/n/northpole.com/snowball/MailDir/new (then 'cur'
once read)
    Each e-mail is contained in individual files eg :
1052142445.2126.<hostname>
    These files have the following structure :


<Cut & Paste>
        Return-path: <polarbear@???>
        Envelope-to: snowflake@???,
             santa@???,
             rudolf@???
        Delivery-date: Mon, 05 May 2003 15:47:25 +0200
        Received: from mail.southpole.com ([111.222.33.44]
helo=mail.southpole.com)
                by mail.northpole.com with esmtp (Exim 3.36 #2)
                id 19CfyI-0000RT-01; Mon, 05 May 2003 15:25:34
+0200
        content-class: urn:content-classes:message
        MIME-Version: 1.0
        Content-Type: text/plain;
                charset="US-ASCII"
        Content-Transfer-Encoding: quoted-printable
        Subject: Test
        Date: Mon, 5 May 2003 15:22:39 +0200
        Message-ID:
<6F76E514B4D4EA469DACC8D4E2F2AF9B010AD77B@???>
        X-MS-Has-Attach:
        X-MS-TNEF-Correlator:
        Thread-Topic: Test
        Thread-Index: AcMTCWaMRcFv2ndbSsuykX16xpjePg==
        From: "Michael Griffin" <Michael@???>
        To: <snowflake@???>,
                <santa@???>,
                <rudolf@???>


        The body of the email message blah


</Cut & Paste>

Now what happens is that snowflake resigns / leaves / melts and santa
decides to forward snowflake@??? to another email address (eg
santa@???) BUT any mail that is already in the mail directory
needs to be delivery using to new forwarding / alias rule so that it can
be delivered to santa@???.

The trouble I am experiencing is that there are multiple
"Envelope-to:" address's that are comma and <CR> delimited (when there
is only one then the trailing comma is not there) of which only one is
the valid address I need to send to in no particular order.

The other thing is that there is no trailing "."

Anyone have a tool / script / URL / advice on how I can /bin/cat or
read these files back into the exim MailQ for re-delivery. I also don't
quite understand what is meant by the advice below.



R e g a r d s

M i c h a e l L G r i f f i n

> -----Original Message-----
> From: Tamas TEVESZ [mailto:ice@extreme.hu]
> Sent: 05 May 2003 15:50
> To: Michael Griffin
> Cc: exim-users@???
> Subject: Re: [Exim] Resending mail
>
>
> On Mon, 5 May 2003, Michael Griffin wrote:
>
> > What I need to do is re-read the mail in a specific
> domains directory
> > and re-send / forward (basically placing it back into the
> SMTP queue). > Anyone have a script / URL / HOWTO that will
> assist me in doing this?
>
> wrap the smtp commands around the contents of a file, don't
> forget to escape ^\.$ lines, then proceed as if it was a
> bsmtp file (which it it becoming at the end).
>
> --
> [-]
> ... and the rest is silence.
>
> --
>
> ## List details at
> http://www.exim.org/mailman/listinfo/exim-> users Exim details
> at http://www.exim.org/ ##
>
>