On Mon, 8 Dec 2008 06:49:46 +0100 Magnus Bäck <[EMAIL PROTECTED]> wrote:
> On Monday, December 08, 2008 at 06:36 CET, > Frederick Reeve <[EMAIL PROTECTED]> wrote: > > > I have a working Postfix 2.5.5 setup that uses several rbls. I would > > like to collect the mail being blocked by these rbls but have it all > > delivered to a single local address. I already have local delivery > > working fine. Is this possible in an simple fashion? First off thank you for your reply. :-) > > You can't eat the cake and have it. Rejected messages are not delivered > to anyone, they are returned to sender. > I understood this also this way. However it has come to my attention that It MAY be possible using a milter. If I were to write a simple milter that did the rbl lookups and colected the contents of the message to a file. I could reject at the end I believe. The milter could be very quick. > What you could do is accept the message but redirect it to whatever > address you choose. Postfix alone can't do this, but a custom policy > server could make the RBL lookup and return REDIRECT. The drawback > of this method is that the sender won't be notified about the message > not reaching the intended recipient. Again, if you reject the message > you can't deliver it. > A custom policy server is more or less what I ended up with. It was easier to write than I expected. As for the drawback its not a drawback because the mail is reviewed and can be sent back or forwarded on to dspam which is the purpose of the collection. This "feature" will not be on most of the time just periodically to train the filter. What is rejected with the rbls is about 99.8% spam and the personal review will catch the ones that are not. So I am now using a policy server via 'check_policy_service' and spawn. This policy server does the rbl lookups it self and redirects if one of the rbls is positive. Thank you so much for the idea. I was really not seeing an easy effective way to do it. > Another alternative if you don't need to receive the whole message > is to enable postmaster notification of RBL rejections by setting > notify_classes (there is no setting that enables RBL rejections > specifically, but you can use e.g. procmail to filter out the stuff > you're not interested in). If the number of rejected messages is > reasonably small, perhaps it can be monitored for false positives. > > http://www.postfix.org/postconf.5.html#notify_classes > > [...] > > -- > Magnus Bäck > [EMAIL PROTECTED]