Bluehost.com Web Hosting $6.95

Re: sendmail -bv -t dumps core (postfix 2.1.0, FreeBSD 4.7-R)

This is a discussion on Re: sendmail -bv -t dumps core (postfix 2.1.0, FreeBSD 4.7-R) within the mailing.postfix.users forums, part of the Mail Servers and Related category; On Wed, Oct 06, 2004 at 03:38:46PM +0200, Phil Regnauld wrote: > > This is because "-bv&...


Go Back   Usenet Forums > Mail Servers and Related > mailing.postfix.users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-06-2004
Victor Duchovni
 
Posts: n/a
Default Re: sendmail -bv -t dumps core (postfix 2.1.0, FreeBSD 4.7-R)

On Wed, Oct 06, 2004 at 03:38:46PM +0200, Phil Regnauld wrote:

> > This is because "-bv" code only supports command-line recipients,
> > but there is not a safeguard against use of "-t", which looks
> > for recipients that were never extracted. A minor bug. "-bv"
> > and "-t" are not compatible.

>
> That was my conclusion as well :)
>


Perhaps you are willing to test the following completely untested
patch (for 2.2-20040919).

Index: src/sendmail/sendmail.c
--- src/sendmail/sendmail.c 29 Aug 2004 01:55:24 -0000 1.1.1.2.2.3
+++ src/sendmail/sendmail.c 6 Oct 2004 16:10:46 -0000
@@ -429,6 +429,7 @@
ARGV *recipients; /* recipients from regular headers */
ARGV *resent_recip; /* recipients from resent headers */
int resent; /* resent flag */
+ int probe; /* trace probe flag */
const char *saved_sender; /* for error messages */
uid_t uid; /* for error messages */
VSTRING *temp; /* scratch buffer */
@@ -456,6 +457,9 @@
{
SM_STATE *state = (SM_STATE *) context;

+ if (state->probe)
+ return;
+
if (rec_put(state->dst, rec_type, buf, len) < 0)
msg_fatal_status(EX_TEMPFAIL,
"%s(%ld): error writing queue file: %m",
@@ -500,6 +504,8 @@
}
myfree((char *) addr_list);
tok822_free_tree(tree);
+ } else if (state->probe) {
+ return;
}

/*
@@ -508,8 +514,11 @@
*/
for (line = start = STR(buf); line; line = next_line) {
next_line = split_at(line, '\n');
- output_text(context, REC_TYPE_NORM, line, next_line ?
- next_line - line - 1 : strlen(line), offset);
+ if (rec_put(state->dst, REC_TYPE_NORM, line,
+ next_line - line - 1 : strlen(line) < 0)
+ msg_fatal_status(EX_TEMPFAIL,
+ "%s(%ld): error writing queue file: %m",
+ state->saved_sender, (long) state->uid);
}
}

@@ -658,7 +667,9 @@
*cpp, cpp[1] ? "," : "");
}
}
- } else {
+ }
+
+ if (!DEL_REQ_TRACE_ONLY(flags) || (flags & SM_FLAG_XRCPT)) {

/*
* Initialize the MIME processor and set up the callback context.
@@ -668,6 +679,7 @@
state.recipients = argv_alloc(2);
state.resent_recip = argv_alloc(2);
state.resent = 0;
+ state.probe = DEL_REQ_TRACE_ONLY(flags);
state.saved_sender = saved_sender;
state.uid = uid;
state.temp = vstring_alloc(10);

--
Viktor.

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the "Reply-To" header.

To unsubscribe from the postfix-users list, visit
http://www.postfix.org/lists.html or click the link below:
<mailto:majordomo@postfix.org?body=unsubscribe%20p ostfix-users>

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 08:04 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0