I had a script which called /usr/bin/mail which was working under Ubuntu 15.10 (It called /usr/bin/mail.mailutils) but after upgrading to Ubuntu 16.04 - it appears it was replaced with (as a default mailer) s-nail.
This introduced the following issue: This command works to send an email: $cat /tmp/foobar | mail -s 'EXAMPLE SUBJECT' -a /path/to/file/to_attach.jpg -c ccem...@example.com origem...@example.com But when I add that exact same as a line to a bash file, e.g. #!/bin/bash cat /tmp/foobar | mail -s 'EXAMPLE SUBJECT' -a /path/to/file/to_attach.jpg -c ccem...@example.com origem...@example.com This script FAILS and returns the error: Alert: "origem...@example.com" is not a user of this system. Here's the version of s-nail #dpkg --list | grep s-nail ii s-nail 14.8.6-1 amd64 Some things I've tried in the script to get it to work #!/bin/bash cat /tmp/foobar | mail -s 'EXAMPLE SUBJECT' -a /path/to/file/to_attach.jpg -r real_username -c ccem...@example.com origem...@example.com #!/bin/bash cat /tmp/foobar | mail -s 'EXAMPLE SUBJECT' -a /path/to/file/to_attach.jpg -A real_username -c ccem...@example.com origem...@example.com But each time I get the same error Alert: "origem...@example.com" is not a user of this system. Is there a feature reason the command line execution would be different than calling this from a script or is this a bug? Is there a different set of flags I need to call to get this to work from scripts instead of the command line? Thanks in advance, ------------------------------------------------------------------------------ What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e __________________________________ S-nail-users@lists.sourceforge.net