You can use Postfix as a nullmailer (relay only to ISP). This is nothing more than a four-liner:

main.cf

myorigin = $mydomain
relayhost = $mydomain
inet_interfaces = loopback-only
local_transport = error:local delivery is disabled


Reference: http://www.postfix.org/STANDARD_CONFIGURATION_README.html#null_client

What's a common mechanism for emailing in the background?
I am working with a bash script and I want to execute a function to print a return value:

function fun1(){
  return 34
}
function fun2(){
  local res=$(fun1)
  echo $res
}


when I execute func2 it does not print "34". Can anybody help me?
