Tell me more ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I need to know which MTA is better and simple to handle and configure in linux, as I need to run a script that will send me the output of a command launched regularly using cron.

The case is the following: Every day I have to manually check the Disk space of more than 30 servers and to document the results. So I plan to simply add df -h in my crontab, and send the output on my email.

So my question is: which MTA is better? sendmail, postfix, any other? And I'd like some instructions on how to install and configure it.

After the setup, how can I add send to myself the output of df -h?

share|improve this question
1  
Why not for server in foo bar baz; do ssh user@$server df -h; done – RedGrittyBrick Sep 19 '12 at 14:11
All MTAs have their benefits and disadvantages. There's no "best" one unless you have very specific requirements. Also, configuring an MTA can be a matter of minutes to hours – there are books written on it. This question is a little too broad to be answered. There are plenty of tutorials online that will help getting you started setting up sendmail or postfix. If you run into a specific problem or get stuck, feel free to ask a more concrete question! Thank you! – slhck Sep 19 '12 at 15:39

closed as not a real question by slhck Sep 19 '12 at 15:37

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, see the FAQ.

1 Answer

I suggest that you use a debian based distribution and try the command

apt-get install postfix

But beware – you are then required to follow on-screen instructions which will set up the MTA.

You might want to learn how you can "pipe" one programs output into another one. f.e.

df -h | mail you@example.com
share|improve this answer
by the way: instead of sending 30 daily mails with the disk usage I would rather suggest that you set up "munin". It gives you one webinterface where you can monitor the disk usage and much more on any number of servers. You just need to install munin-node on each machine and set that up. – Jan. Sep 19 '12 at 12:55
Now we start talking I like it, Yes dear we have Munin installed but issue is this that it only shows space in PERCENTAGE. but not actual space . I mean CONSUMED space and TOTAL SPACE. Is there any option in MUNIN that shows TOTAL SPACE and CONSUMED SPACE. Thanks Please keep it in mind that Im not a Linux hardcore user. But Im learning it . Salute U – OmiPenguin Sep 19 '12 at 14:02

Not the answer you're looking for? Browse other questions tagged or ask your own question.