Re: [exim] What's the diffference between deliver_queue_load_max and queue_run_max?

2013-08-19 Thread boyd yang
Thanks Chris, the link explains clear and easy to understand.
I think the total number of exim processes related to the CPU cores or
memory size?
What's suggested parameter values?
Or should I test and adjust and work it for my machine(24cores
/proc/cpuinfo, 64G mem)?


On Mon, Aug 19, 2013 at 10:34 PM, Chris Siebenmann wrote:

> | > queue_run_max Use: main  Type: integer  Default: 5
> | > This controls the maximum number of queue runner processes that an Exim
> | > daemon can run simultaneously.
> |
> | -> as written: the maximum number of parallel running Exims processing
> | the current mail queue. This number is independend on the load of your
> | system. As each process locks one message, it's the maximum number of
> | of messages delivered at the same time. (Not the maximum number of
> | deliveries, as each message may have several recipients, which Exim
> | may deliver to in parallel.)
>
>  queue_run_max is not quite the maximum number of simultaneous
> deliveries that Exim may ever be doing at once, because it only limits
> *queue runners*. Exim load and load limiting is complicated because Exim
> can deliver email both from queue runners *and* immediately when the
> email is submitted. So you can have some number of queue runners (up to
> queue_run_max) and also some number of immediate delivery processes.
>
>  Years ago I tried to write down everything I had worked out about
> Exim load limiting. I think that nothing substantial has changed
> since 2008 when I did this and the following is still relevant if
> people want lots of detail:
>
> http://utcc.utoronto.ca/~cks/space/blog/sysadmin/EximLoadLimiting
>
> (If things have changed I'd love to hear about it.)
>
> - cks
>
> --
> ## List details at https://lists.exim.org/mailman/listinfo/exim-users
> ## Exim details at http://www.exim.org/
> ## Please use the Wiki with this list - http://wiki.exim.org/
>
-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


[exim] IP Rotation

2013-08-19 Thread Shahid Ashraf
Hi Every One,

I'm using Exim 4 with my Centos 6.4, I have 10 static IP addresses on my
Linux box , I need to IP rotation in exim after 10 emails.


Regards,

Shahid
-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


Re: [exim] What's the diffference between deliver_queue_load_max and queue_run_max?

2013-08-19 Thread Phil Pennock
On 2013-08-19 at 18:19 +0800, boyd yang wrote:
> Thanks!
> I find more detail about loadavg here:
> http://www.loadavg.com/2012/01/procloadavg/
> 
> I think deliver_queue_load_max  here mean the first number:
> root@mail:/etc/exim4/conf.d/main# cat /proc/loadavg
> 2620.41 1627.96 962.37 1504/13290 4940

Yes, that's your load average, given in the first three fields over 1, 5
and 15 minutes.  (The portable way to see these is with the "uptime"
command, which works on every Unix).

The next field says that you have 1504 processes "runnable", ie
competing for CPU, out of 13290 processes on the system.  The last field
is merely which pid was most recently scheduled to run.

Unless you have a monster of a system, this is basically saying that
you are starting too many processes at once.

> root@mail:/etc/exim4/conf.d/main# cat /proc/loadavg
> 2620.41 1627.96 962.37 247/13354 5200

That, though, shows that most of the processes switched out of runnable
state, but without completing, so are probably then blocked on I/O.

How much mail volume is this system handling?  Is the system dedicated
to email?  If you run "ps", and look to see what's running, is it mostly
Exim, or some other command?

  ps axo cmd | cut -d ' ' -f 1 | sort | uniq -c | sort -nr | head

That should give you the top ten processes, by command-name.

If this load is mostly Exim, I suggest setting:

  queue_only_load = 10

and vary 10 to be "a bit more than the number of CPU cores in the
system" (as a "wet finger in air" first pass guess) so that if the load
is high, when receiving messages, then the mails will only be queued and
no immediate delivery attempt will be made.  Instead, queue-runners will
handle deliveries, and you might change the Exim command-line flags to
start queue-runners every minute, and those will then be subject to
"queue_run_max" and constrain the concurrency of delivery.  This should
help you avoid a death-spiral of the system contending with itself, by
running fewer processes which each try to get more done, sacrificing the
(failing) attempts to be more "immediate".

As a result of the queuing, if you have a lot of mails for common
destinations, then you'll start more routinely sending multiple messages
down one SMTP connection, which might change the behaviour you're used
to and this may lead you to change some of the other tuning options.


If the load is mostly spam or virus scanning, then your best bet is to
limit how many concurrent incoming connections you accept in Exim, to
constrain how many scanner processes you end up starting, in which case
you want to adjust "smtp_accept_max" and "smtp_accept_max_per_host".

-Phil

-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


Re: [exim] What's the diffference between deliver_queue_load_max and queue_run_max?

2013-08-19 Thread Chris Siebenmann
| > queue_run_max Use: main  Type: integer  Default: 5
| > This controls the maximum number of queue runner processes that an Exim
| > daemon can run simultaneously.
| 
| -> as written: the maximum number of parallel running Exims processing
| the current mail queue. This number is independend on the load of your
| system. As each process locks one message, it's the maximum number of
| of messages delivered at the same time. (Not the maximum number of
| deliveries, as each message may have several recipients, which Exim
| may deliver to in parallel.)

 queue_run_max is not quite the maximum number of simultaneous
deliveries that Exim may ever be doing at once, because it only limits
*queue runners*. Exim load and load limiting is complicated because Exim
can deliver email both from queue runners *and* immediately when the
email is submitted. So you can have some number of queue runners (up to
queue_run_max) and also some number of immediate delivery processes.

 Years ago I tried to write down everything I had worked out about
Exim load limiting. I think that nothing substantial has changed
since 2008 when I did this and the following is still relevant if
people want lots of detail:

http://utcc.utoronto.ca/~cks/space/blog/sysadmin/EximLoadLimiting

(If things have changed I'd love to hear about it.)

- cks

-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


Re: [exim] What's the diffference between deliver_queue_load_max and queue_run_max?

2013-08-19 Thread boyd yang
Thanks!
I find more detail about loadavg here:
http://www.loadavg.com/2012/01/procloadavg/

I think deliver_queue_load_max  here mean the first number:
root@mail:/etc/exim4/conf.d/main# cat /proc/loadavg
2620.41 1627.96 962.37 1504/13290 4940
root@mail:/etc/exim4/conf.d/main# cat /proc/loadavg
2620.41 1627.96 962.37 247/13354 5200




On Mon, Aug 19, 2013 at 5:21 PM, Heiko Schlittermann 
wrote:

> Hi,
>
> boyd yang  (Mo 19 Aug 2013 10:51:41 CEST):
> > Hi,
> >
> > What's the diffference between deliver_queue_load_max and queue_run_max?
> > Are they the same?
> > How can I know the "system load average"?
> >
> > Below are definition I got from exim spec:
> >
> http://www.exim.org/exim-html-current/doc/html/spec_html/ch-main_configuration.html
> >
> > deliver_queue_load_max Use: main  Type: fixed-point  Default: unset
> >
> > When this option is set, a queue run is abandoned if the system load
> > average becomes greater than the value of the option. The option has no
> > effect on ancient operating systems on which Exim cannot determine the
> load
> > average. See also queue_only_load and smtp_load_reserve.
>
> As your system load (see /proc/loadavg on Linus systems), or uptime(8))
> may be a critical parameter, and as queue processing uses system
> resources, Exim can stop the queue processing if your system load
> reaches a critical level. This doesn't prevent Exim from accepting
> messages and starting a first(!) delivery attempt.
>
>
> > queue_run_max Use: main  Type: integer  Default: 5
> > This controls the maximum number of queue runner processes that an Exim
> > daemon can run simultaneously.
>
> -> as written: the maximum number of parallel running Exims processing
> the current mail queue. This number is independend on the load of your
> system. As each process locks one message, it's the maximum number of
> of messages delivered at the same time. (Not the maximum number of
> deliveries, as each message may have several recipients, which Exim may
> deliver to in parallel.)
>
> It's what I understand from the spec.
>
> --
> Heiko
>
> --
> ## List details at https://lists.exim.org/mailman/listinfo/exim-users
> ## Exim details at http://www.exim.org/
> ## Please use the Wiki with this list - http://wiki.exim.org/
>
-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


Re: [exim] What's the diffference between deliver_queue_load_max and queue_run_max?

2013-08-19 Thread Heiko Schlittermann
Hi,

boyd yang  (Mo 19 Aug 2013 10:51:41 CEST):
> Hi,
> 
> What's the diffference between deliver_queue_load_max and queue_run_max?
> Are they the same?
> How can I know the "system load average"?
> 
> Below are definition I got from exim spec:
> http://www.exim.org/exim-html-current/doc/html/spec_html/ch-main_configuration.html
> 
> deliver_queue_load_max Use: main  Type: fixed-point  Default: unset
> 
> When this option is set, a queue run is abandoned if the system load
> average becomes greater than the value of the option. The option has no
> effect on ancient operating systems on which Exim cannot determine the load
> average. See also queue_only_load and smtp_load_reserve.

As your system load (see /proc/loadavg on Linus systems), or uptime(8))
may be a critical parameter, and as queue processing uses system
resources, Exim can stop the queue processing if your system load
reaches a critical level. This doesn't prevent Exim from accepting
messages and starting a first(!) delivery attempt.


