[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: Godwin Stewart <gstewart@xxxxxxxxxxx>
- Date: Tue, 10 Jan 2006 16:31:49 +0100
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
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
- --
G. Stewart - gstewart@xxxxxxxxxxx
Radioactive cats have 18 half-lives
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
iD8DBQFDw9NlK5oiGLo9AcYRAu4TAJ9NzqEOTAU8z55KxWiiPbhQUDoougCfWQEP
uoBXOCkH8FgTQghHNaxhXz4=
=0rCn
-----END PGP SIGNATURE-----
======================================================================
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