Re: Trouble with ACL and Postgre/local_part domain
"Peter Bowyer" <[email protected]>
| Newsgroups | gmane.mail.exim.exiscan.user |
|---|---|
| Message-ID | <08f201c44717$21329700$0a46a8c0@pbdesktop> |
Gabriel Ambuehl <[email protected]> wrote: > Hi, > can I use Postgre Lookups in ACL conditions? I can't seem to able to > get the following to ever deny any viruses: > > #The following conditions don't work for aliasdomains (as the user > isn't found!) # Reject virus infested messages if user has > virus=reject deny message = This message contains malware > ($malware_name). If you feel this isn't the case, please > visit http://mail.$domain/malware malware = * condition = > ${if eq{reject} {${lookup pgsql{SELECT virus FROM emailaccount WHERE > emailaddress='${quote_pgsql:$local_part}@${quote_pgsql:$domain}'}}} > {1} {0}} > > > But a simple > #The following conditions don't work for aliasdomains (as the user > isn't found!) # Reject virus infested messages if user has > virus=reject deny message = This message contains malware > ($malware_name). If you feel this isn't the case, please > visit http://mail.$domain/malware malware = * condition = > ${if eq{reject} {reject} {1} {0}} > > filters out my test virus (Gibe) without any trouble. So is it > possible that I can't access Postgre in this condition? Or are > local_part and domain not set at this stage? If this is a data acl, then $local_part and $domain are undefined, because this acl is run once only per message, and the message may have multiple recipients. > If so, is there even any > possibility to have different possibilities and still be able to drop > viruses before they hit the queue (well, obviously this means that > only one RCPT would be allowed at the time but in my tests I've used > one but admittedly not configured Exim to enforce this)? This is a VFAQ - see http://duncanthrax.net/exiscan-acl/exiscan-acl-examples.txt section 6 for a way round it (which effecitively does what you're suggesting with a a slight improvement) Peter -- Peter Bowyer - Freelance Technical Architect and Writer peter <at> bowyer.org Spamblog: http://spamblog.bowyer.org