Improvements to working out region for new addresses, Bounce netmails to a invalid address (that we would host)
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 1m36s
Create Docker Image / Final Docker Image Manifest (push) Successful in 10s

This commit is contained in:
2025-01-07 14:55:57 +11:00
parent 058b4ac4b9
commit 2c1ab88bbd
8 changed files with 107 additions and 16 deletions

View File

@@ -17,8 +17,8 @@ use League\Flysystem\UnableToMoveFile;
use App\Classes\File;
use App\Classes\FTN\Packet;
use App\Exceptions\InvalidPacketException;
use App\Models\{Echomail,Netmail,System};
use App\Notifications\Netmails\{PacketPasswordInvalid,UnexpectedPacketFromYou};
use App\Models\{Address,Echomail,Netmail,System};
use App\Notifications\Netmails\{NetmailNoDestination,PacketPasswordInvalid,UnexpectedPacketFromYou};
class PacketProcess implements ShouldQueue
{
@@ -119,10 +119,20 @@ class PacketProcess implements ShouldQueue
$count = 0;
foreach ($pkt as $msg) {
if ($msg instanceof Netmail)
Log::info(sprintf('%s:- Netmail from [%s] to [%s]',self::LOGKEY,$msg->fftn->ftn,$msg->tftn->ftn));
if ($msg instanceof Netmail) {
Log::info(sprintf('%s:- Netmail from [%s] to [%s]',self::LOGKEY,$msg->fftn->ftn,$msg->tftn?->ftn ?: $msg->set_tftn));
elseif ($msg instanceof Echomail) {
// If we dont have a destination, we need to bounce it, if we would be the parent of the address
if ((! $msg->tftn) && our_address()->contains(Address::newFTN($msg->set_tftn)?->parent())) {
Log::alert(sprintf('%s:! Netmail destination [%s] doesnt exist, bouncing back to [%s]',self::LOGKEY,$msg->set_tftn,$pkt->fftn->ftn));
Notification::route('netmail',$msg->fftn)->notify(new NetmailNoDestination($msg));
$count++;
continue;
}
} elseif ($msg instanceof Echomail) {
Log::info(sprintf('%s:- Echomail from [%s]',self::LOGKEY,$msg->fftn->ftn));
if ($netmail_only) {