Fix finding echomail origin AKA by including the domain name
This commit is contained in:
parent
2509aa99e1
commit
6b1cb8cd78
@ -133,7 +133,7 @@ final class Echomail extends Model implements Packet
|
||||
// Make sure our origin contains our FTN
|
||||
$m = [];
|
||||
if ((preg_match('#^(.*)\s+\(([0-9]+:[0-9]+/[0-9]+.*)\)+\s*$#',$model->set_origin,$m))
|
||||
&& (Address::findFTN($m[2])->id === $model->fftn_id))
|
||||
&& (Address::findFTN(sprintf('%s@%s',$m[2],$model->fftn->domain->name))?->id === $model->fftn_id))
|
||||
$model->origin_id = Origin::firstOrCreate(['value'=>$m[1]])->id;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user