On Tue 01/Mar/2016 23:36:33 +0100 Sam Varshavchik wrote: > Christopher Rüprich writes: > >> I'm using BLACKLISTS='-block=[...],BLOCK2' in /etc/courier/esmtp to >> check incoming mail against a couple of dns-blacklists. I'd like to make >> the result available to a maildrop-script in delivery mode, so I can >> deliver junk-mails directly to the users junk-folder. >> >> As far as I know BLOCK2 is not available in delivery mode. In embedded >> mode, maildrop doesn't allow the xfilter-command, so I also cannot >> insert an X-Spam-header to pass the result of the check to the delivery >> module using $/.mailfilters/rcptfilter. Is there any other way to make >> the content of BLOCK2 available to the delivery module? I feel I am >> missing something obvious as I'm sure I am not the only one trying to >> use BLOCK2 in the delivery module. > > This would require custom programming. The esmtp server does not deliver the > message itself. The message gets added to the mail queue, and a separate > process handles the eventual delivery. > > As such, the esmtp server's environment is not accessible when mail gets > delivered, and in most likelyhood the entire process is gone by then. > > A custom courierfilter plugin can add a header to the received mail, based on > the BLOCK2 environment variable, which will make it available during delivery. > This will require custom programming. > > That's the state of things today. I might be sufficiently motivated to add a > configurable option to have the contents of BLOCK2, or any other variable, get > added to the headers of received mail, so that it can be filterable upon > delivery.
I guess those are the “_IP”, “_TXT”, and “_ZONE” variables mentioned in http://www.courier-mta.org/couriertcpd.html#idm255210593888 For whitelists, Courier adds an Authentication-Result: dnswl=pass header field. It could do the same for blacklists. However, "dnsbl=pass" would sound ambiguous to me. Some different code, such as "dnsbl=bad", may be clearer. Ale -- ------------------------------------------------------------------------------ Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140 _______________________________________________ courier-users mailing list courier-users@lists.sourceforge.net Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users