Re: [exim] filters: delivering to multiple recipients define…

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Jon Gerdes
日付:  
To: exim-users@exim.org
題目: Re: [exim] filters: delivering to multiple recipients defined in a single string
On Mon, 2015-12-21 at 18:59 +0000, Nick Stokoe wrote:
> Hi
>
> Further to my earlier emails disposable mail aliases, I found I have
> bug in my
> filter script when there are two recipients of an alias.
>
> An incoming email's address may be mapped into several recipients.
> Currently
> these are concatenated into a comma-delimited list, for example:
>
> "recipient1,recipient2"
>


8<

> So when there are two records for a given alias stem:
>
>    'alias1', 'recipient1'
>    'alias1', 'recipient2'
>
> The result for an email to the 'alias1' stem is delivery to
> 'recipient1,recipient2'.
>
> Thanks
>
> Nick
>


Nick

You could use a traditional aliases file for this

Put this in routers before your usual internal router

aliases_file:
  driver         = redirect
  allow_fail
  allow_defer
  data           = ${lookup{$local_part}lsearch{/etc/aliases}}
  domains        = +internal_domains
  file_transport = file_tran

Then populate /etc/aliases:

gocompare: gerdesj, gerdesr, me@???

Nice and simple and scraped straight from the docs (I think - I set
this up many years ago) Ah here we go: http://www.exim.org/exim-html-cu
rrent/doc/html/spec_html/ch-the_redirect_router.html  Entries without a
@domain get your internal default and as you can
see, you can also mix and match with external.  I think comments work
too.

I've re-read your post and can't see if I am missing something in your
requirements.

Cheers
Jon


Blueloop Ltd
01460 271055
https://www.blueloop.net
Blueloop House, Ilchester Road, YEOVIL, BA21 3AA Registered England & Wales - 3981322