Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Quite frequently I have to send the outputs of my work on terminal (e.g. when compiling code) to my colleagues via email. I was wondering if it is possible to pipe (|) the output of a terminal command directly to email and I realized there are mail and mailx that can be used for this purpose.

The problem is, when I try a simple message like this

ls -laF | mailx -s 'generated files' colleague@gmail.com

nothing is sent. How should I tackle this problem? In this post a very similar situation is asked and something is suggested but it's not the solution anymore.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

OS X has postfix installed by default but it's not enabled (started). You can start it with

sudo postfix start

you can check the status and eventual problems in /var/log/mail.log

The configuration is in /etc/postfix/

share|improve this answer
    
Thank you. I started postfix as you said and tried again and failed again! checking the log it is telling me [my ip]:25: opration time out any suggestions? –  Pouya Apr 24 '13 at 16:42
    
Do you have any firewall? –  Matteo Apr 24 '13 at 16:43
    
I tried from home and it seems it is working. Probably it was a problem with internet connection at my work palace. Just one last question, should I stop postfix after or I can leave it running? –  Pouya Apr 24 '13 at 21:17
    
You can leave it running. I would look online for the manual and check the configuration but as far as I remember the default settings are OK. –  Matteo Apr 25 '13 at 5:05

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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