Email not sending PBS 18.1.4 & Centos 7.6.1810

To those willing and able to help:

I’m trying to get PBS to send an email on PBS 18.1.4 & CENTOS 7.6.1810 but nothing seems to work. I have been trying for several days but am coming up empty handed. I can send mail using:

echo “test” | mail -s “test” myaddress@workdomain.com
or
echo “test” | sendmail -s “test” myaddress@workdomain.com

Submitting using:
qsub -m abe -M myaddress@workdomain.com somescript.sh

somescript.sh:
#######################
#!/bin/bash
#PBS -N job
#PBS -l select=1
#PBS -q workq
#PBS -j oe

cd $PBS_0_WORKDIR
echo The following nodes will be used to run this program
cat $PBS_NODEFILE
#######################

Can someone walk me through a few things to check to figure out why this isn’t sending emails? I had this setup working on a POC cluster but now on my production cluster, I can’t get it to work.

Thanks,
Lee

If smtp / postfix services are running and are able to send/forward mails to respective addresses, then that would be only pre-requisite for the PBS Server to send mails.

  • could you please check the /var/log/maillogs
  • could you please check the local mail account for any mails
  • can you try this script qsub somescript.sh

####################### contents of somescript.sh below
#!/bin/bash
#PBS -N job
#PBS -l select=1:ncpus=1:mem=10mb
#PBS -q workq
#PBS -j oe
#PBS -m abe
#PBS -M myaddress@workdomain.com

cd $PBS_0_WORKDIR
echo The following nodes will be used to run this program
cat $PBS_NODEFILE
#######################

Thanks you and please forgive my ignorance. I am fairly new to linux and pbs.
/var/log/maillogs shows:
date time server sSMTP[somenumber]: Connection lost in middle of processing

$mail shows:
No mail for username

running the script:

  1. script runs and puts job.0742 in the working directory and shows:
    The following nodes will be used to run this program:
    node8.cm.cluster

  2. no email is sent/received

  3. /var/log/maillog shows 2 entries for the same Connection lost in the middle of processing.

Any suggestions? Thank you very much.
Lee

The issue is with the sSMTP . Please check the /etc/ssmtp.conf file, it must be related to the configuration. The below link might help
https://www.linuxquestions.org/questions/linux-server-73/sending-e-mail-from-nmh-or-mail-using-ssmtp-not-working-4175543429/

I found the ssmtp.conf here:
/etc/ssmtp/ssmtp.conf
I tried to add my mailhub at my work but it didn’t work. Maybe I need to add the hostname?

I don’t understand why PBS is trying to use ssmtp instead of sendmail or postfix. According to the PBS Big Book 2.2.1 “You cannot configure which mail server PBS uses. PBS uses the default mail server. On Linux, this is /usr/lib/sendmail.”

I don’t know why ssmtp is even installed. My POC never had this installed. Do you know if I should just remove ssmtp and try to use sendmail or postfix?

Thanks!
Lee
Lee

I think that would be the best idea to remove ssmtp , that might have deployed by default.
#yum remove ssmtp
and you can install sendmail or postfix, that might do the trick

SOLVED!!

We just changed the MTA using the following:

# alternatives --config mta

From there just choose postfix. We now get emails from PBS. Thank you for your help!

Lee

1 Like

Thank you Lee for sharing this info.
Good to know ! :+1: