| [FrontPage] [TitleIndex] [WordIndex]

# TmdaBouncedDeletePendingHowto

# Introduction

I just started using tmda on spam reconized by Spamassassin. My main concern with SA is to miss an important message when browsing and deleting the list of spam. Using Tmda would at least make the sender aware of the mistake and the deletion would be automatic. But I think that I still will browse the pending list for mistakes, at least for a while.

But since most of the spam does not have a valid sender address and they bounce, automatically deleting the message that wont get confirmed anyway seem like good solution. Using Sender address verification on SMTP level would be another solution, but I didn't like the problems described in Postfix on this issue.

So this is what I hacked together

# Deletion of pending messages from bounced confirmations

This describes to set-up automated deletion of pending messages from bounced confirmation

I have created two script that does this:

bounce address.py extract the bounced address from bounce message. Some heuristics is involved, since the format of the message is different from MTA.

deletepending from bouncemsg.sh uses the bounce address to find the message id in the pending queue and then does a deletion.

If you have the system set up as described in the FAQ (4.7. How do I prevent my postmaster from getting all my bounced confirmation requests), then you can change drop rule to:

    to thl-spambounce@catseye.net deliver=|~/delete_pending_from_bouncemsg.sh >> ~/.tmda/logs/delete_pending

Mark Horn tackled this same problem in a different manner. delpenbounce parses the bounced message looking for the confirm address that was used. From that, it extracts the ID of the message in the pending queue and deletes it. This works perfectly when the email system that sends the bounce includes the original email in the bounce. This can be used by:

1. Setting BOUNCE_ENV_SENDER, e.g.

       BOUNCE_ENV_SENDER = "mark-devnull@hornclan.com"

2. Setting the following incoming filter rule:

       to mark-devnull@hornclan.com deliver=|~/bin/delpenbounce

2007-07-30 15:45