feat(PROJ-18): E-Mail Integritätsprüfung (SHA-256 Verifikation)
- Storage: VerifyIntegrity, GetAllIDs, GetVerifyStatus + DB-Spalten
- main: Hintergrund-Worker alle 5 Minuten (beim Start sofort: 40/40 OK)
- API: verify_ok + verified_at in GET /api/mails/{id} Antwort
- Frontend: Grüner Haken / graues X / rotes X in Mail-Ansicht
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -548,6 +548,17 @@ func (s *Server) handleGetMail(w http.ResponseWriter, r *http.Request) {
|
||||
dateStr = pm.Date.UTC().Format(time.RFC3339)
|
||||
}
|
||||
|
||||
// Verify status
|
||||
vs, _ := s.store.GetVerifyStatus(r.Context(), id)
|
||||
var verifyOK interface{} = nil
|
||||
var verifiedAt interface{} = nil
|
||||
if vs.VerifyOK != nil {
|
||||
verifyOK = *vs.VerifyOK
|
||||
}
|
||||
if vs.VerifiedAt != nil {
|
||||
verifiedAt = vs.VerifiedAt.UTC().Format(time.RFC3339)
|
||||
}
|
||||
|
||||
writeJSON(w, http.StatusOK, map[string]interface{}{
|
||||
"id": id,
|
||||
"from": pm.From,
|
||||
@@ -560,6 +571,8 @@ func (s *Server) handleGetMail(w http.ResponseWriter, r *http.Request) {
|
||||
"body_plain": pm.TextBody,
|
||||
"raw_headers": extractRawHeaders(raw),
|
||||
"attachments": attachments,
|
||||
"verify_ok": verifyOK,
|
||||
"verified_at": verifiedAt,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user