NS8 /etc/aliases

Hello,

On ns7 one could just edit /etc/aliases run the newaliases command and boom, e-mail would be directed to those aliases.

I’m still trying to wrap my head around how to do this with ns8. I’ve gotten as far as editing /home/mail1/.local/share/containers/storage/volumes/postfix-custom/_data to define where aliases are located… but the newaliases doesn’t exist on the server. How should I approach this?

Many thanks,
Dan

Hi Dan,

Welcome to the community.

In the mail module under “Addresses” you can create an email, and by selecting en existing “Destination” you create an alias.

Hope that helps,

1 Like

Hello Erik,

Thank you for this, the /etc/aliases on my ns7 server is more than 2000 lines though… there is no way to work with a /etc/aliases and newaliases ?

Ohh, that is quite a lot, that would be an awful lot of monkey clicking… :wink:
I did not attempt to modify the postfix config, but i am convinced that this is possible. Lets see, im sure some one else has a better solution for you.
Regards,

It’s inside the postfix container in /usr/bin/newaliases

To execute it:

runagent -m mail1 podman exec postfix newaliases

2 Likes

Thank you Markus and Erik, I feel like I am getting closer to the desired solution :slight_smile:

I noticed that out of the box alias_database = and alias_maps = are undefined when running postconf -n … is the proper method to define them through the postfix-custom/_data folder in home of mail1… or is there a way to edit the containerized postfix main.cf?

Also would the /etc/aliases reside in the container or is the one used in the root of the server?

Much Appreciated,
Dan

Yes, refer to ns8-mail/README.md at main · NethServer/ns8-mail · GitHub

As said by Markus, enter the app agent enviroment with

runagent -m mail1

As always I suggest to avoid writing directly into system absolute paths with some “_data” path components, because it may have ownership and SELinux implications. The safe approach is to use Podman commands, like “podman exec”.

In case of mail you can get an interactive shell in the Postfix container with

 podman exec -ti postfix ash -l
3 Likes