Using Exim - root user can send email from command line, but non root users can not.
$ mail -s "test" test@test.com </dev/null
Null message body; hope that's ok
[xxx@master1 /usr/home/xxx]$ 2015-03-31 17:06:34 [58856]
cwd=/usr/home/xxx 3 args: send-mail -i test@test.com
Seeing this in /var/log/messages:
Mar 31 17:07:11 master1 exim[59400]: 2015-03-31 17:07:11 [59400] 1Ycxl1-000FS4-0T failed to write to main log: length=134 result=-1 errno=9 (Bad file descriptor)
Mar 31 17:07:11 master1 exim[59400]: write failed on panic log: length=125 result=-1 errno=9 (Bad file descriptor)
Mar 31 17:07:11 master1 exim[59409]: 2015-03-31 17:07:11 [59409] 1Ycxl1-000FSD-1F failed to write to main log: length=134 result=-1 errno=9 (Bad file descriptor)
Mar 31 17:07:11 master1 exim[59409]: write failed on panic log: length=125 result=-1 errno=9 (Bad file descriptor)
exim is a symlink - both symlink and actual binary permissions look like:
[xxx@master1 ~]$ ls -l `which exim`
lrwsr-xr-x 1 root wheel 13 Aug 5 2013 /usr/local/sbin/exim -> exim-4.80.1-2
[xxx@master1 ~]$ ls -l /usr/local/sbin/exim-4.80.1-2
-rwsr-xr-x 1 root wheel 983184 Aug 5 2013 /usr/local/sbin/exim-4.80.1-2
Have tried adding user xxx as trusted_users in exim config - made no difference
/usr/local/sbin
is clearly not a system installation. Use the packaged binary, and your problems will likely go away. – Faheem Mitha Mar 31 '15 at 15:45wheel
and/usr/home
hint at this.) On FreeBSD, that is where the packaged binary lives. – JdeBP Mar 31 '15 at 19:28mail
is invoking /usr/local/sbin/exim and not perhaps an old version in /usr/lib/sendmail or /usr/sbin/sendmail? – wurtel Apr 01 '15 at 10:21sendmail -oem -oi
, and immediately thereafter I see the exim message in /var/log/messages. (/usr/sbin/sendmail -> /usr/sbin/mailwrapper
) – Vuade Apr 01 '15 at 12:02