Fix recording of netmails, when they contain taglines and origin lines

This commit is contained in:
Deon George 2024-05-13 15:28:53 +10:00
parent 760995568e
commit 6c653cf860
2 changed files with 37 additions and 1 deletions

View File

@ -116,8 +116,12 @@ class MessageProcess implements ShouldQueue
$o->cost = $this->msg->cost; $o->cost = $this->msg->cost;
$o->msgid = $this->msg->msgid; $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->subject = $this->msg->subject;
$o->msg = $this->msg->message; $o->msg = $this->msg->message_src."\r";
foreach ($this->msg->via as $v) foreach ($this->msg->via as $v)
$o->msg .= sprintf("\01Via %s\r",$v); $o->msg .= sprintf("\01Via %s\r",$v);
@ -372,6 +376,10 @@ class MessageProcess implements ShouldQueue
$o->msgid = $this->msg->msgid; $o->msgid = $this->msg->msgid;
$o->replyid = $this->msg->replyid; $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 = $this->msg->message_src."\r";
$o->msg_src = $this->msg->message_src; $o->msg_src = $this->msg->message_src;
$o->msg_crc = md5($this->msg->message); $o->msg_crc = md5($this->msg->message);

View File

@ -0,0 +1,28 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('netmails', function (Blueprint $table) {
$table->string('origin')->nullable();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('netmail', function (Blueprint $table) {
$table->dropColumn('origin');
});
}
};