Morten Trab wrote:
Hi,

I’ve tried to export the USERn and HOSTn vars using the vpopmail-vdir script
(a modified version) which is looking like this:

...
export USERn
export HOSTn
...

Unfortunately, this won't work.

The vpopmail-vdir script is run as a sub-process of TMDA. Environment variables are only inherited by a child of a process that has them set, not by a parent.

You could try:

* Get your MTA to set the variables.

* Don't have your MTA run TMDA directly, but instead run a wrapper script, and have that set the environment variables, then run TMDA.

* Instead of importing the variables from the environment from /etc/tmdarc, shell out to some script that prints out the values, and capture the script's STDOUT. /etc/tmdarc is real Python code, so you can write pretty much what you want if you know Python...
_____________________________________________
tmda-users mailing list ([email protected])
http://tmda.net/lists/listinfo/tmda-users

Reply via email to