mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2025-07-30 23:54:46 +02:00
rspamd: add feature for adjusting options with a file parsed by DMS (#3059)
Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com>
This commit is contained in:
parent
40e10d755d
commit
bee9e3627d
10 changed files with 448 additions and 95 deletions
|
@ -54,15 +54,15 @@ function _send_mail_and_get_id() {
|
|||
_send_email "${TEMPLATE_FILE}"
|
||||
_wait_for_empty_mail_queue_in_container
|
||||
|
||||
# The unique ID Postfix (and other services) use may be different in length
|
||||
# on different systems (e.g. amd64 (11) vs aarch64 (10)). Hence, we use a
|
||||
# range to safely capture it.
|
||||
MAIL_ID=$(_exec_in_container tac /var/log/mail.log \
|
||||
| grep -E -m 1 'postfix/smtpd.*: [A-Z0-9]+: client=localhost' \
|
||||
| grep -E -o '[A-Z0-9]{11}')
|
||||
| grep -E -o '[A-Z0-9]{9,12}' || true)
|
||||
|
||||
if [[ -z ${MAIL_ID} ]]
|
||||
then
|
||||
echo 'Could not obtain mail ID - aborting!' >&2
|
||||
exit 1
|
||||
fi
|
||||
run bash -c "-z ${MAIL_ID}"
|
||||
assert_success 'Could not obtain mail ID - aborting!'
|
||||
|
||||
echo "${MAIL_ID}"
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue