Jumping on the wagon...

Some time ago - I tried to have Exim do (My)SQL updates. It would be
nice to have more generic access to Databases - etc..
rather than fudging it..

ie in "transports" - I have....

mysql_delivery:
  driver = appendfile
  directory = /var/spool/mail/$domain/$local_part/
  maildir_format = true
  directory_mode = 0755
  create_directory = true
  user = smmsp
  group = smmsp
  mode = 0660
 quota = ${lookup mysql {select mquota from admin \
    where user='[EMAIL PROTECTED]' and status>1}}M
 quota_is_inclusive=false

message_suffix = ${lookup mysql {insert into maillog set
mfrom='${quote_mysql:$sender_address}',\
    mto='${quote_mysql:[EMAIL PROTECTED]', domain='${domain}',
mvia='${quote_mysql:$sender_host_address}',\
    msize=${message_size}, mdelivered=current_timestamp,
mailid='$message_id', mspam='$spam_score_int',\
    mreturn='${quote_mysql:$return_path}' }{}{}}


The "Message suffix" is being used to do Accounting updates...
Ugly Hack.

Be nicer to have a dummy or generic label - even one that you could
maybe return a result to a variable?

set $acl_var2=${lookup mysql {select mquota from admin \

    where user='[EMAIL PROTECTED]' and status>1}}


Practical?

-- 
  .  .     ___. .__      Posix Systems - Sth Africa
 /| /|       / /__       [EMAIL PROTECTED]  -  Mark J Elkins, SCO ACE, Cisco 
CCIE
/ |/ |ARK \_/ /__ LKINS  Tel: +27 12 807 0590  Cell: +27 82 601 0496


-- 
## 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/

Reply via email to