Re: [exim] Pseudo mailing list

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Avleen Vig
Datum:  
To: Troy Settle
CC: exim-users
Betreff: Re: [exim] Pseudo mailing list
This is the 'groups' router used in vexim, maybe it's helpful to you.
I've tried in vain to find the person to give credit to here. I believe
it was Wash, or Andreas or Birzan.. If someone can claim credit for it,
please let me know so I can add it to the file!


# A group is a list of users
#
# if a group is flaged public
# then anyone on the internet can write to it
# else only members can write to it
# 
# If not public non member sender will receive a "550 Unknown user" message
virtual_dom_groups:
  driver = redirect
  allow_fail
  senders = ${if eq{Y}{${lookup mysql{select g.is_public \
                                      from groups g, domains d \
                                      where d.enabled = '1' and d.domain = '${quote_mysql:domain}' and \
                                            d.domain_id = g.domain_id and g.enabled = '1' and \
                                            g.name = '${quote_mysql:local_part}'}}} \
                 {$sender_address} \
                 {${lookup mysql{select u.username \
                                 from domains d, groups g, group_contents c, users u \
                                 where d.enabled = '1' and d.domain = '${quote_mysql:domain}' and \
                                       d.domain_id = g.domain_id and g.name = '${quote_mysql:local_part}' and \
                                       g.enabled = '1' and \
                                       g.is_public = 'N' and c.member_id = u.user_id and \
                                       d.domain_id = u.domain_id and u.enabled = '1' \
                       and u.username = '${sender_address}' }}}}
  data = ${lookup mysql{ \
            select u.username \
            from domains d, groups g, group_contents c, users u \
            where d.enabled     = '1'           and \
                  d.domain      = '${quote_mysql:domain}'   and \
                  d.domain_id   = g.domain_id   and \
                  g.enabled     = '1'           and \
                  g.id          = c.group_id    and \
                  c.member_id   = u.user_id     and \
                  d.domain_id   = u.domain_id   and \
                  u.enabled     = '1'           and \
                  g.name        = '${quote_mysql:local_part}'} }
  local_part_suffix = -*
  local_part_suffix_optional
  retry_use_local_part
  reply_transport = address_reply
  pipe_transport = address_pipe



On Fri, Feb 04, 2005 at 11:03:12PM -0500, Troy Settle wrote:
>
> All,
>
> I want to send a bulk mail to all my users. They're all in a mysql
> database, how would I create a router to send to everyone? Basically,
> something I can hard code temporarily to alias 'everyone' to ${lookup
> mysql{select email from users}}.
>
> I've tried doing this before by using a script that used sendmail to send a
> message to each of my users, but I killed my box doing that (too many mysql
> connections).
>
> Thanks,
>
> --
> Troy Settle
> Pulaski Networks
> 866.477.5638
> http://www.psknet.com
>
>
>
> --
> ## List details at http://www.exim.org/mailman/listinfo/exim-users Exim details at http://www.exim.org/ ##
>


-- 
Avleen Vig
Systems Administrator
Doing virtual domain hosting with Exim?
  Check out Virtual Exim: http://silverwraith.com/vexim
    (Click the banner, support development..)