Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions banner_warn.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ function init()
$RCMAIL = rcmail::get_instance();

// Get config
$host = $RCMAIL->config->get('org_email_regex');
$this->org_mail_regex = rcube_utils::parse_host($host);
$this->org_mail_regex = $RCMAIL->config->get('org_email_regex');
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm very confused. Doesn't the value of $this->org_mail_regex just get overwritten here?

$this->x_spam_status_header = $RCMAIL->config->get('x_spam_status_header');
$this->x_spam_level_header = $RCMAIL->config->get('x_spam_level_header');
Expand Down
8 changes: 7 additions & 1 deletion config.inc.php.dist
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@
$config = array();

// Regex to match against the email to determine if from your organization
$config['org_email_regex'] = "/@(.*\.|)iitb\.ac\.in/i";
// Supported replacement variables:
// %n - hostname ($_SERVER['SERVER_NAME'])
// %t - hostname without the first part
// %d - domain (http hostname $_SERVER['HTTP_HOST'] without the first part)
// %s - domain name after the '@' from e-mail address provided at login screen
// For example %n = mail.domain.tld, %t = domain.tld
$config['org_email_regex'] = '/@(.*\.|)%t/i';

// Turn on letter avatars
$config['avatars'] = true;
Expand Down