[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sendmail
Subject:    Dynamically generated reject message
From:       Gunnar Hjalmarsson <noreply () gunnar ! cc>
Date:       2004-10-28 1:17:01
Message-ID: 104102804635.~INN-YPBa00150.comp-news () dl ! ac ! uk
[Download RAW message or body]

My access database rejects on both domains and IP addresses. I would 
like to customize the message generated by sendmail to something like:

     Access denied -- see http://gunnar.cc/bounce/?10.10.10.10

where the querystring is either an IP address or a domain/host name, 
depending on what it was that caused the rejection. The thought is that 
the URL will go to a script whose output varies based on the querystring.

I have played directly with sendmail.cf, and this results in the IP 
address being appended as the querystring:

R<REJECT> $*	$#error $@ 5.7.1 $: "550 Access denied -- see 
http://gunnar.cc/bounce/?"$1

I was not able, though, to create that line by defining the 
confREJECT_MSG variable in sendmail.mc. When including $1 there, it was 
expanded to nothing when updating sendmail.cf.

I'd appreciate some hints on

1) how to grab the actual IP address/domain/host that triggered the 
rejection, and

2) how to do it the 'right' way.

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic