Rahul Dhesi:
> There is a second problem for which the fix is not so elegant. If Gmail 
> detects spam but returns a temporary error, the spam will remain in the 
> queue until its lifetime expires. The only way I found of dealing with 
> this is to run a cron job that does 'mailq', finds Gmail spam-bounce 
> messages, and calls postsuper -d to delete those queue-ids.

There is no need for doing that.  Postfix >= 3.0 has a delivery
status filter that can map specific 4xx responses to 5xx ones.

See examples in:
http://www.postfix.org/postconf.5.html#default_delivery_status_filter
(this was originally designed to turn soft TLS errors into hard ones).

> RFC IDEA
> 
> Anybody interested, please propose spam-specific error codes for SMTP and 
> draft an RFC. Then any site rejecting mail as spam would use those error 
> codes, and allow sending sites to handle those bounces differently from 
> other non-spam bounces. The closest I can find is
> 
>    X.7.1 Delivery not authorized, message refused
> 
> which is quite vague.

You're looking an an update for RFc 5248 (A Registry for SMTP
Enhanced Mail System Status Codes).

        Wietse

Reply via email to