diff -ruN sendmail-8.12.5/include/libmilter/mfapi.h sendmail-8.12.5_pylon/include/libmilter/mfapi.h
--- sendmail-8.12.5/include/libmilter/mfapi.h	Tue Jun  4 07:06:40 2002
+++ sendmail-8.12.5_pylon/include/libmilter/mfapi.h	Wed Aug 21 14:17:36 2002
@@ -131,6 +131,7 @@
 #define SMFIF_ADDRCPT	0x00000004L	/* filter may add recipients */
 #define SMFIF_DELRCPT	0x00000008L	/* filter may delete recipients */
 #define SMFIF_CHGHDRS	0x00000010L	/* filter may change/delete headers */
+#define SMFIF_SETSENDER	0x00000040L	/* filter may delete recipients */
 #if _FFR_QUARANTINE
 # define SMFIF_QUARANTINE 0x00000020L	/* filter may quarantine envelope */
 #endif /* _FFR_QUARANTINE */
@@ -364,6 +365,15 @@
 **	char *headerv; New header field value (empty for delete header)
 */
 
+LIBMILTER_API int smfi_setsender __P((SMFICTX *, char *));
+
+/*
+**  Set the sender (from value) of the envelope
+**
+**	SMFICTX *ctx; Opaque context structure
+**	char *sender; New sender value
+*/
+
 LIBMILTER_API int smfi_addrcpt __P((SMFICTX *, char *));
 
 /*
diff -ruN sendmail-8.12.5/include/libmilter/mfdef.h sendmail-8.12.5_pylon/include/libmilter/mfdef.h
--- sendmail-8.12.5/include/libmilter/mfdef.h	Wed Sep 12 20:02:19 2001
+++ sendmail-8.12.5_pylon/include/libmilter/mfdef.h	Sat Aug 24 17:06:41 2002
@@ -25,9 +25,9 @@
 /* These apply to SMFIF_* flags */
 #define SMFI_V1_ACTS	0x0000000FL	/* The actions of V1 filter */
 #if _FFR_QUARANTINE
-# define SMFI_V2_ACTS	0x0000003FL	/* The actions of V2 filter */
+# define SMFI_V2_ACTS	0x0000007FL	/* The actions of V2 filter */
 #else /* _FFR_QUARANTINE */
-# define SMFI_V2_ACTS	0x0000001FL	/* The actions of V2 filter */
+# define SMFI_V2_ACTS	0x0000005FL	/* The actions of V2 filter */
 #endif /* _FFR_QUARANTINE */
 #define SMFI_CURR_ACTS	SMFI_V2_ACTS	/* The current version */
 
@@ -61,6 +61,7 @@
 # define SMFIR_CHGHEADER	'm'	/* change header */
 # define SMFIR_PROGRESS		'p'	/* progress */
 # define SMFIR_REJECT		'r'	/* reject */
+# define SMFIR_SETSENDER	's'	/* set envelope sender (from) */
 # define SMFIR_TEMPFAIL		't'	/* tempfail */
 # define SMFIR_ADDHEADER	'h'	/* add header */
 # define SMFIR_REPLYCODE	'y'	/* reply code etc */
diff -ruN sendmail-8.12.5/libmilter/docs/api.html sendmail-8.12.5_pylon/libmilter/docs/api.html
--- sendmail-8.12.5/libmilter/docs/api.html	Sat Jul 22 02:33:36 2000
+++ sendmail-8.12.5_pylon/libmilter/docs/api.html	Wed Aug 21 15:32:51 2002
@@ -91,6 +91,9 @@
 <tr><td><a href="smfi_delrcpt.html">smfi_delrcpt</a></td><td>Delete a recipient
 from the envelope.</td><td>SMFIF_DELRCPT</td></tr>
 
+<tr><td><a href="smfi_setsender.html">smfi_setsender</a></td><td>Set the envelope 
+sender.</td><td>SMFIF_SETSENDER</td></tr>
+
 <tr><td><a href="smfi_replacebody.html">smfi_replacebody</a></td><td>Replace the
 body of the message.</td><td>SMFIF_CHGBODY</td></tr>
 
