Pannous

Pannous Commit Details

Date:2020-11-27 10:27:01 (9 months 23 days ago)
Author:Grégory Soutadé
Branch:master
Commit:5ab54b2af83e1abffe5f515f0afd1e8ff642cb24
Parents: 5bda0206aa255d22be02b7079f58f6cf4b0eef4c
Message:Fix some errors in mail management and add some additional logs

Changes:
Mfuel/app/tasks/pannous.php (6 diffs)

File differences

fuel/app/tasks/pannous.php
1111
1212
1313
14
15
1416
17
1518
1619
1720
21
22
1823
24
1925
2026
2127
28
29
2230
31
2332
2433
2534
......
2938
3039
3140
41
42
3243
44
3345
3446
3547
......
121133
122134
123135
124
136
137
138
139
140
125141
126142
127143
......
184200
185201
186202
187
203
188204
189205
190206
......
330346
331347
332348
333
349
334350
335351
336352
......
349365
350366
351367
352
368
if (!$structure->ifsubtype ||
strtolower($structure->subtype) != "signed")
{
\Log::info("No subtype signed");
return false;
}
if (!$structure->parts ||
count($structure->parts) != 2)
{
\Log::info("Invalid parts size");
return false;
}
if (!$structure->parts[1]->ifsubtype ||
strtolower($structure->parts[1]->subtype) != "pgp-signature")
{
\Log::info("subtype != pgp-signature");
return false;
}
if ($this->gpg == null)
{
}
if (!$this->gpg)
{
\Log::error("No pgp available");
return false;
}
if (strpos($user->public_key, "http") === 0)
{
);
$content_type = $this->getHeader($raw_headers_exploded, "Content-Type");
array_push($headers, $content_type);
if ($content_type)
array_push($headers, $content_type);
$content_transfer_encoding = $this->getHeader($raw_headers_exploded, "Content-Transfer-Encoding");
if ($content_transfer_encoding)
array_push($headers, $content_transfer_encoding);
$subject = $this->getHeader($raw_headers_exploded, "Subject");
if ($subject)
return $res;
}
private function manage_mail($mail)
private function manage_mail($mbox, $mail)
{
\Log::debug("New mail for mailing " . $mail->to);
$mailList = imap_fetch_overview($mbox, "1:".$mbox_status->Nmsgs);
foreach ($mailList as $mail) {
try {
$this->manage_mail($mail);
$this->manage_mail($mbox, $mail);
}
catch (\Exception $e) {
\Log::error($e->getMessage());
$wj->_run();
}
}
?>
?>

Archive Download the corresponding diff file

Branches