From b008cb20d2db66e764ecb97b8615cd67fe2f521d Mon Sep 17 00:00:00 2001 From: Deon George Date: Mon, 13 May 2024 15:28:53 +1000 Subject: [PATCH] Fix recording of netmails, when they contain taglines and origin lines --- app/Jobs/MessageProcess.php | 10 ++++++- ...024_05_13_154308_add_origin_to_netmail.php | 28 +++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 database/migrations/2024_05_13_154308_add_origin_to_netmail.php diff --git a/app/Jobs/MessageProcess.php b/app/Jobs/MessageProcess.php index 1a52360..d5035d7 100644 --- a/app/Jobs/MessageProcess.php +++ b/app/Jobs/MessageProcess.php @@ -116,8 +116,12 @@ class MessageProcess implements ShouldQueue $o->cost = $this->msg->cost; $o->msgid = $this->msg->msgid; + $o->tagline = $this->msg->tagline; + $o->tearline = $this->msg->tearline; + $o->origin = $this->msg->origin; + $o->subject = $this->msg->subject; - $o->msg = $this->msg->message; + $o->msg = $this->msg->message_src."\r"; foreach ($this->msg->via as $v) $o->msg .= sprintf("\01Via %s\r",$v); @@ -372,6 +376,10 @@ class MessageProcess implements ShouldQueue $o->msgid = $this->msg->msgid; $o->replyid = $this->msg->replyid; + $o->tagline = $this->msg->tagline; + $o->tearline = $this->msg->tearline; + $o->origin = $this->msg->origin; + $o->msg = $this->msg->message_src."\r"; $o->msg_src = $this->msg->message_src; $o->msg_crc = md5($this->msg->message); diff --git a/database/migrations/2024_05_13_154308_add_origin_to_netmail.php b/database/migrations/2024_05_13_154308_add_origin_to_netmail.php new file mode 100644 index 0000000..c916c4e --- /dev/null +++ b/database/migrations/2024_05_13_154308_add_origin_to_netmail.php @@ -0,0 +1,28 @@ +string('origin')->nullable(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('netmail', function (Blueprint $table) { + $table->dropColumn('origin'); + }); + } +};