Email server custommization - Special use case

Hello Everyone,

I need help with a special use case I am exploring. I want to setup the email server in yunohost to handle all outgoing email in a special way.

I want the email server to deny outgoing emails from all users except the user ‘admin’. This means that if any user sends an email to any domain it should be blocked or the email should be returned to the ‘admin’ user.

A step further is that I want my email server to only send outgoing emails to the main domain of the yunohost server mydomain.com

Can anybody help me with this? I have broken the email server multiple times trying this out but have not been able to achieve the desired results.

In simpler terms, think of it in this manner, if yunohost server were a company email server then I want the employees of the company to only email one another without the possibility of sneding or receiving emails from outside the server.

Thanks a lot in advance.

That’s a very specific use case.
All I found was to restrict sending to one or more domains for all users. Here
But this is not what you wanted. You need to send emails without restriction.
I propose to remove the ‘email’ option in yunohost : webadmin > users > manage groups and permissions > go to users and remove email. And use another communication method. I personally use mattermost, it’s very convenient for sending messages, attachments, voice messages. It has also the ability to create group communication called channels, very convinient to let each team have a better view than using emails. Searching for something becomes extremely easy. And it has client apps for all devices, Windows, Linux, mobile.
I think it’s better to use another communication solution than to hack into system settings that may get lost after an update or even worse makes you lose some data.
Good luck :crossed_fingers:

1 Like

@jarod5001 thanks a lot for pointing me towards the serverfault QA discussion. it really looks promising. I will test it and see if it works (i am sure it will as I never tried transport maps before.

thanks a lot :grinning:

1 Like