On 11/16/2012 11:53 AM, Pascal Volk wrote:
On 11/16/2012 04:27 AM Chuck Cochems wrote:
…
this is, of course, because getenv() no longer functions lie it used to
in plugins.

so i need a replacement for getenv("IP") and getenv("USER") to make this
work.

AFAIR: getenv was replaced by mail_user_plugin_getenv

,--[ lib-storage/mail-user.h ]--
| /* If name exists in plugin_envs, return its value. */
| const char *mail_user_plugin_getenv(struct mail_user *user, const char *name);
`--


Ye, but it requires the user struct to be passed as a parameter, which this plugin doesn't even use.

Also, it seems the ip address is stored in a different format than used by the old getenv("IP") (which was a string)

I need to return both the IP and the email address as a string to drop it into the old code.

I attempted to use the drac plugin as a base (the new 2.0 compatible one) but i found the code hard to follow, and also DRAC seems to just use the IP, while whoson also uses the email address.

Reply via email to