Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using postfix on ubuntu 12.04 server, with help from

after setting up sasl as above guide, I tried sendmail - and sendmail just hangs.

here's what I've done:

# cat mail.mail
To: <myid>
Subject: test mail
From: root@<>

a test mail

# sendmail -vt mail.mail
(a blank line displayed forever and i have to Ctrl+C out of it)

though I can send mail via telnet.

#telnet localhost 25
MAIL FROM: root@<>
RCPT TO: <myid>
test mail

(mail sent to <myid>, thrown directly to junks though)
share|improve this question
up vote 3 down vote accepted

sendmail doesn't accept a message file as a parameter, it reads the message from stdin. You need to pipe the message text into sendmail:

sendmail -vt < mail.mail
share|improve this answer
thanks. I'm so stupid.. – thkang Feb 22 '13 at 18:38

Your Answer


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.