Re: [exim] condition help

Pàgina inicial
Delete this message
Reply to this message
Autor: Peter Bowyer
Data:  
A: exim users
Assumpte: Re: [exim] condition help
Sorry to have to repeat my answer, but:

> You don't seem to have asked a question. You've given lots of detail,
> but what actually is the problem? If the router you quote is supposed
> to solve the issue you mention, what happens that isn't what you
> expected? What's the debug output look like when you try a delivery
> that you want to work, and one that you want to fail?


You need to do a little more work.

Peter

On 12/03/07, Alex <abusquets@???> wrote:
> My question, is how do a or condition, for the valid sender
>
> 2007/3/11, Peter Bowyer <peter@???>:
> > (top-posting because my response relates to the original as a whole)
> >
> > You don't seem to have asked a question. You've given lots of detail,
> > but what actually is the problem? If the router you quote is supposed
> > to solve the issue you mention, what happens that isn't what you
> > expected? What's the debug output look like when you try a delivery
> > that you want to work, and one that you want to fail?
> >
> > Peter
> >
> > On 10/03/07, Alex <abusquets@???> wrote:
> > > Hi, i have this two tables
> > >
> > > CREATE TABLE group_contents(
> > > group_id int(10) DEFAULT '0' NOT NULL,
> > > member varchar(255) DEFAULT '0' NOT NULL
> > > admin char(1) NOT NULL default 'Y',
> > > )
> > >
> > > CREATE TABLE groups(
> > > id INTEGER NOT NULL PRIMARY KEY,
> > > domain_id mediumint (8) NOT NULL default '0',
> > > name varchar(64) NOT NULL default '',
> > > is_public char(1) NOT NULL default 'Y',
> > > enabled tinyint(1) NOT NULL default '1'
> > > );
> > >
> > >
> > > groups.is_public allows Y,N,A
> > > Y -> public
> > > N -> not public
> > > A -> only senders admin can send
> > >
> > >
> > > I need add a rule for allow send emails to the group if sender is
> > > group_contents.admin is Y and the group groups.is_public value is A,
> > >
> > >
> > > Now I have this:
> > >
> > >
> > > virtual_dom_groups:
> > > driver = redirect
> > > allow_fail
> > > senders = ${if eq{Y}{${lookup sqlite{/etc/exim/exim.db select g.is_public \
> > >
> > >        from groups g, domains d \
> > >                                      where d.enabled = '1' and
> > > d.domain = '${domain}' and \
> > >                                            d.domain_id = g.domain_id
> > > and g.enabled = '1' and \
> > >                                            g.name = '${local_part}'}}} \
> > >                {$sender_address} \
> > >                {${lookup sqlite{/etc/exim/exim.db select c.member \
> > >        from group_contents c, groups g, domains d \
> > >        where g.enabled = '1' and g.id = c.group_id and g.is_public = 'N' \
> > >        and d.domain = '${domain}' \
> > >        and d.domain_id = g.domain_id and g.enabled = '1' \
> > >        and g.name = '${local_part}' \
> > >        and c.member LIKE '${sender_address}' limit 1}}}}

> > >
> > >  data = ${lookup sqlite{/etc/exim/exim.db  \
> > >            select c.member \
> > >            from group_contents c, groups g, domains d \
> > >            where d.enabled     = '1'           and \
> > >                  d.domain      = '${domain}'   and \
> > >                  d.domain_id   = g.domain_id   and \
> > >                  g.enabled     = '1'           and \
> > >                  g.id          = c.group_id    and \
> > >                  g.name        = '${local_part}'} }

> > >
> > >  headers_remove = subject
> > >  headers_add = Subject: [${lookup sqlite{/etc/exim/exim.db select g.name \
> > >                                      from groups g, domains d \
> > >                                      where d.enabled = '1' and
> > > d.domain = '${domain}' and \
> > >                                            d.domain_id = g.domain_id
> > > and g.enabled = '1' and \
> > >                                            g.name =
> > > '${local_part}'}}] $h_subject
> > >  local_part_suffix = -*
> > >  local_part_suffix_optional
> > >  retry_use_local_part
> > >  reply_transport = address_reply
> > >  pipe_transport = address_pipe

> > >
> > > --
> > > ## List details at http://www.exim.org/mailman/listinfo/exim-users
> > > ## Exim details at http://www.exim.org/
> > > ## Please use the Wiki with this list - http://www.exim.org/eximwiki/
> > >
> >
> >
> > --
> > Peter Bowyer
> > Email: peter@???
> >
> > --
> > ## List details at http://www.exim.org/mailman/listinfo/exim-users
> > ## Exim details at http://www.exim.org/
> > ## Please use the Wiki with this list - http://www.exim.org/eximwiki/
> >
>



--
Peter Bowyer
Email: peter@???