On Fri, Jun 27, 2025 at 07:21:55PM +0300, Uolys wrote:
> I did not find in the man docs on how to sweep up accumulated waste of
> undelivered mail during server testing. Can I safely wipe out all unusual
> content (with dirs and files) in
>
> /var/spool/smtpd/queue
>
> after
>
> smtpctl pause mda
>
> ?
>
>
>From man smtpd:
remove envelope-id | message-id | all
Remove a single envelope, envelopes with the given message
ID, or all envelopes.
So probably "smtpctl remove all" is what you are looking for (assuming
you are *sure* there's nothing else in the queue. Issuing "pause smtp"
and "pause mta" before "remove all" sounds like a good idea.
Or, if they aren't too many envelopes, or you just can't afford to stop
the services, just remove them one by one (not too hard to script, using
the output of "show queue", if needed be).
--