in reply to Re: Re: Re: Re: Re: accessing mailbox files
in thread accessing mailbox files

Hey Cees, Excellent command. I ran the

cat msg | formail +1 -ds /usr/lib/sendmail  -oem <dest addy> and it works great when msg is one big mbox file with multiple messages inside. I was wondering can I run that command if msg contains just one email file? I want to do something like  cat msg | /usr/lib/sendmail -m <dest> in a loop for a directory of files, but that command doesnt work at all.

thanks

jc

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: Re: Re: accessing mailbox files
by cees (Curate) on Jul 30, 2003 at 20:49 UTC

    Well, since an mbox file could have just one message, I assume that it will work. Just remove the '+1' from the formail command, as that would just skip the only message in the file.

    cat singlemsg | formail -ds sendmail -oem <dest addy>

    I haven't tested that, but since I don't have a copy of one of your messages, it would do no good for me to test it anyway...

    Cheers,

    Cees