Mail from a new sender arrives minutes late
A message from a sender your server has never seen arrives at least five minutes late after 451 4.7.1 Try again later. Rspamd held it for greylisting, and you can release the sender's held mail or turn off greylisting for a domain.
Symptoms
The message arrives late, or the sender says their server reported a delay. The mail log, /var/log/maillog on AlmaLinux and /var/log/mail.log on Ubuntu, shows this line for the first attempt.
postfix/cleanup[2381]: 901E7C172A: milter-reject: END-OF-MESSAGE from mail.example.org[198.51.100.7]: 4.7.1 Try again later; from=<someone@example.org> to=<user@example.com> proto=ESMTP helo=<mail.example.org>Rspamd's line for the same message shows GREYLIST(0.00){greylisted;...;too early;}.
Cause
Greylisting is on unless an administrator turns it off. It applies only to mail that Rspamd scores at or above 4, or at or above the domain's Junk score if that score is lower. Mail below the threshold passes immediately.
On the first attempt to deliver such a message from a sender Rspamd does not remember, the sending server is told to try again later. The sending server retries on its own. A retry at least five minutes after the first attempt passes greylisting.
Rspamd then remembers the sender for 7 days, as set by mail.greylisting_remember_days. Each new message from that sender restarts the count.
Mail from the large providers listed in mail.greylisting_providers skips greylisting. If a sending server never retries, the held message never arrives.
Resolution
List the sender's held messages to see their
stateandpasses_from. Thestateiswaitinguntil a retry can pass, thenready.urbestack-mail-greylist-list --match someone@example.orgAllow all held mail from
example.orgtoexample.comto pass greylisting on its next retry. Rspamd still scores the retried mail for spam.urbestack-mail-greylist-pass --domain example.com --sender example.orgAdd
--always domainto exempt the sender's domain from greylisting from then on.To turn off greylisting for one domain, run the following command.
urbestack-mail-domain-set --name example.com --greylisting offYou can also let mail that passes SPF skip greylisting across the server.
urbestack-setting-set --key mail.greylisting_skip_spf --json --value true