Dnia 21.03.2021 o godz. 15:44:06 Markus Grunwald pisze:
> Now I'd like to run a mailman mailing list for
> maennerchor-kirchseeon.de. Their mailing list tells me, that to
> avoid problems...
> 
> >Whatever you set for VIRTUAL_MAILMAN_LOCAL_DOMAIN must be a local
> >domain, not a virtual domain.
> 
> So I'd like to have maennerchor-kirchseeon.de as local domain and
> the-grue.de as virtual domain. I thought it might be as simple as
> s/the-grue.de/maennerchor-kirchseeon.de/ in these two lines from
> main.cf:

Alternatively, you can do the following (that's what I'm actually doing on
my server for one of my mailing lists):

Keep your current domains as they are, but create a separate subdomain
list.maennerchor-kirchseeon.de and make that a local domain (ie. add it to
mydestination= in main.cf file).

In Mailman, create your mailing list in the domain
list.maennerchor-kirchseeon.de. Assume your list name is "examplelist". Then
Mailman will add a bunch of aliases starting with "examplelist" into your
/var/lib/mailman/data/virtual-mailman file.

The downside of this is that list.maennerchor-kirchseeon.de is practically
equivalent to your main domain the-grue.de, ie. messages sent to any
u...@list.maennerchor-kirchseeon.de will actually reach u...@the-grue.de and
vice versa (so you can for example send to the mailing list using address
examplel...@the-grue.de). But you can fix this with
smtpd_recipient_restrictions. Add the following restriction to your
smtpd_recipient_restrictions, BEFORE "permit_mynetworks":

check_recipient_access pcre:/etc/postfix/recipient_access,

and in the file /etc/postfix/recipient_access enter the following:

/^examplelist.*@list\.maennerchor-kirchseeon\.de$/    DUNNO
/@list\.maennerchor-kirchseeon\.de$/    550 5.1.1 User unknown in local 
recipient table
/^examplelist/    550 5.1.1 User unknown in local recipient table

The first line allows addresses starting with "examplelist" in the domain
list.maennerchor-kirchseeon.de (actually, it pretends that no entry has been
found for the address in the access table, so it can be subject to further
smtpd_recipient_restrictions).

The second line rejects all other addresses in list.maennerchor-kirchseeon.de
domain, mimicking the actual Postfix error message for unknown user.

The third line rejects all addresses starting with "examplelist" in other
domains than list.maennerchor-kirchseeon.de, similarly mimicking the Postfix
error message for unknown user.

In this way only addresses starting with "examplelist" are accepted in
list.maennerchor-kirchseeon.de domain, and these addresses are accepted only
in that domain and not any other. So you basically have a separate domain
for the mailing list only.
-- 
Regards,
   Jaroslaw Rafa
   r...@rafa.eu.org
--
"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 via email to