environment variable based on authentication/sender address/recipient address?
Unfortunately, that isn’t possible because of the way environment variables work. Some background: Environment variables are set when a program is started. Most of the time, we care about them because the login shell (e.g. bash) keeps a list of environment variables that it sets for every process that it starts (i.e. when commands are typed at the prompt). However, each process that runs on a system has an environment, set by the process that started it (the parent process). Once the child process has been started, the parent process cannot alter its environment any more. More background: When the RELAYCLIENT environment variable is set before qmail-smtpd is started, qmail will allow the connection to relay. Typically, RELAYCLIENT is set in the access file (e.g. /etc/tcp.smtp) based on the IP address of the remote server. spamdyke must determine what environment variables to set before it starts the qmail-smtpd process (because after qmail-smtpd has been started, spamdyke can’t change