Roundcube Community Forum

News and Announcements => General Discussion => Topic started by: dylan_pedro on December 23, 2017, 09:12:24 PM

Title: Roundcube PostfixAdmin Alias's
Post by: dylan_pedro on December 23, 2017, 09:12:24 PM
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
Title: Re: Roundcube PostfixAdmin Alias's
Post by: JohnDoh on December 24, 2017, 04:48:59 AM
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;
Title: Re: Roundcube PostfixAdmin Alias's
Post by: dylan_pedro on December 24, 2017, 07:30:45 AM
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
Title: Re: Roundcube PostfixAdmin Alias's
Post by: JohnDoh on December 24, 2017, 09:47:33 AM
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.
Title: Re: Roundcube PostfixAdmin Alias's
Post by: dylan_pedro on December 24, 2017, 09:58:41 PM
Everything is stored in a database for postfix so will the plugin work in that kind of setup?
Title: Re: Roundcube PostfixAdmin Alias's
Post by: JohnDoh on December 26, 2017, 04:03:42 AM
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.
Title: Re: Roundcube PostfixAdmin Alias's
Post by: dylan_pedro on January 04, 2018, 08:51:48 PM
Does anyone know how to use the virtuser_query plugin as I have followed the syntax but nothing is being pulled from the database?