--- aliasfile.c.orig	Tue Mar 13 15:12:04 2001
+++ aliasfile.c	Tue Mar 13 15:34:21 2001
@@ -78,7 +78,9 @@
   { "syntax_errors_text", opt_stringptr,
       (void *)(offsetof(aliasfile_director_options_block, syntax_errors_text)) },
   { "syntax_errors_to",   opt_stringptr,
-      (void *)(offsetof(aliasfile_director_options_block, syntax_errors_to)) }
+      (void *)(offsetof(aliasfile_director_options_block, syntax_errors_to)) },
+  { "transport_pfr",      opt_bool,
+      (void *)(offsetof(aliasfile_director_options_block, transport_pfr)) }
 };
 
 /* Size of the options list. An extern variable has to be used so that its
@@ -127,10 +129,22 @@
   FALSE,    /* qualify_preserve_domain */
   TRUE,     /* freeze_missing_include */
   TRUE,     /* rewrite */
-  FALSE     /* skip_syntax_errors */
+  FALSE,    /* skip_syntax_errors */
+  FALSE     /* transport_pfr */
 };
 
 
+int
+uses_pfr (struct address_item *a)
+{
+  while (a) {
+    if (a->flags & af_pfr)
+      return 1;
+    a = a->next;
+  }
+  return 0;
+}
+
 
 /*************************************************
 *          Initialization entry point            *
@@ -278,7 +292,7 @@
 /* If there is a transport specified for the director, then set up this
 address to use that transport. Ignore the alias text. */
 
-if (transport != NULL)
+if (transport != NULL && (!ob->transport_pfr))
   {
   addr->transport = transport;
   addr->errors_address = errors_to;
@@ -349,6 +363,17 @@
 /* We are now through with the store in the temporary pool; if there was an
 error, we are done. */
 
+if (transport != NULL && uses_pfr(generated))
+  {
+  addr->transport = transport;
+  addr->errors_address = errors_to;
+  addr->home_dir = dblock->home_directory;
+  addr->current_dir = dblock->current_directory;
+  addr->extra_headers = extra_headers;
+  addr->remove_headers = remove_headers;
+  return route_queue(addr, addr_local, addr_remote, (router_instance *)dblock,
+    &ugid, "director")? OK : ERROR;
+  }
 store_pool = POOL_TEMP;
 store_reset(reset_point);
 store_pool = POOL_MAIN;

--- aliasfile.h.orig	Mon Jan  7 21:30:31 2002
+++ aliasfile.h	Mon Jan  7 21:30:45 2002
@@ -20,6 +20,7 @@
   BOOL  freeze_missing_include;
   BOOL  rewrite;
   BOOL  skip_syntax_errors;
+  BOOL  transport_pfr;
 } aliasfile_director_options_block;
 
 /* Data for reading the private options. */


