manage period for sender and receiver
This commit is contained in:
parent
72496c641e
commit
68c5fa5b86
22
src/bash/filter.sh
Executable file → Normal file
22
src/bash/filter.sh
Executable file → Normal file
@ -33,7 +33,7 @@
|
||||
# knowledge of the CeCILL-B license and that you accept its terms. #
|
||||
##########################################################################
|
||||
# Kaz addon (see https://git.kaz.bzh/KAZ/depollueur for information)
|
||||
# version : 2.22 (2024-12-09)
|
||||
# version : 2.23 (2025-01-07)
|
||||
|
||||
##########################################################################
|
||||
# - installer l'utilitaire apg pour génération de mot de passes
|
||||
@ -163,6 +163,24 @@ function check_skip_domains() {
|
||||
echo "no"
|
||||
}
|
||||
|
||||
# choisir la période max
|
||||
function check_max_period() {
|
||||
local LIST_EMAILS="$1"
|
||||
LPERIOD=""
|
||||
|
||||
for email in ${LIST_EMAILS}; do
|
||||
LPERIOD="${LPERIOD} $(curl "${JIRAFEAU_LOCAL}/a.php?p=${email}" 2>/dev/null)"
|
||||
done
|
||||
|
||||
for p in semester quarter month week day hour minute; do
|
||||
if [[ "${LPERIOD}" =~ (^|[[:space:]])$p($|[[:space:]]) ]]; then
|
||||
echo "${p}"
|
||||
return
|
||||
fi
|
||||
done
|
||||
echo "${DEFAULT_PERIOD}"
|
||||
}
|
||||
|
||||
#################### MAIN #################################################
|
||||
echo -e "${NL}${BLUE}$(date +%d-%m-%Y-%H-%M-%S)${NC} : ${GREEN}######################################## filter start (log in ${TMP_LOG})${NC}" >> "${FIC_LOG}"
|
||||
LOG_FIC "${GREEN}######################################## ${TMP_LOG} ${NC}"
|
||||
@ -187,7 +205,7 @@ MODE=$(curl "${JIRAFEAU_LOCAL}/a.php?m=${MAIL_SOURCE}" 2>/dev/null )
|
||||
[[ "${MODE}" =~ ^(none|footer|attachment|both)$ ]] || MODE="${DEFAULT_MODE}"
|
||||
TRACK=$(curl "${JIRAFEAU_LOCAL}/a.php?r=${MAIL_SOURCE}" 2>/dev/null )
|
||||
[[ "${TRACK}" =~ ^(|0|1|false|true|FALSE|TRUE|on|off)$ ]] || TRACK="${DEFAULT_TRACK}"
|
||||
PERIOD=$(curl "${JIRAFEAU_LOCAL}/a.php?p=${MAIL_SOURCE}" 2>/dev/null )
|
||||
PERIOD=$(check_max_period "${LIST_EMAILS}")
|
||||
[[ "${PERIOD}" =~ ^(minute|hour|day|week|month|quarter|semester)$ ]] || PERIOD="${DEFAULT_PERIOD}"
|
||||
|
||||
LOG_FIC "${NL}" \
|
||||
|
@ -33,7 +33,7 @@
|
||||
# knowledge of the CeCILL-B license and that you accept its terms. #
|
||||
##########################################################################
|
||||
# Kaz addon (see https://git.kaz.bzh/KAZ/depollueur for information)
|
||||
# version : 2.22 (2024-12-09)
|
||||
# version : 2.23 (2025-01-07)
|
||||
|
||||
PRG=$(basename $0)
|
||||
|
||||
|
@ -33,8 +33,8 @@
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "version.hpp"
|
||||
const std::string kaz::LAST_VERSION_NUM ("2.22");
|
||||
const std::string kaz::LAST_VERSION_DATE ("2024-12-09");
|
||||
const std::string kaz::LAST_VERSION_NUM ("2.23");
|
||||
const std::string kaz::LAST_VERSION_DATE ("2025-01-07");
|
||||
const std::string kaz::LAST_VERSION (LAST_VERSION_NUM+" "+LAST_VERSION_DATE+" eMailShrinker");
|
||||
|
||||
#include <iostream>
|
||||
|
Loading…
x
Reference in New Issue
Block a user