I'm running torque-2.1.6-1.fc5, and it appears that pbs_server cannot send
emails on jobs completion, because it doesn't find the sendmail binary (normally
located in /usr/sbin) :
$ strings /usr/sbin/pbs_server | grep sendmail
$ ls -l /usr/sbin/sendmail
lrwxrwxrwx 1 root root 21 Dec 20 14:50 /usr/sbin/sendmail -> /etc/alternatives/mta
# strace -f -F -o /tmp/log -p `pidof pbs_server`
submitting a job
# grep sendmail /tmp/log
6882 execve("/bin/sh", ["sh", "-c", "sendmail -f adm fabrice.bellet@c"...], [/*
2 vars */]) = 0
6882 stat64("/bin/sendmail", 0xbf96ab70) = -1 ENOENT (No such file or directory)
6882 stat64("/usr/bin/sendmail", 0xbf96ab70) = -1 ENOENT (No such file or
6882 write(2, "sh: sendmail: command not found\n", 32) = 32
--> as a workaround, creating a symlink for sendmail in /usr/bin works for me,
but it would be probably safer to hardcode the real sendmail path in the
configure scripts ?
configure does look for sendmail and will hardcode the real path, but if it
isn't found, will simply rely on $PATH.
Since I didn't add sendmail as a buildreq in the FE rpm, it isn't found. I'll
research the best way to solve this going forward in FE.
For now, you can simply add /usr/sbin to pbs_environment.
Ah this fix looks good to me, thanks for the tip.
If an MTA is mandatory for the correct operation of pbs_server, then adding a
BuildRequires (*) and Requires for /usr/sbin/sendmail may be the solution,
because AFAIK, all MTA shipped in Fedora add a Provides: /usr/sbin/sendmail in
their package, and the correct MTA is selected with the 'alternatives'
mechanism. Here is a (recent) thread on this question:
(*) As the existence of /usr/sbin/sendmail is not checked at build time, when
forcing the --with-sendmail configure option, I'd say that the BuildRequires:
/usr/sbin/sendmail can be omited.
If /usr/sbin/sendmail is the correct BR and Req, I'll add that to the next build
in FC6/FC7. I don't think I'm allowed to do updates for FC5.
That post pointed me to paths.h, which defines _PATH_SENDMAIL. I'm wondering
how standard and portable that is.
I think a Req on smtpdaemon is the correct way to go here. It seems to be the
proper virtual provides, but I will make sure the next FC6/FC7 builds have the
correct /usr/sbin/sendmail path in the binary.
I just did 2.1.8 builds with --with-sendmail=/usr/sbin/sendmail, without added a
BR or Req.
I was about to add a Req but then got scared of making machines pull in the
I think the new build will work fine for people.
You're right, this is probably safer.