1

I'm trying to configure an Ubuntu 11.04 box to send mail only, and not receive mail. I am fairly confused at this point. I know I need to install an MTA on the server like sendmail, postfix, or exim, but I get hung up when trying to configure them.

This is a web server, and I simply want it to be able to send mail.

Let's say the domain name is example.com. I have the email hosted with Google mail, but need this server that hosts my website to be able to send out email to both other users and email accounts like [email protected].

Also, let's say that the hostname of my server is 'greatserver'.

So here are some questions: 1. Exim asks me for my FQDN. If I read about this correctly, this is basically an address that is reachable by anyone in the internet? Should this just be "example.com"? 2. Exim asks for a semicolon-separated list of recipient domains for which this machine should consider itself the final destination. I'm not sure what to put here at all. Do I need anything other than "localhost" and "example.com"? 3. Is it correct that the hostname of my server is just a single word, or more correctly, not a domain name?

4 Answers 4

5

This isn't a direct answer to your question, however it might be the ultimate answer. Something you said piqued my curiosity:

This is a web server, and I simply want it to be able to send mail.

This all depends on how you want mail to be sent. If you're using a CMS or developing you're own application, virtually all languages have SMTP functions that can send mail without using a local MTA. Only install a full MTA if you have a verifiable reason to.

2

Exim asks me for my FQDN. If I read about this correctly, this is basically an address that is reachable by anyone in the internet? Should this just be "mydomain.com"?

This'll be presented to remote servers as the server's hostname when you're sending mail, in the EHLO SMTP statement. Set it to an address that resolves back to this server - if mydomain.com is hosted on this server, then that will work just fine.

Exim asks for a semicolon-separated list of recipient domains for which this machine should consider itself the final destination. I'm not sure what to put here at all. Do I need anything other than "localhost" and "mydomain.com"

No - the only local delivery that you'll have is local mail, such as notifications from cron jobs. FQDN and localhost will work just fine.

Is it correct that the hostname of my server is just a single word, or more correctly, not a domain name?

Kinda. Run hostname; that's your hostname. Run hostname -f; that's your fully-qualified domain name. What context do you need this for?

1
  • No context really, that was more of a general question.
    – Brian
    Apr 24, 2012 at 2:39
2

Here are the questions and options for dpkg-reconifugre exim-config which will redo your Exim configuration. I am using example.com for your domain (to which you receive mail); www.example.com for your webservers name (use either its host name including domain or domain your web server uses); and mail.example.com as the mail server which will be delivering your email. Further discussion follows.

General type of mail configuration: mail sent by smarthost; no local mail
System mail name: example.com
IP address to listen: 127.0.0.1
Other destinations: 
Visible domain name for local users:  www.example.com
IP address or host name of outgoing smarthost: mail.example.com
Keep number of DNS-queries minimal: No 
Split configuration into small files: No

An FQDN is a fully qualified domain name, for a host it consists of its hostname with the domain name as a prefix (e.g. host.example.com).

Usually you can use your ISP's relay server as the smarthost, but if you already have a mail server for outgoing email, it is often better to use it. This enables you to have better control of origin of email from your domain.

Always use email addresses which can receive email as the sender for all your email. Using an address like [email protected] is acceptable for email that does not need a reply. Addresses like noreply can accept email and automatically delete them. Doing so with address that look real is not appropriate.

Make sure mail addressed to postmaster goes to someone who can take appropriate actions. You may also want to do the same with abuse, webmaster, and hostmaster. This will enable other administrators to notify you of problems easily.

The "Visible domain name for local users" should get rewritten to the "System mail name" when email is sent off the server, but this shouldn't matter as you should use a proper domain when generating email to be sent to the Internet. I believe this domain is used in generating the Message-Id header, so it should be a unique FQDN for each server.

Consider setting up SPF records for all your domain. This will help discourage spammers from using your domain to send spam.

0

I know I need to install an MTA on the server

Actually, no, you don't need an MTA to send mail.

All you need to send mail from a Linux server is an SMTP nullclient, such as ssmtp.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .