Header injection

It is often useful to store filter related information in the message header. Here are a few examples:

# Number of seconds message was tarpitted
eom  isset tarpit_delayed  change header "X-Tarpit" value "message tarpitted for " + tarpit_delayed + " seconds"

# Number of seconds message was greylisted
eom  isset greylist_delayed  change header "X-Greylist" value "message greylisted for " + greylist_delayed + " seconds"

# Values of the counter module (auto-whitelisting)
eom  counter_relay  change header "X-Counter-Relay" value counter_relay
eom  counter_penpal  change header "X-Counter-Penpal" value counter_penpal

# Spamassassin score and symbols
eom  spamd_score    change header "X-Spam-Score" value spamd_score
eom  spamd_symbols  change header "X-Spam-Symbols" value spamd_symbols
eom  spamd_spam     change header "X-Spam-Flag" value "YES"

# If you're forwarding mails to gmail you might want to add SPAM to the
# subject. See https://support.google.com/mail/answer/175365?hl=en
eom  spamd_spam  change header "Subject" value "SPAM: " + subject