Hmmm - silence eh? What about some way I could set environment variables before calling maildrop and then import them from there?
Would it be possible (instead of using default delivery to maildrop) to do default delivery to another program, which could set up the environment for maildrop with all the extra varables needed for filtering, and then call maildrop? How would that work? I can write that script, just need to know if I'm on the right track? Instead of: DEFAULTDELIVERY="| exec /usr/lib/courier/bin/maildrop" I could call: DEFAULTDELIVERY="| exec /mydeliveryprogram" Which does it's database queries, sets up environment variables, and calls maildrop. Maildrop can then import the know environment variables needed, run, and exit. my program would then exit with the return code given by maildrop. The internals of my program I can deal with - just curious if there is some agreement that this is a good way to proceed? Thanks in advance, m/ -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Mitch (WebCob) Sent: Wednesday, November 19, 2003 11:40 AM To: [EMAIL PROTECTED] Subject: [courier-users] Importing variables from an external program in maildrop? Finally getting to pursue this problem further... I need to bring in a variety of varables to make decisions in maildrop for mail forwarding, etc. I have all the required info in a database, and would like to EFFICIENTLY bring this information into maildrop so I can write rules based on the values. The goal is one centralized maildroprc which could call an external program to obtain required information. I'd like to avoid multiple program calls for efficientcy - no point in a call per variable if I can avoid it, so I was thinking of writing a single PHP or PERL program (eventually C, but that's not my forte, so I'll work with my familiars until the concept is hammered out). So if such a program produces results similar to: VALUE1=value VALUE2=value What's the best way of integrating it into a maildrop script and turning that text into set variables inside maildrop? There will be a limited and known number of values, I'm just looking for the most efficient way to avoid: VALUE1=`programtogetvalue1` VALUE2=`programtogetvalue2` Something like: VALUESARRAY=`programtogetallvalues` Any ideas? might be like a foreach or something? Thanks a bunch. m/ ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ courier-users mailing list [EMAIL PROTECTED] Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ courier-users mailing list [EMAIL PROTECTED] Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users
