Bill Schoolfield | 5 Apr 2006 18:06
Favicon

sendmail issues

Hello All,

We utilize sendmail's -odq feature to deposit outbound mail in the queue 
for performance reasons (we send 1000's of emails from our software).

At first glance there doesn't appear to be a way to pass these arguments 
through nail/mailx to sendmail. If I'm missing some way here, please 
advise.

If not, I'd like a generic way to pass sendmail specific arguments. 
Something like -M <sendmail args here> is what I have in mind. Could we 
get a "sanctioned" way of doing this?

Lastly, the "-r" switch which is passed to sendmail appears to be 
incorrect; at least to my sendmail. My sendmail uses -f for this.

Bill

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
Gunnar Ritter | 6 Apr 2006 12:25
Picon
Favicon

Re: sendmail issues

Bill Schoolfield <bill@...> wrote:

> We utilize sendmail's -odq feature to deposit outbound mail in the queue 
> for performance reasons (we send 1000's of emails from our software).
>
> At first glance there doesn't appear to be a way to pass these arguments 
> through nail/mailx to sendmail. If I'm missing some way here, please 
> advise.

Create a shell script containing «sendmail -odq "$ <at> "» and set
the «sendmail» mailx variable to its location.

It is an odd way to configure such behavior in a mailserver
by passing options from its clients, though.

> If not, I'd like a generic way to pass sendmail specific arguments. 
> Something like -M <sendmail args here> is what I have in mind. Could we 
> get a "sanctioned" way of doing this?

Certainly not as a command line option on its own, but perhaps
as a variable. However, I will not write code for this myself
since my need for this feature is zero.

> Lastly, the "-r" switch which is passed to sendmail appears to be 
> incorrect; at least to my sendmail. My sendmail uses -f for this.

This is a legacy option in mailx that uses a legacy option in
sendmail. Its use is discouraged, but it will not be changed.

	Gunnar
(Continue reading)

Bill Schoolfield | 6 Apr 2006 16:13
Favicon

Re: sendmail issues

Well we actually toggle between different sendmail arg usage and for 
legacy reasons we can't change our code (which references sendmail), so 
the shell script you suggest won't quite do it for us.

We did write a wrapper for sendmail to handle the legacy bit but we 
would still like to get an approved way of sending adhoc sendmail args.

What is wrong with using a command line argument (the -M "<sendmail 
arg>) for this? Either way, we don't mind doing the work as it is very 
minor. What is the process for doing that?

Bill

Gunnar Ritter wrote:
> Bill Schoolfield <bill@...> wrote:
> 
>> We utilize sendmail's -odq feature to deposit outbound mail in the queue 
>> for performance reasons (we send 1000's of emails from our software).
>>
>> At first glance there doesn't appear to be a way to pass these arguments 
>> through nail/mailx to sendmail. If I'm missing some way here, please 
>> advise.
> 
> Create a shell script containing «sendmail -odq "$ <at> "» and set
> the «sendmail» mailx variable to its location.
> 
> It is an odd way to configure such behavior in a mailserver
> by passing options from its clients, though.
> 
>> If not, I'd like a generic way to pass sendmail specific arguments. 
(Continue reading)

Gunnar Ritter | 6 Apr 2006 16:32
Picon
Favicon

Re: sendmail issues

Bill Schoolfield <bill@...> wrote:

> What is wrong with using a command line argument (the -M "<sendmail 
> arg>) for this?

It is less flexible than a variable and consumes an option letter.

> Either way, we don't mind doing the work as it is very 
> minor. What is the process for doing that?

Send a patch.

	Gunnar

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
Matthew Fischer | 7 Apr 2006 08:54
Picon

[PATCH] garbled ISO-2022-JP message

Mailx can garble a message when performing character set conversion if
the output buffer is not initially large enough. I ran into this problem
converting ISO-2022-JP to UTF-8. The reason is that an error (E2BIG in
this case) can leave the conversion in a non-initial state, and it will
produce garbage when the buffer is reallocated and the conversion is
reattempted. The attached patch fixes this.

Matthew

--- mailx-12.0/mime.c.orig	2006-03-03 18:01:19.000000000 -0600
+++ mailx-12.0/mime.c	2006-04-07 00:18:55.000000000 -0500
 <at>  <at>  -1049,6 +1049,7  <at>  <at> 
 				if (iconv_ft(fhicd, &iptr, &inleft,
 						&nptr, &outleft) != 0 &&
 						errno == E2BIG) {
+					iconv(fhicd, NULL, NULL, NULL, NULL);
 					mime_fromhdr_inc(inleft);
 					goto again;
 				}
 <at>  <at>  -1489,6 +1490,7  <at>  <at> 
 		iptr = ptr;
 		if (iconv_ft(iconvd, &iptr, &inleft, &nptr, &outleft) != 0 &&
 				errno == E2BIG) {
+			iconv(iconvd, NULL, NULL, NULL, NULL);
 			ac_free(mptr);
 			mptrsz += inleft;
 			mptr = ac_alloc(mptrsz + 1);

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
(Continue reading)

Gunnar Ritter | 7 Apr 2006 11:25
Picon
Favicon

Re: [PATCH] garbled ISO-2022-JP message

Matthew Fischer <futhark@...> wrote:

> Mailx can garble a message when performing character set conversion if
> the output buffer is not initially large enough. I ran into this problem
> converting ISO-2022-JP to UTF-8. The reason is that an error (E2BIG in
> this case) can leave the conversion in a non-initial state, and it will
> produce garbage when the buffer is reallocated and the conversion is
> reattempted. The attached patch fixes this.

Thank you, I have integrated it.

	Gunnar

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642

Gmane