Custom Mail using /usr/bin/mail

Status
Not open for further replies.

tmueko

Explorer
Joined
Jun 5, 2012
Messages
82
I transfered a Backupserver from FreeBSD-9.3 to Freenas-9.3. A custom rsync-script ist synchronising data to the freenas and should send a mail. I used
/usr/bin/mail -s "<subject>" "<receipt>" < "<logfile>".

But no mail ist send.

[root@baal5] ~# /usr/bin/mail -d -s test test@test.com < /var/log/backup.log-2015-05-06
user = root, homedir = /root
Sendmail arguments: "send-mail" "-i" "test@test.com"

nothing happens.
What should I do to find the Problem? I tried "truss" but I only find out, that "/etc/nsswitch.conf" is red, than a pause, than a kill...
 
Joined
Jan 9, 2015
Messages
430
You can use sendmail.
Code:
sendmail -t < email.txt 
where email.txt includes the lines:
To: email@address
Subject: Whatever you'd like
etc....

Email must already be setup in the GUI on FreeNAS as well.
 

tmueko

Explorer
Joined
Jun 5, 2012
Messages
82
This works after configuration of Email in FreeNAS.
Thanks.
 
Last edited:
Status
Not open for further replies.
Top