I guess you need to decide how to approach it.

If you can't educate users as to how to appropriately use the -mail flag, then you are assuming they will abuse it. In that situation, you need to configure your mail server itself to rate limit or something. That approach depends on the mail server you use.

The best solution, of course, is to educate the users.
You could create a job_submit plugin that removes mail options for arrays, but you may negatively impact users that do need that.

Brian Andrus


On 11/25/2019 10:55 PM, ichebo...@univ.haifa.ac.il wrote:
I meant on the admin level, to prevent users spamming and overloading the mail 
server with wrong use of —mail flag.

========================
Best Wishes,
Igor

On 25 Nov 2019, at 19:13, Brian Andrus <toomuc...@gmail.com> wrote:

Set --mail-type appropriately.

If you want only 1 email for the array, remove the "ARRAY_TASKS" from that.
If you don't want emails at all, set it to "NONE"


--mail-type=<type>
Notify user by email when certain event types occur. Valid type values are 
NONE, BEGIN, END, FAIL, REQUEUE, ALL (equivalent to BEGIN, END, FAIL, REQUEUE, 
and STAGE_OUT), STAGE_OUT (burst buffer stage out and teardown completed), 
TIME_LIMIT, TIME_LIMIT_90 (reached 90 percent of time limit), TIME_LIMIT_80 
(reached 80 percent of time limit), TIME_LIMIT_50 (reached 50 percent of time 
limit) and ARRAY_TASKS (send emails for each array task). Multiple type values 
may be specified in a comma separated list. The user to be notified is 
indicated with --mail-user. Unless the ARRAY_TASKS option is specified, mail 
notifications on job BEGIN, END and FAIL apply to a job array as a whole rather 
than generating individual email messages for each task in the job array.

Brian Andrus



On 11/25/2019 1:48 AM, ichebo...@univ.haifa.ac.il wrote:
Hi,

I would like to ask if there is some options to configure the e-mail 
notification of slurm jobs?

For example, how can i filter or not allow sending notifications of an array 
jobs? Our relay servers is getting overloaded because of thousands of 
notifications regarding array jobs.

I would like to allow this flag only on regular jobs.

========================
Best Wishes,
Igor




Reply via email to