Hey I got exactly what you are looking for, its pretty easy. You need relaydb and procmail.
Setup a user called 'spam' then in /home/spam/ ...

# cat .forward
|/home/spam/procspam.sh

# cat .procmailrc
# .procmailrc
ORGMAIL=/var/mail/$LOGNAME
PATH=/usr/bin:/usr/local/bin
MAILDIR=$HOME/.mailspool   # all mailboxes are in .mailspool/
#DEFAULT=$HOME/.mailspool/spam
LOGFILE=/dev/null
SHELL=/bin/sh
:0b:
spam

# cat procspam.sh
#!/bin/sh
HOME=/home/spam
PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/sbin:/usr/local/bin
/usr/local/bin/procmail
relaydb -f /var/spamd/.relaydb -i /var/spamd/whitelist.relaydb | cat spam | grep -A 1000 Received: | relaydb -bf /var/spamd/.relaydb
rm $HOME/spam


and then of course spamd.conf ..
relaydb-black:\
       :black:\
       :msg="SPAM. Your address %A is in my relaydb list.":\
       :method=exec:\
       :file=/usr/local/bin/relaydb -4lb -f /var/spamd/.relaydb:



Craig Hammond wrote:
Hi all,
I'm using spamd and it does a great job.

What I'm trying to figure out is how to easily add the IP's of the
sending mail server for the few
spam that still get through.

By easy, I mean for clients of mine who use Exchange/Outlook, where I
put a obsd box running spamd
in front of Exchange.

I am trying to find a way where I could tell my clients that when some
spam does get through, just forward
that spam to a particular email address. Some process will extract the
IP of the MTA that sent the spam
and blacklist it.

I installed and played around with relaydb from ports, but that doesn't
work with emails that have been forwarded.

Any ideas??????

Reply via email to