senn-techsenn-tech
AI & Development
AI & Development2026-01-01· by Mag. (FH) Franz Senn

Email AI: Classification, Routing, and Reply Suggestions Locally

Emails are the backbone of business communication — and simultaneously the biggest source of manual routine work. Classification, routing, reply drafts: a local LLM can handle all three, without any email leaving the premises.

The Pipeline

Incoming → NoSpamProxy → Stalwart → n8n-Trigger → LLM Classification → Routing/Draft
  1. NoSpamProxy: Filters spam and malware, as described in our own article
  2. Stalwart: Receives the clean email and makes it available via IMAP/JMAP
  3. n8n: IMAP trigger for new emails in defined mailboxes
  4. LLM: Classifies content and urgency, generates reply suggestion
  5. n8n: Routes to the responsible handler, saves as ticket note in Zammad

Classification: Who Should Handle It?

The LLM receives a prompt with categories:

Classify the following email into exactly one category:
- support: Technical problems, errors, outages
- order: Quotes, orders, order changes
- invoice: Invoice inquiries, reminders, payment notices
- general: Everything else

Subject: {...}
Body: {...}

The answer is a label — not free text. That’s enough to automatically route 90% of emails into the correct Zammad queue.

Reply Suggestions: Not Full Automation, but a Head Start

Instead of having the email answered fully automatically — which is risky and regulated under the AI Act for high-risk applications — the LLM generates a reply draft:

Write a short, polite reply to the following customer email.
Language: German, style: factual, no marketing fluff.
Mention that processing will occur within 24 h.

The human reviews, adjusts, and clicks send. The time saving lies in drafting the reply — not in delegating responsibility.

Compliance: Why Local?

Emails contain personal data, trade secrets, contract terms. Sent to a cloud AI, all of this leaves your legal jurisdiction. NIS2 and GDPR demand clear data flow documentation — locally, the data flow stays internal.

The LLM runs on your own vLLM server or via llama.cpp on the GPU workstation. No API costs, no compliance questions, no external server writing logs you can’t access.

What Doesn’t (Well) Work

Irony, sarcasm, and heavily dialect-influenced language are not reliably detected by the LLM. Also, sender recognition — is this the managing director or an intern? — requires manual maintenance.

Conclusion

Email AI workflows are the invisible yet highly productive automation we’ve built. No employee sees them — except that emails suddenly land with the right person, accompanied by a usable draft as an attachment.

FAQ
Does a single email leave our own network with this solution?+

No. NoSpamProxy filters spam and malware, Stalwart receives the clean email, and the LLM runs on your own vLLM server or via llama.cpp on the GPU workstation. Classification, routing, and reply drafting happen entirely internally — no API call to a cloud provider, no external log you cannot access. That data-flow clarity is exactly what makes the approach viable for GDPR- and NIS2-relevant mailboxes.

How reliably does the model classify incoming emails?+

Roughly nine in ten emails land automatically in the correct Zammad queue, because the model decides on fixed labels like support, order, invoice, or general — not on free text. The hit rate depends on maintaining the categories and on clean training examples. Weak spots remain irony, sarcasm, and strong dialect, plus sender recognition that occasionally needs manual care.

Does the AI write the replies fully automatically?+

No, and that is deliberate. The model only generates a draft that a human reviews, adjusts, and then sends. A fully automatic reply would be risky and is regulated under the AI Act for high-risk applications. The gain lies in drafting the reply — responsibility stays with the handler. That way you save time without giving up control.