-/* $Cambridge: exim/src/src/rda.c,v 1.9 2005/08/02 13:43:04 ph10 Exp $ */
+/* $Cambridge: exim/src/src/rda.c,v 1.15 2008/12/18 13:13:54 michael Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
*************************************************/
-/* Copyright (c) University of Cambridge 1995 - 2005 */
+/* Copyright (c) University of Cambridge 1995 - 2007 */
/* See the file NOTICE for conditions of use and distribution. */
/* This module contains code for extracting addresses from a forwarding list
options the options bits
include_directory restrain to this directory
sieve_vacation_directory passed to sieve_interpret
+ sieve_enotify_mailto_owner passed to sieve_interpret
sieve_useraddress passed to sieve_interpret
sieve_subaddress passed to sieve_interpret
generated where to hang generated addresses
static int
rda_extract(redirect_block *rdata, int options, uschar *include_directory,
- uschar *sieve_vacation_directory, uschar *sieve_useraddress,
- uschar *sieve_subaddress, address_item **generated, uschar **error,
- error_block **eblockp, int *filtertype)
+ uschar *sieve_vacation_directory, uschar *sieve_enotify_mailto_owner,
+ uschar *sieve_useraddress, uschar *sieve_subaddress,
+ address_item **generated, uschar **error, error_block **eblockp,
+ int *filtertype)
{
uschar *data;
if (rdata->isfile)
{
- int yield;
+ int yield = 0;
data = rda_get_file_contents(rdata, options, error, &yield);
if (data == NULL) return yield;
}
return FF_ERROR;
}
frc = sieve_interpret(data, options, sieve_vacation_directory,
- sieve_useraddress, sieve_subaddress, generated, error);
+ sieve_enotify_mailto_owner, sieve_useraddress, sieve_subaddress,
+ generated, error);
}
expand_forbid = old_expand_forbid;
options options to pass to the extraction functions,
plus ENOTDIR and EACCES handling bits
include_directory restrain :include: to this directory
- sieve_vacation_directory directory passed to sieve_interpret()
+ sieve_vacation_directory directory passed to sieve_interpret
+ sieve_enotify_mailto_owner passed to sieve_interpret
sieve_useraddress passed to sieve_interpret
sieve_subaddress passed to sieve_interpret
ugid uid/gid to run under - if NULL, no change
int
rda_interpret(redirect_block *rdata, int options, uschar *include_directory,
- uschar *sieve_vacation_directory, uschar *sieve_useraddress,
- uschar *sieve_subaddress, ugid_block *ugid, address_item **generated,
- uschar **error, error_block **eblockp, int *filtertype, uschar *rname)
+ uschar *sieve_vacation_directory, uschar *sieve_enotify_mailto_owner,
+ uschar *sieve_useraddress, uschar *sieve_subaddress, ugid_block *ugid,
+ address_item **generated, uschar **error, error_block **eblockp,
+ int *filtertype, uschar *rname)
{
int fd, rc, pfd[2];
int yield, status;
Ustrstr(data, ":include:") == NULL)) /* and there's no :include: */
{
return rda_extract(rdata, options, include_directory,
- sieve_vacation_directory, sieve_useraddress, sieve_subaddress,
- generated, error, eblockp, filtertype);
+ sieve_vacation_directory, sieve_enotify_mailto_owner, sieve_useraddress,
+ sieve_subaddress, generated, error, eblockp, filtertype);
}
/* We need to run the processing code in a sub-process. However, if we can
/* Now do the business */
yield = rda_extract(rdata, options, include_directory,
- sieve_vacation_directory, sieve_useraddress, sieve_subaddress, generated,
- error, eblockp, filtertype);
+ sieve_vacation_directory, sieve_enotify_mailto_owner, sieve_useraddress,
+ sieve_subaddress, generated, error, eblockp, filtertype);
/* Pass back whether it was a filter, and the return code and any overall
error text via the pipe. */
read(fd, &yield, sizeof(int)) != sizeof(int) ||
!rda_read_string(fd, error)) goto DISASTER;
-DEBUG(D_route)
- debug_printf("rda_interpret: subprocess yield=%d error=%s\n", yield, *error);
-
/* Read the contents of any syntax error blocks if we have a pointer */
if (eblockp != NULL)
}
}
+DEBUG(D_route)
+ debug_printf("rda_interpret: subprocess yield=%d error=%s\n", yield, *error);
+
if (had_disaster)
{
*error = string_sprintf("internal problem in %s: failure to transfer "