Get your free beta license ↗
Mail · Postfix

A mail account is sending spam

Last updated 30 Nov 2026
Summary

The Postfix queue fills with messages from one mail account, and other servers start refusing mail from your server. Someone is sending with that mail account's password, and a few commands stop outgoing mail from the account, clear its queued messages and lock the sender out.

Symptoms

urbestack-mail-queue-list shows hundreds or thousands of messages with the same sender. Receiving servers start deferring or refusing mail from your server.

Check the mail trace for the sender.

urbestack-mail-trace --q user@example.com --dir sender

In the abuse section, compromised is true. The trace shows which rules fired, such as hourly_limit, outbound_spam or burst_from_new_ip. It reports counts for the IP addresses the mail account sent from in ip_count and new_ips.

Cause

Someone has the mail account's password and uses SMTP authentication to send through the server.

Resolution

  1. Suspend outgoing mail for the mail account and close its open sessions. The account can still receive and read mail.

    urbestack-mail-account-set --address user@example.com --outgoing off --end-sessions
  2. From then on, an attempt to send using that login gets this rejection.

    Output
    554 5.7.1 <user@example.com>: SASL login name rejected: Outgoing mail is suspended for this account
  3. Delete the queued messages from that sender. The sender receives no notification.

    urbestack-mail-queue-del --sender user@example.com
  4. Set a new password. The command reads it from the first line of standard input.

    urbestack-mail-account-set --address user@example.com --password-stdin
  5. Give the new password only to the mail account's owner, then enable outgoing mail for the account again.

    urbestack-mail-account-set --address user@example.com --outgoing on