[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [vps-mail] sendmail from the command line
- Subject: Re: [vps-mail] sendmail from the command line
- From: ADNET Ghislain <gadnet@xxxxxxxxxx>
- Date: Tue, 10 Jan 2006 16:44:31 +0100
yes but if i tell sendmail to not use more than x sendmail process then
it is the sendmail job to balance it right and the script do not have to
wonder about time outs and so, also i guess sendmail is better armed to
deal with the situation than a poor's man (this is me) php/shell script
so this is why i prefer to throw the baby at sendmail :)
another way of doing the time spreading then would be to use a separate
queue and then run a different queue runner for this specific batch of
emails, what would make most sense ? the goal is to send a newsletter
without taking all the processes and without building too much of a
logic in php/shell and have a "launch and (allmost) forget" approach.
In your script exemple we know that with greylist, time out, anti spam
defered hello you can quickly build 60+ sendmail process even with a
sleep 5 and i was thinking the timing guess would be too complex (read
ps-aux|grep sendmail|wc -l and other tricks) when sendmail can do the
job itself has it has been designed for it (just do not forget the
MaxChildren setting ;) ). Do you have some experiences with fairly
large 500.000 emails newsletters on a vps in a script ?
so much to tweak and so little time :)
Cordialement,
Ghislain ADNET.
AQUEOS.
Godwin Stewart wrote:
> On Tue, 10 Jan 2006 16:14:12 +0100, ADNET Ghislain <gadnet@xxxxxxxxxx>
> wrote:
>
> >> i was trying to figure out how to use sendmail from the commmand
> line to
> >> send an email with one little thing i want it queued and not sent right
> >> away (because i use a loop for a lot of emails). i think this is the -O
> >> QueueOnly like this:
>
> I'm fairly certain that you're correct, but I question the validity of
> your
> approach.
>
> If you're deferring the sending of your mails in order to avoid bringing
> the server to its knees, you're only going to do so until the next queue
> run, at which point the server will strain to dequeue all your messages.
>
> A much better way to spread the load over time is to use a script to feed
> all the messages through sendmail but introduce a pause of a few seconds
> between each one.
>
> For example:
>
> #!/usr/local/bin/bash
> # because I know bash syntax better than tcsh :)
>
> cd /directory/where/your/mails/are
> ls -1 | while read filename; do
> # ^ this is a figure 1, not a lowercase 'ell' L.
> sleep 5
> sendmail -t < "$filename" || exit $?
> done
>
======================================================================
This is <vps-mail@xxxxxxxxxxxx> <http://www.perlcode.org/lists/>
Before posting a question, please search the archives (see above URL).
======================================================================
This is <vps-mail@xxxxxxxxxxxx> <http://www.perlcode.org/lists/>
Before posting a question, please search the archives (see above URL).
Main Index |
Thread Index