Mailserver on Ubuntu 6 (Dapper Drake)

Should be pretty easy huh ? Well, not really… there’s one glitch with Exim4 — by default, it delivers email to “mail_spool”, as can be seen from the /var/log/exim4/mainlog here :

=> wanto <wanto@kantor> F=<harry @kantor> P=<harry @kantor> R=local_user T=mail_spool

Incoming email ended up never arrived in my users Maildir.

The solution :

  1. Edit /etc/exim4/update-exim4.conf.conf : gedit /etc/exim4/update-exim4.conf.conf
  2. Add the following line at the end of it : dc_localdelivery=maildir_home
  3. Shutdown Exim4 : pkill exim4
  4. Reconfigure Exim4 : dpkg-reconfigure exim4-config
    (Follow the guide below if you’re confused what to answer on the questions)
  5. That’s it ! Now incoming email will be delivered to your users’ Maildir

I’ve setup this particular server so users can send and fetch email locally.

Email for external destination (Internet) will be relayed through a smarthost. This makes sending huge email very speedy. So they can return to their work quickly and happy (leaving this server working hard trying to send their multi-megabyte emails through a tiny internet pipe *grin* )

With help from Dovecot, they can also send email to each other by [my_name]@office email addresses. This saves me from the headache of setting up a file server AND controlling the access rights.

To set it up this way, follow these steps :
(disclaimer: this is from on top of my head, so please CMIIW)

  1. aptitude install exim4 exim4-config dovecot-pop3d
  2. When configuring Exim4, follow these steps :
  3. Split configuration into small files? NO
  4. General type of mail configuration: (there are 6 choices) : mail sent by smarthost; received via SMTP or fetchmail
  5. System mail name: Whatever, mine is “office
  6. IP-addresses to listen on for incoming SMTP connections: Leave this blank
  7. Other destinations for which mail is accepted: I entered office again here
  8. Machines to relay mail for: Enter your LAN network, mine is
  9. Machine handling outgoing mail for this host (smarthost):, or whatever works for you
  10. Hide local mail name in outgoing mail? YES
  11. Visible domain name for local users: Set to your company’s internet domain name, example :
  12. Keep number of DNS-queries minimal (Dial-on-Demand)? Up to you really, I chose NO because my company got a fixed (always-on) internet access
  13. Once everything done, Exim4 and Dovecot will be running. But there’s still one thing left to configure – the smarthost
  14. Setup the Smarthost (relay for external/internet email) :

    # gedit /etc/exim4/passwd.client
    # Then put something like this :

  15. Restart exim4 :

    pkill exim4
    invoke-rc.d exim4 start

Done ! Now your mailserver is functioning.

On your users’ computer, set up as follows :

  • SMTP server : office
  • POP3 server : office
  • POP3 username : Their username in that server
  • POP3 username : Their password in that server


41 thoughts on “Mailserver on Ubuntu 6 (Dapper Drake)

  1. Previously, I always set up my own SMTP in a part of fetchmail-mutt-procmail “guardian club”. Ubuntu changed my habbit: it comes without mail server in default and provide my system with a desktop-based choice. I “comply” this situation by not-installing SMTP server and let my Evolution connect directly to my organisation’s mail server.

    Yeah, it is evolution of my style… 🙂

  2. Welcome to Ubuntu Pak 🙂 btw; on 19 Sep we’ll be in a meeting with Canonical, in our attempt to propose for the Ubuntuk Indonesia Local Community team. Would you like to join in ? If you can make it, it’ll be in #ubuntu-meeting @
    Enjoy Ubuntu 🙂

  3. I found your site on technorati and read a few of your other posts. Keep up the good work. I just added your RSS feed to my Google News Reader. Looking forward to reading more from you down the road!

  4. I found your site on technorati and read a few of your other posts. Keep up the good work. I just added your RSS feed to my Google News Reader. Looking forward to reading more from you down the road! Thanks Thanks Thanks..

  5. Blu Ray Disc Copy is a professional and practical software which supports Blu ray movies copying as well as DVD copying. You can use this Blu Ray Disc Copy software to copy Bluray disc, Bluray folder, or Blueray ISO file without any quality loss. All the contents can be copied to the target file/disc quickly and perfectly. Blu Ray Disc Copy supports all Blu ray and DVD discs and it can remove AASC, CSS, and region protection from them. So that enjoying your Blu ray discs and DVDs freely and conveniently is no longer a problem for you.....

  6. I like to post this comment .It helps a lot.The one thing I do know for sure, if that day comes, is that when it’s wedding cake cutting time, I will NOT make the same mistake I witness at every wedding. I will not be serving Champagne with dessert, but rather the slightly sweet and fizzy dessert wine,..

    Thanks and Regards

  7. Want to know how to cheat at poker, you should know the poker cheating device and cheat cards, then you will cheat at cards by using this device.

Leave a Reply

Your email address will not be published. Required fields are marked *