Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Sat Jan 09, 2010 11:27 am 
Offline
Junior Member

Joined: Sun Oct 11, 2009 12:44 pm
Posts: 29
Location: Northern Ireland
I've set up Postfix on my Linode. The majority of emails are sent/received through Google Apps, but Postfix lets me create emails in PHP forms.

When I try to send an email via the command line though, I get

Code:
mail: command not found


I'm not sure how Postfix works, but is there another tool I should be installing to make this work, or is it something I can configure within Postfix?

Here's the script I'm running btw:

Code:
#!/bin/sh
( rkhunter --versioncheck
rkhunter --update
rkhunter --cronjob --report-warnings-only
) | mail -s "Rkhunter Output" michael@problogdesign.com



Really appreciate any ideas on what to try, thanks!


Last edited by Michael-Martin on Sun Jan 10, 2010 1:36 pm, edited 1 time in total.

Top
   
 Post subject:
PostPosted: Sat Jan 09, 2010 11:52 am 
Offline
Senior Member

Joined: Sun Aug 31, 2008 4:29 pm
Posts: 177
Sounds like you don't have the mailx package installed. How you do it depends on your distribution.

e.g., for CentOS:

yum install mailx


Top
   
 Post subject:
PostPosted: Sat Jan 09, 2010 2:18 pm 
Offline
Senior Member
User avatar

Joined: Tue Apr 13, 2004 6:54 pm
Posts: 833
Or you could called the "sendmail" command (which postfix and most others emulate) directly.

It may be in /usr/lib or /usr/sbin (or both!)

eg
Code:
#!/bin/sh
(
  echo To: michael@problogdesign.com
  echo Subject: Rkhunter Output
  echo
  rkhunter --versioncheck
  rkhunter --update
  rkhunter --cronjob --report-warnings-only
) | /usr/lib/sendmail -t

_________________
Rgds
Stephen
(Linux user since kernel version 0.11)


Top
   
 Post subject:
PostPosted: Sun Jan 10, 2010 1:36 pm 
Offline
Junior Member

Joined: Sun Oct 11, 2009 12:44 pm
Posts: 29
Location: Northern Ireland
Sleddog - Ah, you're right, I haven't installed it. I didn't realize it was needed for the mail syntax, thanks! I'll remember that for the future! :)


Sweh - That worked perfectly, thanks so much! Using it now :D


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group