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

Following problem:

I've installed exim4 on my ubuntu server using this tutorial.

So now I can send emails via terminal with:

echo "This is a test." | mail -s Testing

And I get email from

But how to send e-mails from some specific name like

I think I have to create a new Ubuntu user and then to do something to exim4 configuration.

But how exactly? And how to do it secure for my system?


share|improve this question
You want to send an email from any remote machine to your Ubuntu/exim machine, right? First you would have to configure exim to accept remote connections. Then you have to decide if you want to use virtual or real users. The difference is: Real users can be added by simply adding users to your Ubuntu OS. You should not go this way if you want to configure multiple email addresses for yourself. Virtual users can basically be configured as a list of names for which exim should accept incoming mails. Please tell us what you try to achieve. Then we may help you more in detail. – Oliver Schmidt Jul 23 '12 at 7:35

I've send this way:

cat << EOTMARKER | /usr/sbin/sendmail -t
From: user@domain.tld
To: someone@domain2.tld
Subject: Wow!
Content-Type: text/html; charset="UTF8"


Be sure you have kept empty line between message headers and body - that SMTP require.

Keep in mind, that your MTA can accept message without sender verification, but most other MTA do that. Therefore message from nonexistent user can be (and should be) silently dropped by MTA on the other side.

share|improve this answer

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.