Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Processing mail after downtime

1 view
Skip to first unread message

Jack Wasey

unread,
Feb 3, 2004, 2:55:14 AM2/3/04
to
Exim kindly stored my mail after I made a mistake in my .forward file,
but after correcting it, I flushed the queue using exim4 -q, and all
the mail went into /var/spool/mail/myname, and wasn't processed into
my maildirs.

My question is, how do I re-process that mail so it is put into my
Maildir inbox?

Am running debian linux on a 486, courier imap, exim4, fetchmail.

Thanks,
Jack

Alan Connor

unread,
Feb 3, 2004, 3:28:26 AM2/3/04
to

Where did you learn how to use Exim? I haven't been able to find a lot
of documentation for beginners...

I'd really like to learn to use a real MTA, but Sendmail is too big and
complex and I don't like what I've read about Postfix.


You can do cat /var/spool..../myname | formail -s | the input of your
mail system.

If it was me, here, I'd send it through procmail, which is where fetchmail
sends the mail after pulling it down from the server.

(I'm assuming that /var/spool/..../myname is a single file in mbox format.)


AC

Alan Connor

unread,
Feb 3, 2004, 3:58:25 AM2/3/04
to
On Tue, 03 Feb 2004 08:28:26 GMT, Alan Connor <zzz...@xxx.yyy> wrote:
>
>
> On 2 Feb 2004 23:55:14 -0800, Jack Wasey <goo...@jackwasey.com> wrote:
>>
>>
>> Exim kindly stored my mail after I made a mistake in my .forward file,
>> but after correcting it, I flushed the queue using exim4 -q, and all
>> the mail went into /var/spool/mail/myname, and wasn't processed into
>> my maildirs.
>>
>> My question is, how do I re-process that mail so it is put into my
>> Maildir inbox?
>>
>> Am running debian linux on a 486, courier imap, exim4, fetchmail.
>>
>> Thanks,
>> Jack
>
> Where did you learn how to use Exim? I haven't been able to find a lot
> of documentation for beginners...
>
> I'd really like to learn to use a real MTA, but Sendmail is too big and
> complex and I don't like what I've read about Postfix.
>
>
> You can do cat /var/spool..../myname | formail -s | the input of your
> mail system.
a

That second "|" after formail -s isn't necessary

(oops)


AC

Jack Wasey

unread,
Feb 4, 2004, 9:37:18 AM2/4/04
to
>
> Where did you learn how to use Exim? I haven't been able to find a lot
> of documentation for beginners...

Not straightforward, but Debian sets you up well.

> You can do cat /var/spool..../myname | formail -s | the input of your
> mail system.

formail is unknown to me and apparently unavailable on debian. There
is a whole bunch of mail utilities. Exim itself accepts a mail file
for input, but only processed the first message for me, not the rest.
I haven't got the time to piss around writing a perl script to submit
each message separately, especially as most of it is spam.

In the end, my solution was to use mutt, invoking it with the mailbox
file. I could then press captial D, and delete all messages matching
spam (from my filter), leaving a handful of real messages. So, it was
a workaround not a solution.

>
> If it was me, here, I'd send it through procmail, which is where fetchmail
> sends the mail after pulling it down from the server.
>
> (I'm assuming that /var/spool/..../myname is a single file in mbox format.)

Thanks for your reply.

>
>
> AC

Alan Connor

unread,
Feb 4, 2004, 2:32:48 PM2/4/04
to
On 4 Feb 2004 06:37:18 -0800, Jack Wasey <goo...@jackwasey.com> wrote:
>
>
>>
>> Where did you learn how to use Exim? I haven't been able to find a lot
>> of documentation for beginners...
>
> Not straightforward, but Debian sets you up well.
>
>> You can do cat /var/spool..../myname | formail -s | the input of your
>> mail system.
>
> formail is unknown to me and apparently unavailable on debian. There
> is a whole bunch of mail utilities. Exim itself accepts a mail file
> for input, but only processed the first message for me, not the rest.
> I haven't got the time to piss around writing a perl script to submit
> each message separately, especially as most of it is spam.
>

Formail is part of the procmail package.

(on Debian and usually, but a seperate utility too)


You can just use csplit to split the mbox into seperate files and a simple
for loop:

csplit -n 4 -z /var/spool..../myname '/^From /' {*}

for file in xx* ; do cat $file | exim

done

(Not sure about the exim part, but very close to the above will work. Best
to make a dir for this operation. You can change the xx prefix with -f ??)

> In the end, my solution was to use mutt, invoking it with the mailbox
> file. I could then press captial D, and delete all messages matching
> spam (from my filter), leaving a handful of real messages. So, it was
> a workaround not a solution.
>

It worked....


AC

Jack Wasey

unread,
Feb 17, 2004, 8:52:37 AM2/17/04
to
Alan, thanks again for your reply.

csplit new to me. Thanks.

one little problem remains: exim (exim4) (or sendmail, which I believe
is just an alias) doesn't accept the piped individual messages. I get
a reply saying that the command is meant for use internally, and not
supposed to be invoked from the command line. I tried with some flags,
but nothing seemed to work?

I'm using exim4 on debian. Any ideas?

Jack

0 new messages