<%@page import="java.io.*"%> <% String email = request.getParameter("email"); String domain = "@greatcactus.org"; String full = email+domain; %> <% if (email!=null && email.length()>0) { %> <% File f = new File("/etc/mail/SpammerList"); PrintWriter w = new PrintWriter(new FileWriter(f,true)); w.println(full); w.close(); %>

The email address <%=full%> has been blocked.

A full list of the blocked addresses is:
<% BufferedReader r = new BufferedReader(new FileReader(f)); String s; while ((s=r.readLine())!=null) { %> <%=s%>
<% } r.close(); %>

<% } else { %>

This page will let you enter a new email address to block. You should enter the email address without @greatcactus.org; this will be added automatically.

@greatcactus.org

<% } %>