Hi, all. I'm trying to set up an embedded maildrop "content" filter (i.e. smtpfilter) that wants to check the envelope recipient (as specified by the SMTP "RCPT TO" command) against the message headers. The idea is that I want to reject messages containing a windows-executable attachment if the addressee is not explicitly listed in a "To:" or "Cc:" header line.
[ I'm working with Courier-0.43.1. ] But as far as I can tell, the envelope recipient isn't available. The file "courier/module.local/local.c" function rw_local_filter forks and sets up the command line and environment, and putenvs SENDER, HOME, DEFAULT, and MAILDIRQUOTA... but no RECIPIENT. [By contrast, the function "docommand" in courier/module.local/deliver.c (which is used, I believe, to launch the delivery-mode filters) *does* explicitly add RECIPIENT (and I'm amused by the spelling of the variable used to set it!)] So my current thinking is that there's no way an embedded content maildrop filter can know to whom the envelope was addressed (I put a wrapper around maildrop to check out its command line and environment, and there's nothing in either). Which leaves me with the (massively ugly) solution of pulling the username out of HOME (which happens to work, at the moment, but, well, *shudder*!) and the list of domains in "etc/locals" and seeing if I get a match. Or I could try to figure out how to add the RECIPIENT to the environment in rw_local_filter... BUT that seems likely to be far more invasive (i.e. I'm sure I'd break *something* that someone has put a lot of thought into). Or I may have simply missed something! Comments? Malc. ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ courier-users mailing list [EMAIL PROTECTED] Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users
