Re: qmail ignores my sorry ass part II...

2001-05-17 Thread Mark Delany

On Thu, May 17, 2001 at 12:25:43PM -0700, Brett wrote:
 Ok, thanks. Here's some more info:
 
 I'm trying to send the mail with qmail-inject from the command line. I
 checked and the exit code I'm getting is 65280. I meant 5600 addresses,
 not messages, and yes, that's more or less how I'm placing the addresses
 except I'm doing it from a perl script that puts the addresses in a Bcc
 field and then makes a system() call which is just like calling from the

Bcc field?

Do you mean these address are on the command line or in the headers of
the message? The difference is a lot more than more or less. In fact
the difference is critical. If the latter then you have a different
problem from what I suggested. If the former, then change to the
latter as that's the best way as you cannot normally increase the
command line limits without kernel rebuilds.


Regards.


 command line. I think you may be onto something here with your theory of my
 being over the limit of command line arguments. The question is how do I
 increase that limit? And now I'm suddenly off-topic for this list, I know.
 Nevertheless, I'm sure I won't be the last qmail user to run into this
 problem and therefore it'll be useful to have this knowledge in the
 archives. Thanks again.
 
 
 -Original Message-
 From: Mark Delany [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, May 16, 2001 6:17 PM
 To: [EMAIL PROTECTED]
 Subject: Re: qmail ignores my sorry ass...
 
 
 You need to tell us a little more. Well, actually a lot more.
 
 How are you trying to send them? qmail-inject, smtp, qmail-queue?
 
 If you are running a command such as qmail-inject, what sort of exit
 code are you getting? Any error message?
 
 Do you mean 5600 emails or an email to 5600 addresses? If the latter,
 are you placing all the recipients on a command line, something like:
 
 /var/qmail/bin/qmail-inject recipient1@dom1 recipient2@dom2 ...
 
 ?
 
 If so, have you perhaps exceeded the maximum length of the command
 line for your system? Are you perhaps exceeding the maximum number of
 command line arguments for your system?
 
 To check the exit status from the shell, go echo $? immediately
 after the command. The number is zero if all is well and other numbers
 indicate different types of errors.
 
 
 Regards.
 
 
 On Wed, May 16, 2001 at 04:37:41PM -0700, Brett wrote:
  ... when I try to send more than 5600 emails in one go. I mean, it
  completely ignores me. There's no mention of anything occuring in the logs
  whatsoever. Since I'm giving you so little to go on here, I'm mostly
 hoping
  for a general direction to start looking for a problem rather than a
  complete solution. Or hopefully this has happened to somebody before and
  they can tell me what they did to fix it. I've successfully recompiled the
  kernel and applied the big concurrency patch but not the big-todo one yet.
 I
  posted this before but didn't get much of a response except to check
  qmail-inject's exit status. Assuming I know how to do this, what will this
  prove? Thanks for any and all help.
 
  Brett.
 
  A big F you to all the unhelpful flamers in advance.
 
 



RE: qmail ignores my sorry ass part II...

2001-05-17 Thread Brett

Here's how I'm calling qmail-inject:


$mail_prog = '/var/qmail/bin/qmail-inject';

$mail =  To: $to_name $to_email\r\n;
$mail .= From: $from_name $from_email\r\n;
if ($bcc) {
$mail .= Bcc: $bcc \r\n;
}
$mail .= Subject: $subject\r\n\r\n;
$mail .= $body\r\n;

system (echo '$mail' | $mail_prog);

The Bccs are in the header but they're still being inserted into the command
line which is what I meant by more or less. I actually don't really see
another way of getting all the bccs to qmail-inject.



-Original Message-
From: Mark Delany [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 17, 2001 12:36 PM
To: [EMAIL PROTECTED]
Subject: Re: qmail ignores my sorry ass part II...


On Thu, May 17, 2001 at 12:25:43PM -0700, Brett wrote:
 Ok, thanks. Here's some more info:

 I'm trying to send the mail with qmail-inject from the command line. I
 checked and the exit code I'm getting is 65280. I meant 5600 addresses,
 not messages, and yes, that's more or less how I'm placing the addresses
 except I'm doing it from a perl script that puts the addresses in a Bcc
 field and then makes a system() call which is just like calling from the

Bcc field?

Do you mean these address are on the command line or in the headers of
the message? The difference is a lot more than more or less. In fact
the difference is critical. If the latter then you have a different
problem from what I suggested. If the former, then change to the
latter as that's the best way as you cannot normally increase the
command line limits without kernel rebuilds.


Regards.


 command line. I think you may be onto something here with your theory of
my
 being over the limit of command line arguments. The question is how do I
 increase that limit? And now I'm suddenly off-topic for this list, I know.
 Nevertheless, I'm sure I won't be the last qmail user to run into this
 problem and therefore it'll be useful to have this knowledge in the
 archives. Thanks again.


 -Original Message-
 From: Mark Delany [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, May 16, 2001 6:17 PM
 To: [EMAIL PROTECTED]
 Subject: Re: qmail ignores my sorry ass...


 You need to tell us a little more. Well, actually a lot more.

 How are you trying to send them? qmail-inject, smtp, qmail-queue?

 If you are running a command such as qmail-inject, what sort of exit
 code are you getting? Any error message?

 Do you mean 5600 emails or an email to 5600 addresses? If the latter,
 are you placing all the recipients on a command line, something like:

 /var/qmail/bin/qmail-inject recipient1@dom1 recipient2@dom2 ...

 ?

 If so, have you perhaps exceeded the maximum length of the command
 line for your system? Are you perhaps exceeding the maximum number of
 command line arguments for your system?

 To check the exit status from the shell, go echo $? immediately
 after the command. The number is zero if all is well and other numbers
 indicate different types of errors.


 Regards.


 On Wed, May 16, 2001 at 04:37:41PM -0700, Brett wrote:
  ... when I try to send more than 5600 emails in one go. I mean, it
  completely ignores me. There's no mention of anything occuring in the
logs
  whatsoever. Since I'm giving you so little to go on here, I'm mostly
 hoping
  for a general direction to start looking for a problem rather than a
  complete solution. Or hopefully this has happened to somebody before and
  they can tell me what they did to fix it. I've successfully recompiled
the
  kernel and applied the big concurrency patch but not the big-todo one
yet.
 I
  posted this before but didn't get much of a response except to check
  qmail-inject's exit status. Assuming I know how to do this, what will
this
  prove? Thanks for any and all help.
 
  Brett.
 
  A big F you to all the unhelpful flamers in advance.
 





RE: qmail ignores my sorry ass part II...

2001-05-17 Thread Michael Geier

would almost seem easier to make an alias out of the list, then just send
one email...

or maybe cycle the emails through a programming loop, putting 100 users on
an email, send it, continue loop...

-Original Message-
From: Mark Delany [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 17, 2001 2:36 PM
To: [EMAIL PROTECTED]
Subject: Re: qmail ignores my sorry ass part II...


On Thu, May 17, 2001 at 12:25:43PM -0700, Brett wrote:
 Ok, thanks. Here's some more info:

 I'm trying to send the mail with qmail-inject from the command line. I
 checked and the exit code I'm getting is 65280. I meant 5600 addresses,
 not messages, and yes, that's more or less how I'm placing the addresses
 except I'm doing it from a perl script that puts the addresses in a Bcc
 field and then makes a system() call which is just like calling from the

Bcc field?

Do you mean these address are on the command line or in the headers of
the message? The difference is a lot more than more or less. In fact
the difference is critical. If the latter then you have a different
problem from what I suggested. If the former, then change to the
latter as that's the best way as you cannot normally increase the
command line limits without kernel rebuilds.


Regards.


 command line. I think you may be onto something here with your theory of
my
 being over the limit of command line arguments. The question is how do I
 increase that limit? And now I'm suddenly off-topic for this list, I know.
 Nevertheless, I'm sure I won't be the last qmail user to run into this
 problem and therefore it'll be useful to have this knowledge in the
 archives. Thanks again.


 -Original Message-
 From: Mark Delany [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, May 16, 2001 6:17 PM
 To: [EMAIL PROTECTED]
 Subject: Re: qmail ignores my sorry ass...


 You need to tell us a little more. Well, actually a lot more.

 How are you trying to send them? qmail-inject, smtp, qmail-queue?

 If you are running a command such as qmail-inject, what sort of exit
 code are you getting? Any error message?

 Do you mean 5600 emails or an email to 5600 addresses? If the latter,
 are you placing all the recipients on a command line, something like:

 /var/qmail/bin/qmail-inject recipient1@dom1 recipient2@dom2 ...

 ?

 If so, have you perhaps exceeded the maximum length of the command
 line for your system? Are you perhaps exceeding the maximum number of
 command line arguments for your system?

 To check the exit status from the shell, go echo $? immediately
 after the command. The number is zero if all is well and other numbers
 indicate different types of errors.


 Regards.


 On Wed, May 16, 2001 at 04:37:41PM -0700, Brett wrote:
  ... when I try to send more than 5600 emails in one go. I mean, it
  completely ignores me. There's no mention of anything occuring in the
logs
  whatsoever. Since I'm giving you so little to go on here, I'm mostly
 hoping
  for a general direction to start looking for a problem rather than a
  complete solution. Or hopefully this has happened to somebody before and
  they can tell me what they did to fix it. I've successfully recompiled
the
  kernel and applied the big concurrency patch but not the big-todo one
yet.
 I
  posted this before but didn't get much of a response except to check
  qmail-inject's exit status. Assuming I know how to do this, what will
this
  prove? Thanks for any and all help.
 
  Brett.
 
  A big F you to all the unhelpful flamers in advance.
 





Re: qmail ignores my sorry ass part II...

2001-05-17 Thread Mark Delany

On Thu, May 17, 2001 at 01:57:11PM -0700, Brett wrote:
 Here's how I'm calling qmail-inject:
 
 
 $mail_prog = '/var/qmail/bin/qmail-inject';
 
 $mail =  To: $to_name $to_email\r\n;
 $mail .= From: $from_name $from_email\r\n;
 if ($bcc) {
 $mail .= Bcc: $bcc \r\n;
 }
 $mail .= Subject: $subject\r\n\r\n;
 $mail .= $body\r\n;
 
 system (echo '$mail' | $mail_prog);
 
 The Bccs are in the header but they're still being inserted into the command
 line which is what I meant by more or less. I actually don't really see
 another way of getting all the bccs to qmail-inject.

Ahh. You've got them on echo's command line. I've never quite seen it
done that way before...

There are *much* better ways that avoid such limits. Try this:


OPEN(MP, | $mail_prog) or die ...

print MP To: $to_name $to_email\r\n;
print MP From: $from_name $from_email\r\n;

if ($bcc) {
print MP Bcc: $bcc \r\n;
}

print MP Subject: $subject\r\n\r\n;
print MP $body\r\n;

close(MP) or die ...;


No command line limit, no echo, no lumpy $mail variable. I'd also be
inclined to print a separate Bcc: header for each recipient, but
that's just my must always scale mentality.


Hmm. It must be unix/perl day on the qmail list.


Regards.



Re: qmail ignores my sorry ass part II...

2001-05-17 Thread Charles Cazabon

Brett [EMAIL PROTECTED] wrote:
 Here's how I'm calling qmail-inject:
[...] 
 system (echo '$mail' | $mail_prog);
 
 The Bccs are in the header but they're still being inserted into the command
 line which is what I meant by more or less. I actually don't really see
 another way of getting all the bccs to qmail-inject.

That's why it's failing, it would seem.  I'm no Perl coder, but there's a way
to open the qmail-inject process, with your Perl process having one end of a
pipe, the other end of which is connected to stdin of qmail-inject.

You're trying to push a huge amount of data through the shell, which is
totally unnecessary.  You don't use any of the features of the shell here, so
why bother with it?  There's some examples of other people doing this in Perl
in the mailing list archives.

Charles
-- 
---
Charles Cazabon[EMAIL PROTECTED]
GPL'ed software available at:  http://www.qcc.sk.ca/~charlesc/software/
Any opinions expressed are just that -- my opinions.
---



RE: qmail ignores my sorry ass part II...

2001-05-17 Thread Brett

Rock. This works like a charm. Thanks a lot.

-Original Message-
From: Mark Delany [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 17, 2001 2:17 PM
To: [EMAIL PROTECTED]
Subject: Re: qmail ignores my sorry ass part II...


On Thu, May 17, 2001 at 01:57:11PM -0700, Brett wrote:
 Here's how I'm calling qmail-inject:


 $mail_prog = '/var/qmail/bin/qmail-inject';

 $mail =  To: $to_name $to_email\r\n;
 $mail .= From: $from_name $from_email\r\n;
 if ($bcc) {
 $mail .= Bcc: $bcc \r\n;
 }
 $mail .= Subject: $subject\r\n\r\n;
 $mail .= $body\r\n;

 system (echo '$mail' | $mail_prog);

 The Bccs are in the header but they're still being inserted into the
command
 line which is what I meant by more or less. I actually don't really see
 another way of getting all the bccs to qmail-inject.

Ahh. You've got them on echo's command line. I've never quite seen it
done that way before...

There are *much* better ways that avoid such limits. Try this:


OPEN(MP, | $mail_prog) or die ...

print MP To: $to_name $to_email\r\n;
print MP From: $from_name $from_email\r\n;

if ($bcc) {
print MP Bcc: $bcc \r\n;
}

print MP Subject: $subject\r\n\r\n;
print MP $body\r\n;

close(MP) or die ...;


No command line limit, no echo, no lumpy $mail variable. I'd also be
inclined to print a separate Bcc: header for each recipient, but
that's just my must always scale mentality.


Hmm. It must be unix/perl day on the qmail list.


Regards.