Skip to content

Commit

Permalink
fix domain not created because of null values. fixes #15
Browse files Browse the repository at this point in the history
  • Loading branch information
antedebaas committed Dec 18, 2023
1 parent e94a3a4 commit f27668c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Command/CheckmailboxCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ protected function execute(InputInterface $input, OutputInterface $output): int

$dbdomain = new Domains;
$dbdomain->setFqdn($dmarcreport->policy_published->domain->__toString());
$dbdomain->setStsVersion("STSv1");
$dbdomain->setStsMode("enforce");
$dbdomain->setStsMaxAge(86400);
$dbdomain->setMailhost($policy->policy->{'policy-domain'});
$this->em->persist($dbdomain);
$this->em->flush();
}
Expand Down Expand Up @@ -161,6 +165,10 @@ protected function execute(InputInterface $input, OutputInterface $output): int

$dbdomain = new Domains;
$dbdomain->setFqdn($policy->policy->{'policy-domain'});
$dbdomain->setStsVersion("STSv1");
$dbdomain->setStsMode("enforce");
$dbdomain->setStsMaxAge(86400);
$dbdomain->setMailhost($policy->policy->{'policy-domain'});
$this->em->persist($dbdomain);
$this->em->flush();
}
Expand Down Expand Up @@ -195,6 +203,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$dbmxrecord = new MXRecords;
$dbmxrecord->setDomain($dbdomain);
$dbmxrecord->setName($mxrecord);
$dbmxrecord->setInSts(true);
$this->em->persist($dbmxrecord);
$this->em->flush();
}
Expand Down

0 comments on commit f27668c

Please sign in to comment.