diff -ruN sendmail-8.12.5/libmilter/docs/smfi_setsender.html sendmail-8.12.5_pylon/libmilter/docs/smfi_setsender.html
--- sendmail-8.12.5/libmilter/docs/smfi_setsender.html	Thu Jan  1 01:00:00 1970
+++ sendmail-8.12.5_pylon/libmilter/docs/smfi_setsender.html	Wed Aug 21 14:27:44 2002
@@ -0,0 +1,78 @@
+<html>
+<head><title>smfi_setsender</title></head>
+<body>
+<h1>smfi_setsender</h1>
+
+<table border="0" cellspacing=4 cellpadding=4>
+<!---------- Synopsis ----------->
+<tr><th valign="top" align=left width=150>SYNOPSIS</th><td>
+<pre>
+#include &lt;libmilter/mfapi.h&gt;
+int smfi_setsender(
+	SMFICTX *ctx;
+	char *sender;
+);
+</pre>
+Set the sender in the current message's envelope.
+</td></tr>
+
+<!----------- Description ---------->
+<tr><th valign="top" align=left>DESCRIPTION</th><td>
+<table border="1" cellspacing=1 cellpadding=4>
+<tr align="left" valign=top>
+<th width="80">Called When</th>
+<td>Called only from <a href="xxfi_eom.html">xxfi_eom</a>.</td>
+</tr>
+<tr align="left" valign=top>
+<th width="80">Effects</th>
+<td>smfi_setsender sets the sender (from) value in the current message's envelope to the given name.</td>
+</tr>
+</table>
+
+<!----------- Arguments ---------->
+<tr><th valign="top" align=left>ARGUMENTS</th><td>
+    <table border="1" cellspacing=0>
+    <tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr>
+    <tr valign="top"><td>ctx</td>
+	<td>Opaque context structure.
+	</td></tr>
+    <tr valign="top"><td>sender</td>
+	<td>The new envelope sender, a non-NULL, null-terminated string.
+	</td></tr>
+    </table>
+</td></tr>
+
+<!----------- Return values ---------->
+<tr>
+<th valign="top" align=left>RETURN VALUES</th> 
+
+<td>smfi_setsender will fail and return MI_FAILURE if:
+<ul>
+    <li>sender is NULL.
+    <li>Adding headers in the current connection state is invalid.
+    <li>A network error occurs.
+    <li>SMFIF_SETSENDER was not set when <a href="smfi_register.html">smfi_register</a> was called.
+</ul>
+Otherwise, it will return MI_SUCCESS
+</td>
+</tr>
+
+<!----------- Notes ---------->
+<tr align="left" valign=top>
+<th>NOTES</th> 
+<td>
+</td>
+</tr>
+
+</table>
+
+<hr size="1">
+<font size="-1">
+Copyright (c) 2002 futureLAB AG and its suppliers.
+All rights reserved.
+<br>
+By using this file, you agree to the terms and conditions set
+forth in the <a href="LICENSE.txt">LICENSE</a>.
+</font>
+</body>
+</html>
diff -ruN sendmail-8.12.5/libmilter/smfi.c sendmail-8.12.5_pylon/libmilter/smfi.c
--- sendmail-8.12.5/libmilter/smfi.c	Wed May  1 00:22:02 2002
+++ sendmail-8.12.5_pylon/libmilter/smfi.c	Wed Aug 21 14:49:59 2002
@@ -171,6 +171,35 @@
 }
 
 /*
+**  SMFI_SETSENDER -- send the new envelope sender to the MTA
+**
+**	Parameters:
+**		ctx -- Opaque context structure
+**		sender -- new envelope sender
+**
+**	Returns:
+**		MI_SUCCESS/MI_FAILURE
+*/
+
+int
+smfi_setsender(ctx, sender)
+	SMFICTX *ctx;
+	char *sender;
+{
+	size_t len;
+	struct timeval timeout;
+
+	if (sender == NULL || *sender == '\0')
+		return MI_FAILURE;
+	if (!mi_sendok(ctx, SMFIF_SETSENDER))
+		return MI_FAILURE;
+	timeout.tv_sec = ctx->ctx_timeout;
+	timeout.tv_usec = 0;
+	len = strlen(sender) + 1;
+	return mi_wr_cmd(ctx->ctx_sd, &timeout, SMFIR_SETSENDER, sender, len);
+}
+
+/*
 **  SMFI_REPLACEBODY -- send a body chunk to the MTA
 **
 **	Parameters:
diff -ruN sendmail-8.12.5/sendmail/milter.c sendmail-8.12.5_pylon/sendmail/milter.c
--- sendmail-8.12.5/sendmail/milter.c	Thu Jun 13 00:33:48 2002
+++ sendmail-8.12.5_pylon/sendmail/milter.c	Wed Aug 21 14:11:00 2002
@@ -2849,6 +2849,54 @@
 	return;
 }
 /*
+**  MILTER_SETSENDER -- Set the envelope sender of the message
+**
+**	Parameters:
+**		response -- encoded form of sender address.
+**		rlen -- length of response.
+**		e -- current envelope.
+**
+**	Returns:
+**		none
+*/
+
+static void
+milter_setsender(response, rlen, e)
+	char *response;
+	ssize_t rlen;
+	ENVELOPE *e;
+{
+	char *delimptr;
+	
+	if (tTd(64, 10))
+		sm_dprintf("milter_setsender: ");
+
+	/* sanity checks */
+	if (response == NULL)
+	{
+		if (tTd(64, 10))
+			sm_dprintf("NULL response\n");
+		return;
+	}
+
+	if (*response == '\0' ||
+	    strlen(response) + 1 != (size_t) rlen)
+	{
+		if (tTd(64, 10))
+			sm_dprintf("didn't follow protocol (total len)\n");
+		return;
+	}
+
+	if (tTd(64, 10))
+		sm_dprintf("%s\n", response);
+	if (MilterLogLevel > 8)
+		sm_syslog(LOG_INFO, e->e_id, "Milter set: sender %s",
+			  response);
+	delimptr = NULL;
+	(void) setsender(response, e, &delimptr, ' ', false);
+	return;
+}
+/*
 **  MILTER_REPLBODY -- Replace the current data file with new body
 **
 **	Parameters:
@@ -3701,6 +3749,17 @@
 				milter_delrcpt(response, rlen, e);
 				break;
 
+			  case SMFIR_SETSENDER:
+				if (!bitset(SMFIF_SETSENDER, m->mf_fflags))
+				{
+					if (MilterLogLevel > 9)
+						sm_syslog(LOG_WARNING, e->e_id,
+							  "milter_data(%s): lied about setting sender, honoring request anyway",
+							  m->mf_name);
+				}
+				milter_setsender(response, rlen, e);
+				break;
+
 			  case SMFIR_REPLBODY:
 				if (!bitset(SMFIF_MODBODY, m->mf_fflags))
 				{
