Distribution Groups with Postfix

Hi, folks!

I am using Kopano solely with db backend. So, I created a group via kopano-admin and gave it an e-mail address with the -e parameter. I would like to send emails to this mail address from outside. As I am using Postfix I think I need to have a virtual alias map as described here: https://kb.kopano.io/display/WIKI/Postfix. However, this example just works for normal user accounts but does not resolve distribution groups, or am I wrong? Does anyone know an appropriate sql query for resolving the members of a group? Or is there a different way to send mails to all members of a group?

Any hints are highly appreciated. Thanks!

I tried to write a sql query that seems to give me the members of a group:

select value
from objectproperty p
join objectrelation r on p.objectid=r.objectid
where r.parentobjectid=
	(select objectid
	from objectproperty
	where propname='emailaddress'
	and value='%s')
and r.relationtype='1'
and p.propname='emailaddress';

Is this the way to go? Maybe someone could check my query as I am not a sql expert :)

Wow, I did not even know there are examples for postfix to automatically resolve kopano users :-)

I’ve alway been using a manually editied textfile (compiled with postmap) which lists

name@domain.net name@domain.net
alias1@domain.net name@domain.net
(where name@domain.net is the “real” kopano email address)

And If i need mails to go to more than one person, i create
group@domain.net name1@domain.net,name2@domain.net,name3@domain.net