4 messages in net.sourceforge.lists.courier-maildropRe: [maildropl] Re: accessing recipie...
FromSent OnAttachments
Ben RosengartJul 8, 2002 3:46 pm 
Sam VarshavchikJul 8, 2002 4:14 pm 
Ben RosengartJul 8, 2002 5:27 pm 
Sam VarshavchikJul 8, 2002 6:07 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [maildropl] Re: accessing recipient address from within maildroprcActions...
From:Ben Rosengart (br+c@panix.com)
Date:Jul 8, 2002 5:27:39 pm
List:net.sourceforge.lists.courier-maildrop

On Mon, Jul 08, 2002 at 07:14:33PM -0400, Sam Varshavchik wrote:

Ben Rosengart writes:

In writing a system maildropfilter, is there any way of programmatically determining the address to which we're delivering? Like a "$TO" to go with "$FROM"?

Check your mail server's documentation. The mail server might be providing the recipient address in an environment variable, which you can read.

I can easily ensure that it does so. But I apologize, I forgot to mention that I'm running maildrop in delivery mode. According to maildropfilter(5):

When running in delivery mode, maildrop does not import the environment for security reasons.

I will have lots of virtual users, so delivery mode seems to be the way maildrop's meant to be used in this situation, yes?

Another point I don't understand in the documentation:

If -d is not specified, the first argument following all the options is a name of the file containing filtering instructions. The remaining arguments, if any, are assigned to the variables $1, $2, and so on (see "Environment" and "Variable substitution").

I tried to use $1 to solve my problem, by calling maildrop with:

-d ${recipient} -f ${sender} ${recipient}

but $1 appeared to be unset. Does the last sentence in the above paragraph refer only to the non-delivery-mode case?

Microsoft has argued that open source is bad for business, but you have to ask, "Whose business? Theirs, or yours?" --Tim O'Reilly