I have a problem sending email from Slurm Workload Manager. I am a normal user with limited privileges. When I ssh into my remote server, I am able to send email from the command line
sendmail user@gmail.com < mail.txt
and I receive the email to my gmail account. So far so good. However when I put the command in a bash script
#!/bin/bash
sendmail user@gmail.com < mail.txt
and sbatch
the script I do not receive an email and get the following warnings.
sendmail: warning: inet_protocols: disabling IPv6 name/address support: Address family not supported by protocol
postdrop: warning: inet_protocols: disabling IPv6 name/address support: Address family not supported by protocol
postdrop: warning: unable to look up public/pickup: No such file or directory
Ultimately I want to send a custom email to myself after a script that has been run by sbatch
finishes, which will include logs from the output and error files. I am looking for any solution which helps me do this. Maybe there is some way to run a script after sbatch that is at the same level as when I simply type in the terminal. Or maybe there are some different mail configurations on the node that is running my script, and there is some way to change them, or my call of sendmail
that takes into account the different settings.
Thanks for any help :)