g...@prideaux.id.au wrote: >Is there a way to reject non-subscribers at the time of their initial SMTP >conversation, as opposed to either rejecting them later (with an >associated bounce message) or silently discarding them?
Maybe. >I don't want to generate bounce messages because of the back-scatter they >generate, but silently discarding is also bad: non-spam senders should get >some notification that their message has failed. Right. >I'm using exim4 and it seems likely that there is a way to have exim check >whether mailman is willing to accept the message at SMTP time. > >Is this something that others have done? I thought it would have been a >fairly common requirement but I haven't been able to find any clear notes >on how to do it. I am not aware of anyone who has done this either in Exim or other MTAs. My first thought is it would be fairly easy to create a script to test for list membership that Exim could use in either the router or transport or possibly an acl to do this, but I don't know enough Exim to say exactly how to do the Exim part of this. However, this is problematic because Exim only knows the envelope sender and recipient, and tests for Mailman's tests for list membership and ability to post are based on much more than just envelope sender. Another way to do this would be to modify Mailman's scripts/post script to do the tests and return a failure exit code if posting isn't allowed. This would work with any MTA and would cause the pipe to mailman to fail which should be reported to the sending MTA. The problem with this approach is circumstances such as a very large list or perhaps a list lock could cause the post script to be timed out by the MTA. Ideally, this would be reported back to the sending MTA as a retryable (4xx) status, but maybe not. The issue is to do the test correctly, you have to look at all the headers that Mailman/Handlers/Moderate.py looks at to determine membership, and then look also at *_these_nonmembers and generic_nonmember_action. In other words, what post would need to do is parse the message into a Mailman.Message.Message() object, instantiate the list, possibly call Mailman.Handlers.Approve.process() to look for an Approved: header, call Mailman.Handlers.Moderate.process() and process the various exceptions it raises for Reject, Hold or Discard, and then either queue the post or exit with failure. That's a lot of extra work for something that now only queues the post. -- Mark Sapiro <m...@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan ------------------------------------------------------ Mailman-Users mailing list Mailman-Users@python.org http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://wiki.list.org/x/AgA3 Security Policy: http://wiki.list.org/x/QIA9 Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-users/archive%40jab.org