That's a good one!!!! It seems possible. Let me check. The problem is the ldap query now. I'm not sure if I can do that with ldap. mailfilter does two ldap queries, one to lookup the "main" group/role and another to get the email address of that role. Kind of a sql join, but in two parts. Let me see if I can do it with one query. Or maybe change how this data is stored inside the ldap db.
But good catch!!! I learned something new today!!! Thanks! On Tue, Dec 20, 2022 at 5:04 AM raf <post...@raf.org> wrote: > > On Mon, Dec 19, 2022 at 12:21:02PM -0500, Yanko Hernández Álvarez > <yhdezalva...@gmail.com> wrote: > > > On Mon, Dec 19, 2022 at 11:36 AM Matus UHLAR - fantomas > > <uh...@fantomas.sk> wrote: > > > > #!/bin/sh > > > > > > > > /usr/bin/cat | /var/spool/filter/scripts/mailfilter | > > > >/usr/sbin/sendmail -G -i "$@" > > > > > > > > exit $? > > > > > > this means that the always_bcc is executed again. > > > usually the content_filter is supposed to inject mail on alternative port > > > where option: > > > receive_override_options = no_address_mappings > > > > > > is used: see http://www.postfix.org/FILTER_README.html > > > > > > > Yes, I'm aware of that, but I was trying not to use the advanced filter. > > > > In the end it seems that there is no alternative to the advanced > > filter. But I'm asking here in case I overlooked something or > > misunderstood something. > > Perhaps I'm mistaken, but it sounds like mailfilter > could be replaced with canonical addressing to rewrite > sender addresses in outgoing emails. > > http://www.postfix.org/ADDRESS_REWRITING_README.html#canonical > > If so, it might simplify things. > > cheers, > raf >