From c4c94ddd203e70460c70276f9ed53956c59ac43b Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Thu, 9 Apr 2020 23:29:43 +0200 Subject: [PATCH] Set up sending mail server for URL catcher. --- buster/apt-mark/dumpsite | 1 + buster/other_files/url-catcher_customizations.json | 13 +++++++++++++ buster/setup_scripts/setup_dumpsite.sh | 5 ++++- 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 buster/other_files/url-catcher_customizations.json diff --git a/buster/apt-mark/dumpsite b/buster/apt-mark/dumpsite index 881bba2..63ba08e 100644 --- a/buster/apt-mark/dumpsite +++ b/buster/apt-mark/dumpsite @@ -11,3 +11,4 @@ python3-venv build-essential python3-dev screen +postfix diff --git a/buster/other_files/url-catcher_customizations.json b/buster/other_files/url-catcher_customizations.json new file mode 100644 index 0000000..acc4778 --- /dev/null +++ b/buster/other_files/url-catcher_customizations.json @@ -0,0 +1,13 @@ +{ + "translations": { + "wrongCaptcha": "Captcha leider falsch.", + "invalidURL": "Falsch formatierte URL.", + "recordedURL": "URL aufgezeichnet (wird gesichtet und bei Angemessenheit dem Artikel angefügt): ", + "pleaseWait": "Zu viele Versuche von dieser IP. So viele Sekunden warten: " + }, + "mailConfig": { + "to": "plom+url_catcher@plomlompom.com", + "from": "plom+url_catcher@plomlompom.com" + }, + "slowdownReset": 3600 +} diff --git a/buster/setup_scripts/setup_dumpsite.sh b/buster/setup_scripts/setup_dumpsite.sh index 5a0bec3..739f145 100755 --- a/buster/setup_scripts/setup_dumpsite.sh +++ b/buster/setup_scripts/setup_dumpsite.sh @@ -11,6 +11,8 @@ mail="$2" old_server="$3" # Install configs, set up firewall. +echo "postfix postfix/main_mailer_type string 'Internet Site'" | debconf-set-selections +echo "postfix postfix/mailname string $(hostname -f)" | debconf-set-selections config_tree_prefix="${HOME}/config/buster" ./install_for_target.sh web dumpsite ./copy_dirtree.sh "${config_tree_prefix}/etc_files" "" web dumpsite @@ -68,8 +70,9 @@ su -lc "git clone https://github.com/plomlompom/url-catcher.git" plom # FIXME: we should not depend on a GitHub repo; # instead, set up like plomlombot repo (with post-recieve hook) su -lc "cd url-catcher && ln -s ../blog/captchas/linkable/ captchas" plom +cp "${config_tree_prefix}/other_files/url-catcher_customizations.json" /home/plom/url-catcher/customizations.json systemctl enable url_catcher.service -service url_catcher startc +service url_catcher start # NOTE: fix metadata/article_tmpl referencing dump.plomlompom.com explicitely # Prepare NGINX. -- 2.30.2