Dont process messages from robots
This commit is contained in:
parent
3badb895b0
commit
b9abd17139
@ -52,6 +52,31 @@ class ProcessPacket implements ShouldQueue
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// We'll ignore messages from *fix users
|
||||||
|
if (in_array(strtolower($this->msg->user_from),['filefix','areafix'])) {
|
||||||
|
Log::info(sprintf('Ignoring Netmail to the Hub from (%s) [%s] - its from a bot.',$this->msg->user_from,$this->msg->fftn));
|
||||||
|
|
||||||
|
$o = new Netmail;
|
||||||
|
$o->to = $this->msg->user_to;
|
||||||
|
$o->from = $this->msg->user_from;
|
||||||
|
$o->subject = $this->msg->subject;
|
||||||
|
$o->datetime = $this->msg->date;
|
||||||
|
$o->tzoffset = $this->msg->date->utcOffset();
|
||||||
|
|
||||||
|
$o->flags = $this->msg->flags;
|
||||||
|
$o->cost = $this->msg->cost;
|
||||||
|
$o->msgid = $this->msg->msgid;
|
||||||
|
|
||||||
|
$o->fftn_id = ($x=$this->msg->fftn_o) ? $x->id : NULL;
|
||||||
|
$o->tftn_id = ($x=$this->msg->tftn_o) ? $x->id : NULL;
|
||||||
|
$o->msg = $this->msg->message_src;
|
||||||
|
$o->local = TRUE;
|
||||||
|
|
||||||
|
$o->save();
|
||||||
|
|
||||||
|
$processed = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
// If not processed, no users here!
|
// If not processed, no users here!
|
||||||
if (! $processed) {
|
if (! $processed) {
|
||||||
$reject = [
|
$reject = [
|
||||||
|
@ -335,6 +335,7 @@ class Address extends Model
|
|||||||
return $q->whereNull('sent')
|
return $q->whereNull('sent')
|
||||||
->orWhere('sent',FALSE);
|
->orWhere('sent',FALSE);
|
||||||
}))
|
}))
|
||||||
|
->whereNull('local')
|
||||||
->count())
|
->count())
|
||||||
{
|
{
|
||||||
return $this->getPacket($x->get());
|
return $this->getPacket($x->get());
|
||||||
|
Loading…
Reference in New Issue
Block a user