Re: [exim] Optional whitelist

Top Pagina
Delete this message
Reply to this message
Auteur: Ted Cooper
Datum:  
Aan: exim-users
Onderwerp: Re: [exim] Optional whitelist
,,, wrote:
> Maybe I'm not searching for this correctly, but I'm not finding a way
> to optionally declare a whitelist on a per user basis...
>
> Something along the lines of...
>
>     deny message = not permitted to contact user
>      log_message = not on whitelist
>        condition = ${if exists{$home/.whitelist} {yes} {no}}
>  require senders = /home/$local_part/.whitelist

>
> ...which only works if it finds a whitelist. It would seem because
> I'm not telling it what to do if it cannot find a whitlist in the home
> directory, it is confused.
>
> The log says it failed to open the file, as there is no such file or directory.
> Which is expected. However, it doesn't move on beyond this point and deliver the mail.
> Which is what I was expecting.
>
> Any suggestions or recommendations on what I'm missing would be great.
>
> martin
>


The "require" action. It's in the same boat as deny, accept, defer in
that it is the start of an acl segment in itself. What you have above
are 2 separate acl blocks
# DENY BLOCK
deny message     = not permitted to contact user
     log_message = not on whitelist
     condition   = ${if exists{/home/$local_part/.whitelist}{yes}{no}}
# END OF DENY BLOCK


# START OF NEW REQUIRE BLOCK
require senders = /home/$local_part/.whitelist
# END REQUIRE BLOCK


Just cut out the require keyword and it .. might work :P This is the
general idea but I don't think it's quite right. It might not need the
lsearch in there .. or it might need a ${lookup}

deny message     = not permitted
     log_message = no in whilelist
     condition   = ${if exists{$home/.whitelist}{yes}{no}}
     ! senders     = lsearch;/home/$local_part/.whitelist



--
The Exim Manual
http://www.exim.org/docs.html
http://www.exim.org/exim-html-current/doc/html/spec_html/index.html