antedebaas / Viesti-Reports

DMARC & SMTP-TLS Reports processor and visualizer and BIMI file hoster
https://docs.viestireports.com/
GNU Affero General Public License v3.0
83 stars 16 forks source link

Error: ($policy_string_maxage) must be of type int, string given #45

Closed sn3ak closed 8 months ago

sn3ak commented 8 months ago

After importing my 300+ emails, subsequent runs of /php bin/console -q app:getreportsfrommailbox result in the following error:

[critical] Error thrown while running command "-q app:getreportsfrommailbox". Message: "App\Entity\SMTPTLS_Policies::setPolicyStringMaxage(): Argument #1 ($policy_string_maxage) must be of type int, string given, called in src/Command/GetReportsFromMailboxCommand.php on line 380"
[critical] Uncaught Error: App\Entity\SMTPTLS_Policies::setPolicyStringMaxage(): Argument #1 ($policy_string_maxage) must be of type int, string given, called in src/Command/GetReportsFromMailboxCommand.php on line 380

In SMTPTLS_Policies.php line 118:

  App\Entity\SMTPTLS_Policies::setPolicyStringMaxage(): Argument #1 ($policy_string_maxage) must be of type int, string given, called in src/Command/GetReportsFromMailboxCommand.php on line 380

app:getreportsfrommailbox

If I query the mySQL database:

select * from smtptls_policies order by policy_string_maxage limit 10;

I get the following:

+-----+------------------+-----------+-----------------+-----------------------+--------------------+----------------------+--------------------------+----------------------+
| id  | policy_domain_id | report_id | policy_type     | policy_string_version | policy_string_mode | policy_string_maxage | summary_successful_count | summary_failed_count |
+-----+------------------+-----------+-----------------+-----------------------+--------------------+----------------------+--------------------------+----------------------+
|  87 |                1 |        87 | no-policy-found | NULL                  | NULL               |                 NULL |                        1 |                    0 |
| 142 |                1 |       142 | no-policy-found | NULL                  | NULL               |                 NULL |                        1 |                    0 |
| 143 |                1 |       143 | no-policy-found | NULL                  | NULL               |                 NULL |                        1 |                    0 |
| 144 |                1 |       144 | no-policy-found | NULL                  | NULL               |                 NULL |                        1 |                    0 |
| 164 |                1 |       164 | sts             | NULL                  | NULL               |                 NULL |                        0 |                    2 |
| 166 |                1 |       166 | sts             | NULL                  | NULL               |                 NULL |                        0 |                    6 |
|   1 |                1 |         1 | sts             | STSv1                 | testing            |                86401 |                        1 |                    0 |
|   2 |                1 |         2 | sts             | STSv1                 | testing            |                86401 |                        1 |                    0 |
|   3 |                1 |         3 | sts             | STSv1                 | testing            |                86401 |                        6 |                    0 |
|   4 |                1 |         4 | sts             | STSv1                 | testing            |                86401 |                        2 |                    0 |
+-----+------------------+-----------+-----------------+-----------------------+--------------------+----------------------+--------------------------+----------------------+

If I update the NULL's and change them to 86401 everything runs normally.

Is there same way to know which messages those are so that I can send you a copy?

sn3ak commented 8 months ago

okay, I found I could match up the Report-ID's with the emails. I will work on anonymizing the files and I will post one of each type tomorrow.

sn3ak commented 8 months ago

Here is one of each: comcast.net!mydomain.net!1636675200!1636761599!1e64ff37-a84d-419a-9c3d-50b2d1779f81.json google.com!mydomain.net!1641168000!1641254399!001.json

antedebaas commented 8 months ago

could you re upload the files? these links dont seem to work

edit: nvm now the link works again

antedebaas commented 8 months ago

fixed in 1.9.0