On Thu, Jan 13, 2022 at 03:20:57PM +0100, Markus Grunwald <[email protected]>
wrote:
> Hello!
>
> I have a postfix server with one local and two virtual domains. For one of
> the virtual domains, I need a mail distribution list. I used the virtual
> alias list for a long time, but meanwhile I have many recipients that block
> mail from that list. An analysis from mx toolbox reports SPF trouble
> ("original" sender is [email protected], people get mail from
> [email protected]).
>
> I tried to set up a mailing list, but ended up having the same problems.
>
> I tried to exchange the virtual domain with the local domain, but that
> didn't work and caused other problems.
>
> I'm a bit at the end of my wits. All I want is that people can send a mail
> to [email protected] and some 20 other people with various addresses
> will get that mail reliably. Being able to respond is a bonus, but not
> really necessary.
>
> Could you please help me with that endeavour?
>
> --
> Markus Grunwald
> https://www.the-grue.de/~markus/markus_grunwald.gpg
If the distribution itself is working, and the list of
members doesn't change often, and it's only SPF that's
getting in the way, perhaps the least disruptive
solution is to add SRS to Postfix. The problem being
that someone who sends to the list has SPF on their
domain and a server who receives from the list bounces
it because your server isn't allowed by the original
sender's SPF.
Postsrsd can add SRS support to Postfix:
https://github.com/roehling/postsrsd
But by itself, it's a bit of overkill. It applies SRS
to all outgoing mail, not just the mail that is being
forwarded to the distribution list. To limit SRS to
only those messages that require it, you also need
Postforward:
https://github.com/zoni/postforward
If you have Debian, there is a postsrsd package, but
no postforward package.
If this approach seems appropriate, after installing
postsrsd and postforward, you need something like
this:
/etc/postfix/main.cf:
recipient_canonical_maps = tcp:localhost:10002
recipient_canonical_classes = envelope_recipient,header_recipient
/etc/postfix/virtual:
[email protected] listmember1
[email protected] listmember2
[email protected] listmember3
/etc/aliases:
listmember1: "|/usr/local/bin/postforward [email protected]"
listmember2: "|/usr/local/bin/postforward [email protected]"
listmember3: "|/usr/local/bin/postforward [email protected]"
But this is probably only good if the recipient list doesn't
change much, and you want to be in control of it when it does.
Otherwise, it's too much bother managing the local aliases
(unless you script it). Using mailing list software is a
better option in general. Using postsrsd without postforward
would also be easier, as it would rewrite envelope addresses
in all outgoing mail, so you don't need to fiddle with individual
aliases.
cheers,
raf