feat: Prepare Zemailnator for Dokploy deployment
- Add highly optimized Dockerfile with Nginx and PHP-FPM 8.4 - Add docker-compose.yml configured with Redis and MariaDB 10.11 - Implement entrypoint.sh and supervisord.conf for background workers - Refactor legacy IMAP scripts into scheduled Artisan Commands - Secure app by removing old routes with hardcoded basic auth credentials - Configure email attachments to use Laravel Storage instead of insecure public/tmp
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Ddeboer\Imap\ConnectionInterface;
|
||||
use Ddeboer\Imap\Server;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Support\Facades\Cookie;
|
||||
|
||||
@@ -14,6 +14,7 @@ class ZEmail extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use HasFactory;
|
||||
|
||||
public static function connectMailBox($imap = null): ConnectionInterface
|
||||
{
|
||||
if ($imap === null) {
|
||||
@@ -38,6 +39,7 @@ class ZEmail extends Model
|
||||
if (Email::mailToDBStatus()) {
|
||||
return Email::parseEmail($email, $deleted);
|
||||
}
|
||||
|
||||
return Message::fetchMessages($email, $type, $deleted);
|
||||
}
|
||||
|
||||
@@ -57,6 +59,7 @@ class ZEmail extends Model
|
||||
if (Cookie::has('email')) {
|
||||
return Cookie::get('email');
|
||||
}
|
||||
|
||||
return $generate ? ZEmail::generateRandomEmail() : null;
|
||||
}
|
||||
|
||||
@@ -65,6 +68,7 @@ class ZEmail extends Model
|
||||
if (Cookie::has('emails')) {
|
||||
return unserialize(Cookie::get('emails'));
|
||||
}
|
||||
|
||||
return [];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user