Hi Derek,
> ls -1 /path/to/spool | while read file; do > outfile_name = "${file}.out" > #You can use -e but you don't need it, no difference > sed -n '/^From: $EMAIL_ADDRESS/p ; /Subject: $SUBJECT/p' \ > "$file" > $outfile_name > done I can confirm that this script part works; before integrating it into the rest of my script I tested it separately. The only thing I had to change was to delete whitespaces before and after = in the variable assignment in the second line to get the variable assigned correctly. The first run of the script with /path/to/spool as path/to/INBOX did not work producing the output: ambiguous redirection I spoke of in a previous message, and placing the mostly blank output files into the $HOME folder. Putting it like so, /path/to/INBOX/cur/* did work so that those sed output files were then placed into this very directory. Fiddling with it a bit more, I did not pay attention, first cleaning up sed's output files (deliberately) and now all remaining original messages are still there but the index view (the usual one that appears after typing 'mutt' on the command line and presents all messages) now presents all messages with a default 01 January date, no FROM, no SUBJECT but retaining all flags previously set, with an [OK] flag added to the extreme right. So, I supposed, the format code syntax of the printf-like formatting sequences was corrupted and tried to restablish it by copying the default sequence taken out of the configuration variable reference of the mutt manual into muttrc, but it does not work. The problem seems to be that those messages are no longer represented correctly but still bear that information in the message files, so the function that makes the message data be represented in/by the index (technically, it may not be correct to put it like that, but that's what it appears to be) does not work properly. But resetting the index_format variable, as I said, did not bring the expected result. Well, finally, I had to reconstruct your message in order to reply to you maintaing the threading; I hope it works. Thanks felixs