Re: [exim] exim filters to/from/cc address

2019-07-24 Thread Jasen Betts via Exim-users
On 2019-07-23, Gary Stainburn via Exim-users  wrote:
> In my user filter I have a number of entries similar to
>
> if ($h_from: matches "user@domain") or
>   ($h_to: matches "user@domain") or
>   ($h_cc: matches "user@domain")   then
>   deliver mobileph...@mydomain.com
>   seen
>   finish
> endif
>
> which is used to forward important emails to my phone.
>
> Is there an wasier way to do this, e.g. a variable containing all recipients, 
> or all addresses?

There's probably a better way.  why does that work?

-- 
  When I tried casting out nines I made a hash of it.

-- 
## List details at https://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/


Re: [exim] exim filters to/from/cc address

2019-07-23 Thread Andrew C Aitchison via Exim-users



On Tue, 23 Jul 2019, George L. Yermulnik via Exim-users wrote:


Hello!

On Tue, 23 Jul 2019 at 12:10:22 (+0100), Gary Stainburn via Exim-users wrote:


In my user filter I have a number of entries similar to



if ($h_from: matches "user@domain") or
  ($h_to: matches "user@domain") or
  ($h_cc: matches "user@domain")   then
  deliver mobileph...@mydomain.com
  seen
  finish
endif



which is used to forward important emails to my phone.



Is there an wasier way to do this, e.g. a variable containing all recipients, 
or all addresses?


Seem like you're looking for this?
if foranyaddress $recipients ( $thisaddress is "user@domain" ) then


I'd be surprised if "$recipients" includes "$h_from:"

I use

if $sender_address:,$h_from:,$h_to:,$h_cc:,$h_received: contains "user@domain"
then
deliver mobileph...@mydomain.com
seen
finish
endif

--
Andrew C. Aitchison Kendal, UK
and...@aitchison.me.uk

--
## List details at https://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/


Re: [exim] exim filters to/from/cc address

2019-07-23 Thread George L. Yermulnik via Exim-users
Hello!

On Tue, 23 Jul 2019 at 12:10:22 (+0100), Gary Stainburn via Exim-users wrote:

> In my user filter I have a number of entries similar to

> if ($h_from: matches "user@domain") or
>   ($h_to: matches "user@domain") or
>   ($h_cc: matches "user@domain")   then
>   deliver mobileph...@mydomain.com
>   seen
>   finish
> endif

> which is used to forward important emails to my phone.

> Is there an wasier way to do this, e.g. a variable containing all recipients, 
> or all addresses?

Seem like you're looking for this?
if foranyaddress $recipients ( $thisaddress is "user@domain" ) then

-- 
George L. Yermulnik
[YZ-RIPE]

-- 
## List details at https://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/


[exim] exim filters to/from/cc address

2019-07-23 Thread Gary Stainburn via Exim-users
In my user filter I have a number of entries similar to

if ($h_from: matches "user@domain") or
  ($h_to: matches "user@domain") or
  ($h_cc: matches "user@domain")   then
  deliver mobileph...@mydomain.com
  seen
  finish
endif

which is used to forward important emails to my phone.

Is there an wasier way to do this, e.g. a variable containing all recipients, 
or all addresses?

-- 
## List details at https://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/