Import creates mailbox records with an empty username, and they cannot be deleted
Author: zhihuz123Created Sep 14, 2026Updated Sep 14, 2026
Labelsbug
Operating System
Linux
OS Version
CentOS Linux 8
System Architecture
ARM64
Docker Version
Docker version 27.3.1, build ce12230
Docker Compose Version
Docker Compose version v2.27.0
Reproducible in Latest Version?
Yes, occurs in the latest stable release
Reproduction Steps
- Deploy BillionMail (core 4.7.2) and log in.
- Open Mailboxes and click Import.
- Upload a CSV with a
usernamecolumn whose cell is empty:
username,password
,secret123- The import is reported as successful. The list now contains a record with an empty
Username (
local_part='',domain='',maildir='@/',quota=1000). - Click Delete on that row.
The same happens when the header has no username column at all — for example
email,password with two data rows — which collapses every row onto the same empty
identity.
Observed Behavior
Deleting the record always fails:
POST /api/mailbox/delete {"emails":[""]}
→ {"success":false,"code":500,"msg":"No valid email addresses provided"}- The
mailboxrow count is unchanged before and after the request, and the delete never reaches the database. - The record stays in the list; retrying returns the same error.
- The import that created it reported success, so nothing warns the operator. Rows
that
InsertIgnoresilently discarded are counted as imported as well. - Batch delete does not remove it either: the empty identifier is dropped from the request, the other selected rows are deleted, and the response still reports the batch as successful.
Expected Behavior
The record is deleted. username is the primary key of mailbox and PostgreSQL accepts an empty string as a key value, so an empty identifier is a legal — if unwanted — input that a delete must be able to address. A row that exists must be removable from the UI.
Supplemental Information
Source: Billionmail/BillionMail