Redirect email adresse that have as username the name of a group

How can I redirect an email address that have as username the name of a group?

In my ynh, I have a group called awesomegroup and I want to redirect awesomegroup@mydomain.tld to a specific address (not all member of the group using a group mail-alias), let’s say response+awesomegroup@discourse.mydomain.tld.

I can’t create a user called awesomegroup and manage the redirection through ynh webgui because their would be a conflict between user and group name so I can’t create the user.

I guess I need to modify some files but I don’t know at all how to handle such redirection.

Maybe I should mention that yunohost main domain isn’t mydomain.tld but yuno.mydomain.tld .

Hi Thatoo,

I think you could do it by changing some files in related to postfix . I am not totally sure of which file.

I guess you can edit /etc/aliases with

awesomegroup: response+awesomegroup@discourse.mydomain.tld

and run newaliases command
but i am not sure that it will disable the mail sending to all awesome group members…

1 Like