[exim] Simple mailing list from mysql backend

Top Page
Delete this message
Reply to this message
Author: Mark Elkins
Date:  
To: Exim-users
Subject: [exim] Simple mailing list from mysql backend
I'm looking at adding a simple mailing list facility. I'm using
Exim-4.71. This is a (small) ISP system - all users are in a MySQL
Database under multiple domains. I currently have a simple 'forwarding'
mechanism which can forward to a small number of comma separated
addresses - great for expanding a 'role' email account.

Routers:
virtual_forward:
# The returned 'email' value can be multiple comma seperated addresses
driver = redirect
data = ${lookup mysql{select email from admin where
user="${quote_mysql:$local_part@$domain}" and status>2}}
user = smmsp
file_transport = address_file
pipe_transport = address_pipe

mysql_user:
  driver = accept
  condition = \
   ${if eq {} \
   {${lookup mysql {select user from admin \
    where user='${quote_mysql:$local_part@$domain}' and status>2}}} \
   {no}{yes}}
  retry_use_local_part
  transport = mysql_delivery


Transports:
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
 message_size_limit = ${lookup mysql {select imsize from admin \
    where user='${local_part}@${domain}'}}M
 quota = ${lookup mysql {select mquota from admin \
    where user='${local_part}@${domain}'}}M
 quota_is_inclusive=false


message_suffix = ${lookup mysql {insert into maillog set
mfrom='${quote_mysql:$sender_address}',\
    mto='${quote_mysql:$local_part}@${domain}', 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}' }{}{}}


(I use the 'message_suffix' to Update my logging database!)
---------------------------------------------------------------------


I'd like to add a simple mailing list system. I'd like multiple lists
stored in the database... (Almost everything to do with exim is in a DB
- including Grey Listing)

list1:user1
list1:user2
...
list2:user1
...

etc.

Subscription control would be directly with the owner of the list and
not automated.

Only members of a list should be able to post to the list. (I'm a bit
stuck here).

People who receive mail from the list should see the list name and not
all the members of the list in their mail headers. I'd like to add
additional headers - name of mailing list, etc - which would ideally
come from a DB table that describes the mailing list, along with some
text to add to the end of each outbound e-mail...

list1:List1_owner:list1_ID_header:list1_subscribe_header:list1_unsubscribe_header:list1_message_footer

Anyone done something similar - and are they willing to share please?
or ideas about how to do this?


-- 
  .  .     ___. .__      Posix Systems - Sth Africa.  e.164 VOIP ready
 /| /|       / /__       mje@???  -  Mark J Elkins, Cisco CCIE
/ |/ |ARK \_/ /__ LKINS  Tel: +27 12 807 0590  Cell: +27 82 601 0496