pulsejet / banner-warn

Show avatars in roundcube message list with warnings
https://packagist.org/packages/radialapps/banner-warn
MIT License
7 stars 11 forks source link

Not working with multi domain settings #5

Closed madeus closed 4 years ago

madeus commented 4 years ago

How to set up configuration options for multiple domains? I tried as an array list but it doesn't work. Can you tell how to set this plugin for several domains?

$config['org_email_regex'] = array('/@(.*\.|)domain1\.ab\.pl/i','/@(.*\.|)domain2\.ab\.pl/i');

This setting does not work. There is an error in the logs:

PHP Warning:  preg_match() expects parameter 1 to be string, array given in /path_to_roundcube/plugins/banner_warn/banner_warn.php on line 137
pulsejet commented 4 years ago

Use regex or

$config['org_email_regex'] = "/@(.*\.|)(domain1|domain2)\.ab\.pl/i";
madeus commented 4 years ago

Thx, it's working now like a charm.

ghost commented 3 years ago

My config dosn't seem to work((( $config['org_email_regex'] = "/@(.*\.|)(example1|example2|example3)\.com\.net\.xyz/i"; Is there anything that can go wrong? How to implement more domains?

pulsejet commented 3 years ago

@AlexBeakes your regex is wrong. It will match only @example1.com.net.xyz and similar. Use https://regex101.com/

ghost commented 3 years ago

@pulsejet Thanks!!!