Skip to content

Conversation

@butschster
Copy link
Member

@butschster butschster commented Nov 23, 2025

This PR replaces the old SMTP implementation inside Buggregator with the new SMTP server plugin for RoadRunner

All SMTP protocol handling, parsing, and message processing is now performed on the RoadRunner side, while PHP only consumes already-parsed messages from the queue.

This significantly simplifies the architecture, improves stability, and removes the fragile PHP-level SMTP protocol implementation.


🧩 Background & Motivation

Previously, Buggregator used a custom SMTP server written in PHP.
Although functional, this approach had several critical problems:

  1. Full SMTP protocol implemented in PHP
    This was hard to maintain, difficult to extend, and not always stable under real-world load.

  2. Worker freezes and hangs
    Under some conditions, the PHP SMTP server could block or hang a worker.
    Over time this caused message ingestion to stop entirely.

  3. Complex debugging & high maintenance cost
    SMTP is a stateful protocol with many edge cases.
    Supporting it on PHP side was error-prone and time-consuming.

To address all these issues, we migrated SMTP handling entirely to the RoadRunner layer.


🚀 What Changed in This PR

✔ Buggregator no longer handles SMTP connections directly

PHP no longer runs any SMTP server logic.

✔ All SMTP processing moved to the RoadRunner SMTP plugin

The RoadRunner SMTP plugin now:

  • accepts SMTP connections,
  • handles the full SMTP protocol,
  • parses incoming emails,
  • normalizes message structure,
  • pushes messages into the queue.

✔ Buggregator now simply consumes structured messages

On the PHP side, Buggregator:

  • listens to SMTP jobs coming from the queue,
  • converts them into events,
  • handles them using its existing event system.

@butschster butschster merged commit 00c6b3d into master Nov 23, 2025
7 checks passed
@butschster butschster deleted the hotfix/smtp-server branch November 23, 2025 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

SMTP endpoint can't accept emails with short message body

2 participants