Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: exim: users

SQL select for $spam_score_int in acl_smtp_data for $domain

 

 

exim users RSS feed   Index | Next | Previous | View Threaded


james at digitalciti

Mar 5, 2010, 5:10 PM

Post #1 of 3 (421 views)
Permalink
SQL select for $spam_score_int in acl_smtp_data for $domain

This is hardly a problem, its just a wish more than anything. I'd like to add a spam_score_int field into my domains table that I can select against while running a spam ACL check during acl_smtp_data. I know $domain is not usable during acl_smtp_data. What I was thinking is that I could set a variable during acl_smtp_rcpt that would carry over to acl_smtp_data. So maybe something along the lines of this....

acl_smtp_rcpt:
set variable = (sql query here to get spam_score_int for $domain)

acl_smtp_data:

deny message = Rejected! This message exceeded our spam threshold
spam = nobody/defer_ok
condition = ${if <{$message_size}{100k}{true}{false}}
condition = ${if >={$spam_score_int}{$variable}{true}{false}}

I'd like to give my users the flexibility of setting their own threshold within reason.

I'm not quite sure if this is...
1. A good idea
2. Even possible

Thanks,
James
--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


jgh at wizmail

Mar 6, 2010, 1:38 AM

Post #2 of 3 (401 views)
Permalink
Re: SQL select for $spam_score_int in acl_smtp_data for $domain [In reply to]

On 03/06/2010 01:10 AM, James Price wrote:
> This is hardly a problem, its just a wish more than anything. I'd like to add a spam_score_int field into my domains table that I can select against while running a spam ACL check during acl_smtp_data. I know $domain is not usable during acl_smtp_data. What I was thinking is that I could set a variable during acl_smtp_rcpt that would carry over to acl_smtp_data. So maybe something along the lines of this....

Yes, but with some complexity. Use a $acl_m_<foobar> variable.
If it's undefined, as it will be for the first RCPT, fill in the ${lookup }
result. If set, and the value differs from the ${lookup } result,
temp-reject the RCPT. This accounts for the multi-rcpt mail case
to two different domains by making it the sender's responsibility to
retry. Note he may immediately try your backup MX; ensure the
same setup it running there.

Cheers,
Jeremy

--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


chibi at gol

Mar 7, 2010, 8:16 PM

Post #3 of 3 (385 views)
Permalink
Re: SQL select for $spam_score_int in acl_smtp_data for $domain [In reply to]

Hello,

On Sat, 06 Mar 2010 09:38:08 +0000 Jeremy Harris wrote:
>
> Yes, but with some complexity. Use a $acl_m_<foobar> variable.
> If it's undefined, as it will be for the first RCPT, fill in the
> ${lookup } result. If set, and the value differs from the ${lookup }
> result, temp-reject the RCPT. This accounts for the multi-rcpt mail
> case to two different domains by making it the sender's responsibility to
> retry. Note he may immediately try your backup MX; ensure the
> same setup it running there.
>
Or the sender might not retry for whatever time they have configured for
these things. Or this mail has a multitude of recipients (domains in your
case) and at each (retry) time only one of them gets delivered.
Resulting in very noticeable delivery delays which your customers and/or
the senders will likely complain about.
Until we get a RFC approved mechanism to reject mails on a per recipient
basis AFTER the SMTP DATA phase there are no really "good" solutions to
this problem unfortunately.

Technically perfectly fine and valid answer by Jeremy, it's just a pet
peeve of mine and thus me piping up. ^^

Dewa,

Chibi
--
Christian Balzer Network/Systems Engineer
chibi [at] gol Global OnLine Japan/Fusion Communications
http://www.gol.com/

--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

exim users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.