recipient_bcc_maps: BCC for entire domain except one address

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

recipient_bcc_maps: BCC for entire domain except one address

Markus Schönhaber-16
Hi,

having recipient_bcc_maps set to a map containing

@example.com [hidden email]

should create a BCC for every mail sent to example.com regardless of the
local part.
Is there an easy way to define an exception, i. e. BCCs should be
created for every mail sent to @example.com except for [hidden email]?

After adding

[hidden email] [hidden email]

to the map, the BCC to bcc@ isn't created but mail is sent to notforme@
twice. I'd like to avoid the latter.

--
Regards
  mks
Reply | Threaded
Open this post in threaded view
|

Re: recipient_bcc_maps: BCC for entire domain except one address

Jaroslaw Rafa
Dnia  2.12.2019 o godz. 18:11:27 Markus Schönhaber pisze:

>
> having recipient_bcc_maps set to a map containing
>
> @example.com [hidden email]
>
> should create a BCC for every mail sent to example.com regardless of the
> local part.
> Is there an easy way to define an exception, i. e. BCCs should be
> created for every mail sent to @example.com except for [hidden email]?
>
> After adding
>
> [hidden email] [hidden email]
>
> to the map, the BCC to bcc@ isn't created but mail is sent to notforme@
> twice. I'd like to avoid the latter.

Maybe add to recipient_bcc_maps something like

[hidden email] [hidden email]

and then alias "throwaway" in your "aliases" file to /dev/null ?
--
Regards,
   Jaroslaw Rafa
   [hidden email]
--
"In a million years, when kids go to school, they're gonna know: once there
was a Hushpuppy, and she lived with her daddy in the Bathtub."
Reply | Threaded
Open this post in threaded view
|

Re: recipient_bcc_maps: BCC for entire domain except one address

Markus Schönhaber-16
Hi Jaroslaw!

Jaroslaw Rafa, 02.12.19, 18:42 CET:

> Dnia  2.12.2019 o godz. 18:11:27 Markus Schönhaber pisze:
>>
>> having recipient_bcc_maps set to a map containing
>>
>> @example.com [hidden email]
>>
>> should create a BCC for every mail sent to example.com regardless of the
>> local part.
>> Is there an easy way to define an exception, i. e. BCCs should be
>> created for every mail sent to @example.com except for [hidden email]?
>>
>> After adding
>>
>> [hidden email] [hidden email]
>>
>> to the map, the BCC to bcc@ isn't created but mail is sent to notforme@
>> twice. I'd like to avoid the latter.
>
> Maybe add to recipient_bcc_maps something like
>
> [hidden email] [hidden email]
>
> and then alias "throwaway" in your "aliases" file to /dev/null ?

thanks for the tip!
A minor nuisance with this is that the "delivery" to /dev/null is still
logged. But unless someone comes up with a way to avoid an additional
delivery attempt altogether, I guess I'll stick with your solution.

--
Regards
  mks
Reply | Threaded
Open this post in threaded view
|

Re: recipient_bcc_maps: BCC for entire domain except one address

Wietse Venema
In reply to this post by Markus Schönhaber-16
Markus Sch?nhaber:
> Hi,
>
> having recipient_bcc_maps set to a map containing
>
> @example.com [hidden email]

Make it a PCRE map.

# DO NOT INDENT THE TEXT BETWEEN IF AND ENDIF
if !/^foo([-+]\S+)?@example\.com$/
/@example\.com$/ [hidden email]
endif

See 'man pcre_table' for details.

        Wietse
Reply | Threaded
Open this post in threaded view
|

Re: recipient_bcc_maps: BCC for entire domain except one address

Markus Schönhaber-16
Wietse Venema, 02.12.19, 19:28 CET:

> Make it a PCRE map.
>
> # DO NOT INDENT THE TEXT BETWEEN IF AND ENDIF
> if !/^foo([-+]\S+)?@example\.com$/
> /@example\.com$/ [hidden email]
> endif
>
> See 'man pcre_table' for details.

Thanks Wietse!
I'll do it that way.

--
Regards
  mks