Fix for processing inbound ping netmail messages
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 40s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 1m51s
Create Docker Image / Final Docker Image Manifest (push) Successful in 10s

This commit is contained in:
Deon George 2024-05-31 21:57:21 +10:00
parent 27fe3cd223
commit b5047c52f0

View File

@ -32,8 +32,9 @@ trait MessagePath
if ($mo->path->count()) if ($mo->path->count())
if ($mo instanceof Netmail) { if ($mo instanceof Netmail) {
// Incoming processed message havent converted the path into a collection of addresses yet
foreach ($mo->path as $o) foreach ($mo->path as $o)
$reply .= sprintf("VIA: %s\r",$mo->via($o)); $reply .= sprintf("VIA: %s\r",(is_string($o) ? $o : $mo->via($o)));
} elseif ($mo instanceof Echomail) { } elseif ($mo instanceof Echomail) {
// Rejected echomails dont have a collection of Address::class for paths // Rejected echomails dont have a collection of Address::class for paths