[Exim] Recipients in local_scan()

Top Page
Delete this message
Reply to this message
Author: Joe Doehler
Date:  
To: exim-users
Subject: [Exim] Recipients in local_scan()
Hello:

I am new to this list. I have searched the archives and I have not find the
answers to my questions. I have built Exim 4.21 on a RedHat 7.2 box; it is
working fine, but I cannot get local_scan to do what I want it to do. I am
working on a per-user white-list-like system, and I need to examine each
recipient's white list.

I got two problems.

1- I seem unable to read certain global variables. This code snippet causes
local_scan to crash:

//////////////////////////////////////////////////
int local_scan(int fd, uschar **return_text)
{
char line [80];
char *z;
z = &line[0];
strcpy (z, sender_host_address) ;
return LOCAL_SCAN_ACCEPT;
}
//////////////////////////////////////////////////

whereas the following code snippet works:

////////////////////////////////////////////////////////
int local_scan(int fd, uschar **return_text)
{
char line [80];
char *z;
z = &line[0];
strcpy (z, sender_address) ;
return LOCAL_SCAN_ACCEPT;
}
/////////////////////////////////////////////////////////


2- I cannot read any recipient's address. Everything I have done tried so
far causes local_scan to crash, including the use of expand_string.

It appears that local_scan() is called once per e-mail, not once per
recipient. Are the recipient addresses stored in a global list that
local_scan can read? A code snippet will be appreciated, because any
reference I make to recipient_item stops the compiler: I am overlooking
something simple here.

It appears that some people had problem reading recipient's addresses into
local_scan with Exim 4.1, and I am wondering if fixes were implemented in 4.2.

Thanks in advance,
Joe.