LSB_MAILPROG

Syntax

LSB_MAILPROG=file_name

Description

Path and file name of the mail program used by LSF to send email. This is the electronic mail program that LSF uses to send system messages to the user. When LSF needs to send email to users it invokes the program defined by LSB_MAILPROG in lsf.conf.

In a mixed cluster, you can specify different programs for Windows and UNIX. You can set this parameter during installation on Windows.

LSF provides the sendmail program, which supports the sendmail protocol on UNIX. You can also write your own custom mail program and set LSB_MAILPROG to the path where this program is stored.

LSF also provides the lsmail program for Unix (supporting SMTP) and the lsmail.exe program for Windows (supporting both SMTP and Microsoft Exchange Server). If lsmail is specified, the parameter LSB_MAILSERVER must also be specified. On Windows, lsmail.exe can be configured directly. On Unix, the full path to the lsmail binary is required for configuration.

If you change your mail program, the LSF administrator must restart sbatchd on all hosts to retrieve the new value.

UNIX

By default, LSF uses /usr/lib/sendmail to send email to users. LSF calls LSB_MAILPROG with three arguments in the following order:

  1. The -oi option: When reading a message from standard input, does not treat a line with only a period character (.) as the end of input. The end of the message is marked by an end-of-file character. If your mail program does not support this feature, skip this option.
  2. The -F 'LSF' option specifies the full name of the sender.
  3. The -f option specifies the return address for email.

For example, LSF calls the LSB_MAILPROG mail program with the following arguments: mail_program -oi -F 'LSF' -f LSB_MAILSENDER_value <email_recipient>

LSB_MAILPROG must read the body of the mail message from the standard input. Any program or shell script that accepts the arguments and input, and delivers the mail correctly, can be used.

LSB_MAILPROG must be executable by any user.

Windows

If LSB_MAILPROG is not defined, no email is sent.

Examples

LSB_MAILPROG=lsmail.exe
LSB_MAILPROG=/serverA/tools/lsf/bin/unixhost.exe 

Default

Unix: /usr/lib/sendmail

Windows: empty

See also

LSB_MAILSERVER, LSB_MAILTO