View Single Post
Old 22 Jan 2021, 01:53 PM   #4
n5bb
Intergalactic Postmaster
 
Join Date: May 2004
Location: Irving, Texas
Posts: 8,929
Arrow Envelope address used for delivery if no TO or CC header is present

Look carefully at the full headers of one of those “Undelivered Mail Returned to Sender” messages. My guess is that there is no “To” header, or if it’s present your address is not in “To” or “Cc”. So your spam filtering rule is looking at only the “To” or “Cc” header, it will fail to work on those messages.

If you use the standard rule “To/Cc/Bcc” rule it should catch such messages, since it also looks at the “X-Delivered-to” header.

Messages arrive at the Fastmail server based on the envelope address, not the To or Cc address. This explains how BCC messages make it to you with no To or Cc shown in the full headers. The “X-Delivered-to” header shows the address used by Fastmail to find the delivery account using the aliases assigned to each account. If a “To” or “Cc” header includes your address, it is used to create “X-Delivered-to”. But if there are is no “To” or “Cc” header, the envelope address of the received message is used instead. The “ X-Resolved-to” header shows the target delivery address assigned when the sieve script is executed. If the sieve script doesn’t discard the message, it will be delivered to the Fastmail account and folder (using plus+addressing) assigned by the Aliases screen setting for that alias.

If you are not currently using a certain alias and spam is arriving for that alias, you should open the Aliases setup screen and disable that alias, which will “Reject (bounce) all mail sent to this address (disable the alias)”. If it’s an alias at a domain you own and you have the wildcard alias enabled, just create a new alias you need to block and disable that alias in the Aliases setup screen. This only works if you want to ignore ALL messages sent to that alias.

Bill
n5bb is offline   Reply With Quote