#!/bin/bash

# This is the configuration file for filter-mail

# ERROR_EMAIL is the address to send notifications to if something goes wrong.
# This should probably be the same as SECRETARY_ADDRESS below.
ERROR_EMAIL=your.address@somewhere.net

# SECRETARY_NAME is the sender name you want to appear on automated replies.
# This should probably be your name, or something indicating an automated reply
# from your mailbox.
SECRETARY_NAME="Your Name"

# SECRETARY_ADDRESS is the email address that will appear on automated replies.
# It is also used for filtering purposes, so it should be the address of the
# mailbox that filter-mail is filtering (see MAGIC_SUBJECT below).
SECRETARY_ADDRESS=your.address@somewhere.net

# MAGIC_SUBJECT is the subject line that allows you to send mail to yourself.
# Some spam uses the same From: address as it sends to. We drop these messages
# unless they have this subject line (which is presumably your secret), because
# generating responses to them will only clutter your mailbox.
MAGIC_SUBJECT="To Myself"

# SAFETY_BOX is the mail file you want all messages delivered to, spam or not.
# If it is not defined, rejected messages will be lost forever. This was a
# debugging feature initially, but is probably safe to leave undefined now.
SAFETY_BOX=~/SafeBox

# LOG_FILE is the file to write diagnostic logs to. This file will contain a few
# lines for each of the messages you receive, indicating what information was
# extracted from the message and what action was taken. If it is undefined, no
# log file will be written.
#LOG_FILE=~/FilterLog

# Generate the automatic response message
echo_response() {
# Put your automated response after the line below and before the "EOF" line.
# The code is placed on a line by itself after your message. You can customize
# this behavior by changing this function, if you know bash shell scripting.
	cat << "EOF"
Hello,

You have sent me an e-mail, but you are not on my approved senders list.

To be automatically added to the list, please send another message with the code below as the entire subject line. For your convenience, a copy of your original message can be found at the bottom of this e-mail.

If you send a message with the code as the subject line within one week of receiving this e-mail, you will be added to my list of approved senders. If you do not respond within one week, you can send me another message for another code.

When you have been successfully added to the list, you should receive a confirmation e-mail indicating this event.

Sorry for the minor inconvenience. Have a nice day.

EOF
	echo "Code: ${1:-'SCRIPT ERROR'}"
	echo
	echo "This message was generated by filter-mail $VERSION."
	echo "Get it at http://squeak.crystalorb.net/filter-mail"
}
