Roundcube Community Forum

 

Roundcube PostfixAdmin Alias's

Started by dylan_pedro, December 23, 2017, 09:12:24 PM

Previous topic - Next topic

dylan_pedro

Hi,

I have a number of domains setup on postfix admin which also have a number of alias each.

The problem is, when I log into RoundCube, I am able to set up an identity for a completely different domain and still send an email.

How do I make sure the logged in user can only send from their own domain and only alias's setup for their domain?

Kind Regards,
Pedro

JohnDoh

Have a look at this config opton:
// Set identities access level:
// 0 - many identities with possibility to edit all params
// 1 - many identities with possibility to edit all params but not email address
// 2 - one identity with possibility to edit all params
// 3 - one identity with possibility to edit all params but not email address
// 4 - one identity with possibility to edit only signature
$config['identities_level'] = 0;
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

dylan_pedro

Hi,

This will adjust the front end of RoundCube from what I understand. I would like the change to happen in the back-end so RoundCube checks the database and only allows alias's assigned to the current user/domain?

Kind Regards,
PArd

JohnDoh

you'd need a plugin to do something like that. you might want to look at the new_user_identity plugin which ships with roundcube. this uses an LDAP back end but it might give you a starting point. then you could populate the user's identity list at first login and use the regular config options to prevent users from altering them.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

dylan_pedro

Everything is stored in a database for postfix so will the plugin work in that kind of setup?

JohnDoh

you could probably modify that plugin to read data from a database rather than ldap. there is also a plugin called virtuser_query which ships with rc. some of the comments in that code suggest it can also be used to create identities.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

dylan_pedro

Does anyone know how to use the virtuser_query plugin as I have followed the syntax but nothing is being pulled from the database?