blob: 6bdfb34958907077ee932dbe652b8ec3544f9c08 [file] [log] [blame]
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +01001<?php
2$redis = new Redis();
3try {
4 if (!empty(getenv('REDIS_SLAVEOF_IP'))) {
5 $redis->connect(getenv('REDIS_SLAVEOF_IP'), getenv('REDIS_SLAVEOF_PORT'));
6 }
7 else {
8 $redis->connect('redis-mailcow', 6379);
9 }
10}
11catch (Exception $e) {
12 exit;
13}
14header('Content-Type: application/json');
15echo '{"error":"Unauthorized"}';
16error_log("Rspamd UI: Invalid password by " . $_SERVER['REMOTE_ADDR']);
17$redis->publish("F2B_CHANNEL", "Rspamd UI: Invalid password by " . $_SERVER['REMOTE_ADDR']);