fullquottel
|
fullquottel is a program that helps to distinguish whether an email has the "tofu" style (tofu ... german "Text oben, Fullquote unten" for "text above, fullquote below"; cf. "top posting", "jeopardy style", ...) or not. It takes the (already decoded) email body as input (standard input) and returns one of the words: 'Goodquottel' or 'Fullquottel' on stdout.
The program performs several tests to decide whether the mail is a tofu mail or not. Each test produces a score. The final sum of the individual test scores is compared to a threshold. If it is above it, the mail is classified as tofu mail ('Fullquottel' is returned). Further more, the score itself is returned as number and as as row of where each score point produces one *.
Each test can be customized:
This test searches for the own email signature (default in file: ~/.signature), no matter if it is quoted or not. If the own signature is included in a reply, this is a strong sign for a tofu mail.
People using MS Outlook (Express) often have the original mail at the bottom of their reply below a line like "----- Original Message -----". This test searches for this kind of lines. It is possible to compare the line number where it was found to a certain threshold. If the line number is equal to or higher than this threshold, the test is positive and the specified score is added.
Why the line number? It is possible that a user replies in a non-tofu way but has this "original message" line at the very beginning of his reply.
This test calculates the ratio between the number of quoted lines and the number of all lines. The ratio has a value between 0 and 1. It is compared to a threshold (default: 0.5) and in case the ratio is higher than the threshold the score is added to the final score. Additionally a factor can be specified that adds an additional weighted score:
score(quotedToAllTest) = ratio > threshold ? score + ratio * factor : 0
This test calculates the ratio between the number of quoted lines at the bottom of the mail and the number of all lines. The ratio has a value between 0 and 1. It is compared to a threshold (default: 0.5) and in case the ratio is higher than the threshold the score is added to the final score. Additionally a factor can be specified that adds an additional weighted score:
score(bottomQuotedToAllTest) = ratio > threshold ? score + ratio * factor : 0
This test calculates the ratio between the number of quoted lines at the bottom of the mail and the number of all quoted lines. The ratio has a value between 0 and 1. It is compared to a threshold (default: 0.5) and in case the ratio is higher than the threshold the score is added to the final score. Additionally a factor can be specified that adds an additional weighted score:
score(bottomQuotedToQuotedTest) = ratio > threshold ? score + ratio * factor : 0
This tests checks if the mail has only one quote block and if this quote block is at the bottom of the mail - the classical tofu style.