Alceu Rodrigues de Freitas Junior


spamcup - frontend program for SpamcupNG project


In your favorite shell:

    $ spamcup

That's it! See the configuration file details.

You can also provide all the parameters in the command line. Check the command line documentation:

Usage: spamcup [options] <Spamcop-Username>

   $ spamcup -h
   spamcup <options> <Spamcop-Username>

    -n Does nothing, just shows if you have unreported SPAM or not.
    -a Run in a loop untill all SPAM is reported.
    -s Stupid. Runs without asking confirmation. Use with care.
    -c Alternate method for signifying code. (Unpaid users WITHOUT username & password)
    -l Alternate method for providing username. (Paid & unpaid users with password)
    -p Method for providing password. (Required for users with password)
    -v Show version and quit.
    -V <LEVEL> Verbosity level of information during program execution. Or log level. Valid values are: DEBUG, INFO, WARN, ERROR, FATAL.
    -h You are reading it.


Spamcup NG is a Perl web crawler for finishing reports automatically.

It will use your account details to login into web page and finish reporting your SPAM. Spamcup NG tries to be as polite as possible, introducing forced delays to not overwhelm website. All reports are sent sequentially.

Spamcup NG is a fork from the original Spamcup project.

Spamcup is copyright (C) Toni Willberg <>


spamcupNG provides the following features:

  • Can use both command line parameters and/or a configuration file. The configuration file allows you to define and use multiple accounts of Spamcop (but you can't send reports from them in parallel and never will since we want to be as polite as possible with Spamcop website).

  • Advanced logging capabilities (provided by usage of Log::Log4perl): you can setup additional levels of information on screen or even have everything logged into a text file (if DEBUG is enabled). See SpamcupNG for details about that.

  • Compatibility with the original Spamcup project: you can reuse your configuration file and/or command line options with minor adjustments.


The motivations for this distribution where inquired at, and since I considered it a fair question, here are the motivations of using SpamcupNG instead of WWW::Mechanize::SpamCop.

Compatible with Spamcup

SpamcupNG is a directly replacement for Spamcup original project. I used myself Spamcup for years and never had an issue, since the webpage didn't change at all. The reasons for writing a replacement was to be able to use multiple accounts in the configuration file.

That said, you can use the same configuration file you have for Spamcup, with small changes.

SpamcupNG is ready for using

SpamcupNG is an application ready to use, while WWW::Mechanize::SpamCop is a Perl module. Of course, you probably can make the same command line program by using it, or even a GUI for it. Maybe in the future SpamcupNG uses WWW::Mechanize::SpamCop internally.

More features

Being a application, SpamcupNG has more features (see next section).

Uses modern Perl coding practices

SpamcupNG uses more modern practices for Perl development, which might (or not!) make it more robust. Also, this distribution is being activaly developed.

WWW::Mechanize is not required

WWW::Mechanize (the base of WWW::Mechanize::SpamCop) is pretty neaty, easier to use then LWP::UserAgent, but on the other hand has more dependencies and wouldn't add any value compared to the already in place webcrawler implementation. If the website changes, I might consider moving to it, but not before that.


Some important warnings before starting using it:

  • The script does NOT know where the SPAM report will be sent so IT'S YOUR RESPONSIBILITY!

  • If the script asks Spamcop to send reports to wrong places IT'S YOUR FAULT!

  • If the script has a bug that causes same report being sent thousand times IT'S YOUR MAIL ADDRESSES!



You can also provide a configuration file to avoid having to provide the same information every time you want to execute the program.

Another advantage of using the configuration file is that you can setup multiple in the same file and the spamcup program will loop over them and report the associated SPAM automatically.

The program will look for a configuration file named .spamcup.yml in the corresponding home directory of the user (that will dependend on the OS you're executing it).

The configuration file must be written as an YAML file, with the exact properties below:

    all: y
    stupid: y
    nothing: n
    alt_code: n
        verbosity: INFO
    alt_user: n
        password: FOOBAR
        password: FOOBAR

You can use any name instead of "Provider1" or "Provider2" as long as their are valid key names for YAML format.

All those options have their corresponding command line parameter. Be sure to take care of file permissions to avoid disclosure of your password!


spamcup uses Log::Log4perl, so you can use the default values for logging.

If you use INFO, only basic information is printed to STDOUT. This should be your default level.

If you define DEBUG, all messages (including HTML from website) will go to the spamcup.log file, located at your home directory. Nothing will be printed to STDOUT or STDERR.

All other levels will show more or less messages to STDOUT, depending on the severity of the messages.



Alceu Rodrigues de Freitas Junior, <>


This software is copyright (c) 2015 of Alceu Rodrigues de Freitas Junior, <>

This file is part of spamcupNG distribution.

spamcupNG is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

spamcupNG is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with spamcupNG. If not, see <>.