mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2025-08-31 23:40:25 +02:00
tests: Use swaks
instead of nc
for sending mail (#3732)
See associated `CHANGELOG.md` entry for details. --------- Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com>
This commit is contained in:
parent
0889b0ff06
commit
9e81517fe3
119 changed files with 355 additions and 455 deletions
|
@ -469,5 +469,19 @@ function _print_mail_log_for_id() {
|
|||
_run_in_container grep -F "${MAIL_ID}" /var/log/mail.log
|
||||
}
|
||||
|
||||
# A simple wrapper for netcat (`nc`). This is useful when sending
|
||||
# "raw" e-mails or doing IMAP-related work.
|
||||
#
|
||||
# @param ${1} = the file that is given to `nc`
|
||||
# @param ${1} = custom parameters for `nc` [OPTIONAL] (default: 0.0.0.0 25)
|
||||
function _nc_wrapper() {
|
||||
local FILE=${1:?Must provide name of template file}
|
||||
local NC_PARAMETERS=${2:-0.0.0.0 25}
|
||||
|
||||
[[ -v CONTAINER_NAME ]] || return 1
|
||||
|
||||
_run_in_container_bash "nc ${NC_PARAMETERS} < /tmp/docker-mailserver-test/${FILE}.txt"
|
||||
}
|
||||
|
||||
# ? << Miscellaneous helper functions
|
||||
# ! -------------------------------------------------------------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue