Fixing SGE email issues on Apple OS X

Posted by chris Tue, 23 Sep 2008 14:57:31 GMT

Are you in the following situation?

  1. /usr/bin/mail works perfectly from the command line
  2. /usr/bin/mail configured as the SGE mailer produces no email
  3. substituting a wrapper with extra logging also produces no logs or email

The only clue is in the spool logs:

09/10/2008 16:22:07|execd|xxx-fs01|E|mailer had timeout - killing
09/10/2008 16:22:07|execd|xxx-fs01|E|mailer exited with exit status= 1
09/10/2008 16:22:19|execd|xxx-fs01|E|mailer had timeout - killing
09/10/2008 16:22:19|execd|xxx-fs01|E|mailer exited with exit status= 1

Thanks to Valerio Luccio we have a workaround. The issue is apparently a conflict between one of the SGE supplied libraries that interferes with the mail MTA on OS X when SGE tries to invoke it. A trivial wrapper script that overrides the DYLD_LIBRARY_PATH environment variable is the fix:

#!/bin/sh
export DYLD_LIBRARY_PATH=/usr/lib
/usr/bin/mail -s "$2" $3

This solved a problem that had been bothering me for days, thanks Valerio - I owe you a beer if we ever end up at the same meeting or conference!