switch to EHLO from HELO
This commit is contained in:
parent
74b7d9dc1a
commit
070152bb75
|
@ -27,7 +27,7 @@
|
||||||
function _send_email() {
|
function _send_email() {
|
||||||
[[ -v CONTAINER_NAME ]] || return 1
|
[[ -v CONTAINER_NAME ]] || return 1
|
||||||
|
|
||||||
local HELO='mail.external.tld'
|
local EHLO='mail.external.tld'
|
||||||
local FROM='user@external.tld'
|
local FROM='user@external.tld'
|
||||||
local TO='user1@localhost.localdomain'
|
local TO='user1@localhost.localdomain'
|
||||||
local SERVER='0.0.0.0'
|
local SERVER='0.0.0.0'
|
||||||
|
@ -37,7 +37,7 @@ function _send_email() {
|
||||||
|
|
||||||
while [[ ${#} -gt 0 ]]; do
|
while [[ ${#} -gt 0 ]]; do
|
||||||
case "${1}" in
|
case "${1}" in
|
||||||
( '--helo' ) HELO=${2:?--helo given but no argument} ; shift 2 ;;
|
( '--ehlo' ) EHLO=${2:?--ehlo given but no argument} ; shift 2 ;;
|
||||||
( '--from' ) FROM=${2:?--from given but no argument} ; shift 2 ;;
|
( '--from' ) FROM=${2:?--from given but no argument} ; shift 2 ;;
|
||||||
( '--to' ) TO=${2:?--to given but no argument} ; shift 2 ;;
|
( '--to' ) TO=${2:?--to given but no argument} ; shift 2 ;;
|
||||||
( '--server' ) SERVER=${2:?--server given but no argument} ; shift 2 ;;
|
( '--server' ) SERVER=${2:?--server given but no argument} ; shift 2 ;;
|
||||||
|
|
|
@ -262,7 +262,7 @@ function setup_file() {
|
||||||
# - This query requires a EHLO greeting to the destination server.
|
# - This query requires a EHLO greeting to the destination server.
|
||||||
# - HELO is treated as EHLO when protocol is ESMTP.
|
# - HELO is treated as EHLO when protocol is ESMTP.
|
||||||
swaks \
|
swaks \
|
||||||
--helo mail.external.tld \
|
--ehlo mail.external.tld \
|
||||||
--protocol ESMTP \
|
--protocol ESMTP \
|
||||||
--server mail.example.test \
|
--server mail.example.test \
|
||||||
--quit-after FIRST-HELO
|
--quit-after FIRST-HELO
|
||||||
|
|
|
@ -33,7 +33,7 @@ function teardown_file() { _default_teardown ; }
|
||||||
|
|
||||||
# it looks as if someone tries to send mail to another domain outside of DMS
|
# it looks as if someone tries to send mail to another domain outside of DMS
|
||||||
_send_email \
|
_send_email \
|
||||||
--helo mail.origin.test \
|
--ehlo mail.origin.test \
|
||||||
--protocol SSMTPA \
|
--protocol SSMTPA \
|
||||||
--server mail.origin.test \
|
--server mail.origin.test \
|
||||||
--from user@origin.test \
|
--from user@origin.test \
|
||||||
|
|
|
@ -331,7 +331,7 @@ function teardown() {
|
||||||
--port 465 -tlsc --auth LOGIN \
|
--port 465 -tlsc --auth LOGIN \
|
||||||
--auth-user some.user@localhost.localdomain \
|
--auth-user some.user@localhost.localdomain \
|
||||||
--auth-password secret \
|
--auth-password secret \
|
||||||
--helo mail \
|
--ehlo mail \
|
||||||
--from ldap@localhost.localdomain \
|
--from ldap@localhost.localdomain \
|
||||||
--data 'auth/ldap-smtp-auth-spoofed'
|
--data 'auth/ldap-smtp-auth-spoofed'
|
||||||
assert_output --partial 'Sender address rejected: not owned by user'
|
assert_output --partial 'Sender address rejected: not owned by user'
|
||||||
|
@ -342,7 +342,7 @@ function teardown() {
|
||||||
--port 465 -tlsc --auth LOGIN \
|
--port 465 -tlsc --auth LOGIN \
|
||||||
--auth-user some.user@localhost.localdomain \
|
--auth-user some.user@localhost.localdomain \
|
||||||
--auth-password secret \
|
--auth-password secret \
|
||||||
--helo mail \
|
--ehlo mail \
|
||||||
--from postmaster@localhost.localdomain \
|
--from postmaster@localhost.localdomain \
|
||||||
--to some.user@localhost.localdomain \
|
--to some.user@localhost.localdomain \
|
||||||
--data 'auth/ldap-smtp-auth-spoofed-alias'
|
--data 'auth/ldap-smtp-auth-spoofed-alias'
|
||||||
|
@ -358,7 +358,7 @@ function teardown() {
|
||||||
--port 465 -tlsc --auth LOGIN \
|
--port 465 -tlsc --auth LOGIN \
|
||||||
--auth-user some.user.email@localhost.localdomain \
|
--auth-user some.user.email@localhost.localdomain \
|
||||||
--auth-password secret \
|
--auth-password secret \
|
||||||
--helo mail \
|
--ehlo mail \
|
||||||
--from randomspoofedaddress@localhost.localdomain \
|
--from randomspoofedaddress@localhost.localdomain \
|
||||||
--to some.user@localhost.localdomain \
|
--to some.user@localhost.localdomain \
|
||||||
--data 'auth/ldap-smtp-auth-spoofed-sender-with-filter-exception'
|
--data 'auth/ldap-smtp-auth-spoofed-sender-with-filter-exception'
|
||||||
|
|
|
@ -295,7 +295,7 @@ EOF
|
||||||
--port 465 -tlsc --auth LOGIN \
|
--port 465 -tlsc --auth LOGIN \
|
||||||
--auth-user added@localhost.localdomain \
|
--auth-user added@localhost.localdomain \
|
||||||
--auth-password mypassword \
|
--auth-password mypassword \
|
||||||
--helo mail \
|
--ehlo mail \
|
||||||
--from user2@localhost.localdomain \
|
--from user2@localhost.localdomain \
|
||||||
--data 'auth/added-smtp-auth-spoofed'
|
--data 'auth/added-smtp-auth-spoofed'
|
||||||
assert_output --partial 'Sender address rejected: not owned by user'
|
assert_output --partial 'Sender address rejected: not owned by user'
|
||||||
|
@ -311,7 +311,7 @@ EOF
|
||||||
--port 465 -tlsc --auth LOGIN \
|
--port 465 -tlsc --auth LOGIN \
|
||||||
--auth-user user1@localhost.localdomain \
|
--auth-user user1@localhost.localdomain \
|
||||||
--auth-password mypassword \
|
--auth-password mypassword \
|
||||||
--helo mail \
|
--ehlo mail \
|
||||||
--from alias1@localhost.localdomain \
|
--from alias1@localhost.localdomain \
|
||||||
--data 'auth/added-smtp-auth-spoofed-alias'
|
--data 'auth/added-smtp-auth-spoofed-alias'
|
||||||
assert_success
|
assert_success
|
||||||
|
|
Loading…
Reference in New Issue