Forum Moderators: bakedjake
This sort of thing would work in procmail:
:0
*!^To:.*(goodaddress1@yourdomain.com¦goodaddress2@yourdomain.com¦goodaddress3@yourdomain.com)
*!^FROM_DAEMON
*!^X-Loop:spam@yourdomain.com
{
:0 h c
¦ (formail -t -r -A"X-Loop: spam@yourdomain.com " ; \
cat /home/yourdomain/junkresponse.txt ) ¦ $SENDMAIL -t
LOG='INVALID ADDRESS: '
:0
/dev/null
}
The X-Loop:spam@yourdomain.com bit gets added as an extra header in the bounce message, and is checked for on all incoming mail to avoid a never-ending closed loop.
Hope this might start you down the road.
I really just want to base this on a list of 6-7 email addresses to which the spammers keep on sending me emails, not base it on the good email addresses.