[Exim] Help checking domain name in mysql

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: The Jelly Bean Junky
Ημερομηνία:  
Προς: exim-users
Αντικείμενο: [Exim] Help checking domain name in mysql
This is a multi-part message in MIME format.
--
[ Picked text/plain from multipart/alternative ]
Okay I have got exim compiled and running nicely. I have got mysql
support enabled and I'm running multihosting sites and hopefully emails
with auth on it.
I have managed to get auth to work to an extent using this auth block:


# outlook ms/ex
fixed_login:
driver = plaintext
public_name = LOGIN
server_prompts = "Username:: : Password::"
server_condition = \
"${if eq{$2} {${lookup mysql{SELECT password FROM smtpusers WHERE
username = '$1' AND domain =
'${lc:$sender_address_domain}'}}}{yes}{no}}"
server_set_id = $1

This does not seem to work. I want to check their domain name in the
"mail from: user@???" against a record in the mysql data base
but '${lc:$sender_address_domain}' always seems to return a null value
[blank]. Example, user is user@??? I want to check example.com
in the database. I'm planning to use this to stop an auth'ed user
sending an email effectively as a spam under any other domain names. It
just makes sure they stick with the domain name assigned to them in the
database.
I'm stuck and I have no idea wot to do. I have tried many different ways
and I want to avoid using perl or any other external binaries. Also if I
have missed any details you need to know please email me back and I'll
post any details you need.

Thank you in advance
kibble
--