[exim] Reject Straight After Data Command

Top Page
Delete this message
Reply to this message
Author: Craig Whitmore
Date:  
To: exim-users
Subject: [exim] Reject Straight After Data Command
Hi there.

I am waiting to reject If the Data Command is said under a conditional. At
the moment I have
to wait until the \n.\n is said, but rejecting on the act DATA command would
be great.
I am playing with BATV and I would like to reject on <> ONLY if the data is
sent as well
(so callbacks and BATV work together). The below rules stop alot of bounces
(from people
sending out from your domain), but still allows callbacks to work.

MAIL FROM: <>
RCPT TO: user@???
QUIT
callback works (as its a call back and it had no data)

and

MAIL FROM: <>
RCPT TO: user@???
DATA
.
(give reject as the rcpt is from <> AND its sent directly to a username AND
there is data). I want to reject if the data line it said, not after the .


I have at the moment below which works.. but I have to wait for the entire
message before I reject the message
(waste of resources).

Thanks
Craig

PRVKEY = "XXXXX"

acl_check_rcpt:

warn set acl_m6 = +localdomains
#
# Reject on Invalid BATV signed messages
#

deny message = Invalid Signed BATV Message
     log_message = Invalid Signed BATV Message of $local_part@$domain
     senders = :
     condition = ${prvscheck {$local_part@$domain}{PRVKEY}{1}}
     !condition = $prvscheck_result


acl_check_data:

#
# Reject Messages which are not BATV signed
#

deny message = Invalid Bounce. This message did not come from here
     log_message = Invalid Bounce
     senders = :
      condition   = ${if eq {$acl_m6}{}{false}{true}}