Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#161266 - 13/05/2003 15:04 Linux/Sendmail question
andy
carpal tunnel

Registered: 10/06/1999
Posts: 5914
Loc: Wivenhoe, Essex, UK
I screwed up my procmailrc file earlier today, resulting in all my mail for the last 11 hours ending up bypassing all my normal filters and being dumped in a single mail file. I don't really want to wade through 170 messages putting them in the right place.

I'm quite sure there is a way that I can take the 170 messages in the mail file and reinject them into sendmail/procmail and have the mail system pretend that they have just arrived normally over SMTP.

The question is, how? I have no idea how to actually do it, though I suspect it might involve using formail.

Anyone know how to do it ?
_________________________
Remind me to change my signature to something more interesting someday

Top
#161267 - 13/05/2003 15:27 Re: Linux/Sendmail question [Re: andy]
ricin
veteran

Registered: 19/06/2000
Posts: 1495
Loc: US: CA
That would be, I believe, something like this:


formail -es procmail < mailfile


Of course, you might need some other switches in there.

...I think...
_________________________
Donato
MkII/080000565
MkIIa/010101253
ricin.us

Top
#161268 - 13/05/2003 15:37 Re: Linux/Sendmail question [Re: ricin]
andy
carpal tunnel

Registered: 10/06/1999
Posts: 5914
Loc: Wivenhoe, Essex, UK
What an earth would I do without this BBS ?

That worked perfectly, thanks. You need to work on your response time though, my question went unanswered for nearly half an hour...

Come on people, you know we can do better
_________________________
Remind me to change my signature to something more interesting someday

Top
#161269 - 13/05/2003 15:40 Re: Linux/Sendmail question [Re: andy]
ricin
veteran

Registered: 19/06/2000
Posts: 1495
Loc: US: CA
No problem. Actually, I read it just after you posted it, then continued reading other posts, and eventually came back to answer. I figured someone else would have answered it by the time I got back around; guess not.
_________________________
Donato
MkII/080000565
MkIIa/010101253
ricin.us

Top
#161270 - 13/05/2003 15:54 Re: Linux/Sendmail question [Re: ricin]
andy
carpal tunnel

Registered: 10/06/1999
Posts: 5914
Loc: Wivenhoe, Essex, UK
I think it's about time we clubbed together and bought Tony some Linux books, that would improve the repsonse times for questions like this...

_________________________
Remind me to change my signature to something more interesting someday

Top
#161271 - 14/05/2003 02:17 Re: Linux/Sendmail question [Re: andy]
muzza
Pooh-Bah

Registered: 21/07/1999
Posts: 1765
Loc: Brisbane, Queensland, Australi...
Yeah, Then he'd be telling us how to do everything!
_________________________
-- Murray I What part of 'no' don't you understand? Is it the 'N', or the 'Zero'?

Top
#161272 - 21/05/2003 15:56 Re: Linux/Sendmail question [Re: ricin]
drakino
carpal tunnel

Registered: 08/06/1999
Posts: 7868
Any easy way to feed maildir messages back through procmail?

Top
#161273 - 21/05/2003 16:59 Re: Linux/Sendmail question [Re: drakino]
djc
enthusiast

Registered: 08/08/2000
Posts: 351
Loc: chicago
the maildir format simply stores one message, including the header, per file. assuming the files still have all of the appropriate headers (like "From " (no colon), Return-Path:, and Delivered-To:) you should be able to pipe them right through procmail:

cd Maildir/cur ; ls * | xargs -n 1 procmail /path/to/procfile

--dan.

Top
#161274 - 21/05/2003 17:19 Re: Linux/Sendmail question [Re: djc]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
Or, if they really are formatted that way, and the aforementioned ``formail'' command worked:
cd Maildir/cur

cat * | formail -es procmail
Edit: Oh. Nevermind. I now see that that does pretty much exactly the same thing you said but with more potentiality for error. I should see what these commands do before I start telling people how to use them.


Edited by wfaulk (21/05/2003 17:22)
_________________________
Bitt Faulk

Top