test skip
This commit is contained in:
parent
eb5b3b3ec7
commit
b0e3c5b390
@ -71,7 +71,7 @@ DISCLAMER_CMD=altermime
|
|||||||
MAX_FINAL_SIZE=2097152 # 2Mi
|
MAX_FINAL_SIZE=2097152 # 2Mi
|
||||||
ARCHIVE_TITLE="archive_content"
|
ARCHIVE_TITLE="archive_content"
|
||||||
ARCHIVE_MIME="text/kaz_email_archive"
|
ARCHIVE_MIME="text/kaz_email_archive"
|
||||||
|
SKIP_DEST_DOMAIN_="/tmp/docker-mailserver/dest-domain-no-depol.txt"
|
||||||
KEEP_FAILED=true
|
KEEP_FAILED=true
|
||||||
DEBUG=
|
DEBUG=
|
||||||
|
|
||||||
@ -137,6 +137,23 @@ curlJirafeauSend () {
|
|||||||
echo "${OUTPUT}"
|
echo "${OUTPUT}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get_domaine() {
|
||||||
|
[[ $1 =~ @ ]] || return
|
||||||
|
echo ${1/#*@/}
|
||||||
|
}
|
||||||
|
|
||||||
|
skip_domain () {
|
||||||
|
LEFT=":"
|
||||||
|
for ARG in $@; do
|
||||||
|
[ "${ARG}" = "--" ] && LEFT="" && continue
|
||||||
|
DOM=$(get_domaine ${ARG})
|
||||||
|
[ -n "${DOM}" ] || continue
|
||||||
|
if [ -z "${LEFT}" ]; then
|
||||||
|
grep -q "^${DOM}$" "${SKIP_DEST_DOMAIN_}" 2>/dev/null && echo "yes"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
#################### MAIN #################################################
|
#################### MAIN #################################################
|
||||||
echo "${NL}${BLUE}$(date +%d-%m-%Y-%H-%M-%S)${NC} : ${GREEN}######################################## filter start (log in ${TMP_LOG})${NC}" >> "${FIC_LOG}"
|
echo "${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}"
|
LOG_FIC "${GREEN}######################################## ${TMP_LOG} ${NC}"
|
||||||
@ -194,12 +211,22 @@ mkdir -p "${REP_PIECE_JOINTE}/"
|
|||||||
>"${OLD_LINKS}"
|
>"${OLD_LINKS}"
|
||||||
>"${ARCHIVE_CONTENT}"
|
>"${ARCHIVE_CONTENT}"
|
||||||
|
|
||||||
|
if
|
||||||
|
${SENDMAIL} "$@" < "${INSPECT_DIR}/in.$$"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "${MODE}" = "none"]; then
|
if [ "${MODE}" = "none"]; then
|
||||||
LOG_FIC " - ${GREEN}send without change (MODE=none)${NC}"
|
LOG_FIC " - ${GREEN}send without change (MODE=none)${NC}"
|
||||||
${SENDMAIL} "$@" < "${INSPECT_DIR}/in.$$"
|
${SENDMAIL} "$@" < "${INSPECT_DIR}/in.$$"
|
||||||
quitFilter 0
|
quitFilter 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$(get_domain_dest $*)" = "yes"]; then
|
||||||
|
LOG_FIC " - ${GREEN}send without change (skip domain)${NC}"
|
||||||
|
${SENDMAIL} "$@" < "${INSPECT_DIR}/in.$$"
|
||||||
|
quitFilter 0
|
||||||
|
fi
|
||||||
|
|
||||||
# Etape de rafraichissement des anciens fichiers inclus
|
# Etape de rafraichissement des anciens fichiers inclus
|
||||||
echo "time: ${DATE_TEMPS}${NL}id: $(date +%s)" > "${ARCHIVE_CONTENT}"
|
echo "time: ${DATE_TEMPS}${NL}id: $(date +%s)" > "${ARCHIVE_CONTENT}"
|
||||||
[ -n "${TRACK}" ] && echo "sender: ${MAIL_SOURCE}" >> "${ARCHIVE_CONTENT}"
|
[ -n "${TRACK}" ] && echo "sender: ${MAIL_SOURCE}" >> "${ARCHIVE_CONTENT}"
|
||||||
|
Loading…
Reference in New Issue
Block a user