[Exim] help with complicated condition (exim 3.22)

Top Pagina
Delete this message
Reply to this message
Auteur: Chad Leigh -- Shire Net LLC
Datum:  
Aan: exim-users
CC: chad
Onderwerp: [Exim] help with complicated condition (exim 3.22)
Hi

Using exim 3.22 (soon to be 3.35)

I am trying to set up a vacation type functionality that is totally
driven from my LDAP database. All mailboxes in the system are virtual
and driven from the LDAP database. (Eventually I will have a UI for the
end user or a given email domain admin to be able to set these values,
now I do it by hand).

I have a field "vacation" as part of a user record. If it exists and is
Y then I want it to do a vacation message using fields "vacationsubject"
and "vacationtext" as the data for the vacation message sent. I have it
basically working. However, I am trying to get it to not send any
vacation message to "bulk" precedence messages that come in. My
condition does not seem to pick that up like I thought it would.

Here is the director:

vacation_msg:
driver=smartuser
transport=vacation_autoreply
user = exim
group = daemon
condition = <<< SEE BELOW >>>
unseen


Here is the condition. In the file it is all one line, but I have added
carriage returns to make it more readable.  (This supports virtual
domains if you are wondering about the lookup) .    Also, I have
replaced the LDAP lookup info with generic stuff for server and password
of course


${if and
{
{eq
    {${lookup ldap {user="cn=Manager,dc=blah,dc=tld" pass=somepassword
    ldap://ldap.blah.tld:389/accountname=${local_part},domain=${domain},dc=blah,
dc=tld?vacation?base?}{$value}fail}}
    {Y}
    }
{ ! eq {$message_precedence} {bulk}
    }
}
{yes}{no}
}



From reading Philips great book, it appears that my "and" condition
should work. What actually happens is that if the LDAP lookup succeeds
with vacation field that exists and is Y, this condition is true,
regardless if the "Precedence:" header is "bulk" or not.

Any help in understanding this is appreciated.

Thanks
Chad