home · contact · privacy
Set up sending mail server for URL catcher.
authorChristian Heller <c.heller@plomlompom.de>
Thu, 9 Apr 2020 21:29:43 +0000 (23:29 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Thu, 9 Apr 2020 21:29:43 +0000 (23:29 +0200)
buster/apt-mark/dumpsite
buster/other_files/url-catcher_customizations.json [new file with mode: 0644]
buster/setup_scripts/setup_dumpsite.sh

index 881bba2203fa2f7381fe2d852f4cc14d623e3114..63ba08e2426b352f06213d9168c1f2f0ee8ae693 100644 (file)
@@ -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 (file)
index 0000000..acc4778
--- /dev/null
@@ -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
+}
index 5a0bec3c1d9d7d1b1f15ba012745deb2ce2d405c..739f145dbff69af4fec8e4359ec10726bdd03c52 100755 (executable)
@@ -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.