Skip to content

Commit 9c9524c

Browse files
committed
Add robots.txt for roundcube during upgrade.
1 parent c3b7bc0 commit 9c9524c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

install/upgrade/versions/latest.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,3 +119,9 @@ if [ -f "/etc/roundcube/config.inc.php" ]; then
119119
rcDesKey="$(openssl rand -base64 30 | tr -d "/" | cut -c1-24)"
120120
sed -i "s/vtIOjLZo9kffJoqzpSbm5r1r/$rcDesKey/g" /etc/roundcube/config.inc.php
121121
fi
122+
123+
# Place robots.txt to prevent webmail crawling by search engine bots.
124+
if [ ! -f "/var/lib/roundcube/robots.txt" ]; then
125+
echo "User-agent: *" > /var/lib/roundcube/robots.txt
126+
echo "Disallow: /" >> /var/lib/roundcube/robots.txt
127+
fi

0 commit comments

Comments
 (0)