Hello again,

sorry for writing that often. :)

> Perhaps you - or someone else - could help me with this:
> formail reads from stdin. Okay, so I want to extract a header with -X.
> But spamc also reads from stdin and stdin is empty after formail has read
> the mail. So, how do I get a program to "write to stdin". Hmm, understand
> what I mean?

I'll pipe it into a new file and work with grep from this point on.
Works nice :)

cat > "${tmpfile}orig"
grep -q "^X-Spam-Checker-Version: SpamAssassin [^o]* on 
name.myserver.org$" "${tmpfile}orig"
if ! [ $? = 0 ] ; then
        "$SPAMC" -s "$MAX_SIZE" -u "$MAILNAME" -U "$SOCKETPATH" -E  
< "${tmpfile}orig" > "$tmpfile"
        check=$?
else
        grep -q "X-Spam-Flag: YES" "${tmpfile}orig"
        if [ $? = 0 ] ; then
                check=1
        else
                check=0
        fi
fi

Thank you!

-- 
Regards, Manu

Reply via email to