How to Forward Spam Sent to Spamtraps to SpamCop using qmail

I have a number of email addresses that get nothing but spam, and I like to feed these to SpamCop's quick reporting service. This is easy to do with qmail, if you know how and if you have a paid SpamCop account.

  1. Create a spamtrap account and add all spam addresses as aliases (I do this with Plesk).
  2. Create /var/qmail/mailnames/
    From: <>
    To: "SpamCop QuickReporting" <>
    Subject: Forwarded Spam
    MIME-Version: 1.0
    Content-Type: multipart/digest; boundary="======DeathToSpam======"
  3. Create /var/qmail/mailnames/
  4. Change /var/qmail/mailnames/ to look like this:
    | true
    | cat spamcop-digest-header - spamcop-digest-footer | sendmail -t

That's all there is to it — of course you must be sure that you really don't get anything but spam at the addresses that you treat this way! SpamCop will send you the results of your reporting.