> queue_run_max Use: main  Type: integer  Default: 5
> This controls the maximum number of queue runner processes that an Exim
> daemon can run simultaneously.

-> as written: the maximum number of parallel running Exims processing
the current mail queue. This number is independend on the load of your
system. As each process locks one message, it's the maximum number of
of messages delivered at the same time. (Not the maximum number of
deliveries, as each message may have several recipients, which Exim may 
deliver to in parallel.)

It's what I understand from the spec.

-- 
Heiko


signature.asc
Description: Digital signature
-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

[exim] What's the diffference between deliver_queue_load_max and queue_run_max?

2013-08-19 Thread boyd yang
Hi,

What's the diffference between deliver_queue_load_max and queue_run_max?
Are they the same?
How can I know the "system load average"?

Below are definition I got from exim spec:
http://www.exim.org/exim-html-current/doc/html/spec_html/ch-main_configuration.html

deliver_queue_load_max Use: main  Type: fixed-point  Default: unset

When this option is set, a queue run is abandoned if the system load
average becomes greater than the value of the option. The option has no
effect on ancient operating systems on which Exim cannot determine the load
average. See also queue_only_load and smtp_load_reserve.


queue_run_max Use: main  Type: integer  Default: 5
This controls the maximum number of queue runner processes that an Exim
daemon can run simultaneously.

Thanks!
-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


Re: [exim] Fake smtp session (-bh) from outgoing port 587

2013-08-19 Thread Heiko Schlittermann
Alexandru Chirila  (Fr 16 Aug 2013 13:19:42 CEST):
> Hello,
> 
> Is it possible to make a fake smtp session from the outgoing port (587).
> Something similar to:
> 
> exim -bh <...>

I'm using something like this:

swaks --pipe 'exim -bh … -oMi 1.2.3.4:587' -au … -ap … -f … -t …

for test sessions.

Best regards from Dresden/Germany
Viele Grüße aus Dresden
Heiko Schlittermann
-- 
 SCHLITTERMANN.de  internet & unix support -
 Heiko Schlittermann, Dipl.-Ing. (TU) - {fon,fax}: +49.351.802998{1,3} -
 gnupg encrypted messages are welcome --- key ID: 7CBF764A -
 gnupg fingerprint: 9288 F17D BBF9 9625 5ABC  285C 26A9 687E 7CBF 764A -
(gnupg fingerprint: 3061 CFBF 2D88 F034 E8D2  7E92 EE4E AC98 48D0 359B)-


signature.asc
Description: Digital signature
-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/