Skip to content

Commit

Permalink
Merge pull request #6 from jdslv/configurable-name
Browse files Browse the repository at this point in the history
Allow to modify Roundcube name
  • Loading branch information
dbck authored Apr 25, 2024
2 parents 96c7914 + bb25435 commit ffd7d38
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ MAILTRAP_MAILBOX_LIMIT=51200000
MAILTRAP_MESSAGE_LIMIT=10240000
MAILTRAP_MAX_RECIPIENT_LIMIT=1000
MAILTRAP_ROUNDCUBE_CONFIG_REQUEST_PATH=""
MAILTRAP_ROUNDCUBE_NAME="MailTrap Roundcube"
```

# Starting a container
Expand Down
1 change: 1 addition & 0 deletions build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ ENV MAILTRAP_MAILBOX_LIMIT 51200000
ENV MAILTRAP_MESSAGE_LIMIT 10240000
ENV MAILTRAP_MAX_RECIPIENT_LIMIT 1000
ENV MAILTRAP_ROUNDCUBE_CONFIG_REQUEST_PATH ""
ENV MAILTRAP_ROUNDCUBE_NAME "MailTrap Roundcube"

# Avoid kernel logging
RUN sed -i '/imklog/s/^/#/' /etc/rsyslog.conf
Expand Down
4 changes: 3 additions & 1 deletion build/root/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,12 @@ RC_DES_KEY=`cat /dev/urandom | head -n 256 | sha256sum | awk '{print $1}'`;
sed -i "s/###DES_KEY###/$RC_DES_KEY/" /etc/roundcube/config.inc.php
# Configure proxy path for use behind a reverse proxy
if [ -z ${MAILTRAP_ROUNDCUBE_CONFIG_REQUEST_PATH} ];then
sed -i "s|###MAILTRAP_ROUNDCUBE_CONFIG_REQUEST_PATH###|null|" /etc/roundcube/config.inc.php
sed -i "s|###MAILTRAP_ROUNDCUBE_CONFIG_REQUEST_PATH###|null|" /etc/roundcube/config.inc.php
else
sed -i "s|###MAILTRAP_ROUNDCUBE_CONFIG_REQUEST_PATH###|'$MAILTRAP_ROUNDCUBE_CONFIG_REQUEST_PATH'|" /etc/roundcube/config.inc.php
fi
# Configure roundcube name
sed -i "s/###MAILTRAP_ROUNDCUBE_NAME###/$MAILTRAP_ROUNDCUBE_NAME/" /etc/roundcube/config.inc.php

# generate new certificate
make-ssl-cert generate-default-snakeoil --force-overwrite
Expand Down
2 changes: 1 addition & 1 deletion build/root/etc/roundcube/config.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

// Looking for the default values set? See: https://github.com/roundcube/roundcubemail/blob/master/config/defaults.inc.php
$config = [
'product_name' => 'MailTrap Roundcube',
'product_name' => '###MAILTRAP_ROUNDCUBE_NAME###',
'db_dsnw' => 'sqlite:////var/lib/roundcube/db/sqlite.db',
'des_key' => '###DES_KEY###',
'plugins' => [
Expand Down

0 comments on commit ffd7d38

Please sign in to comment.