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.
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
That second "|" after formail -s isn't necessary
(oops)
AC
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
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
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