-- MikeGore - 24 Jun 2009

Ubuntu Email setup

POSTFIX

This is a very simple mail system to setup
  • apt-get install postfix

Config POSTFIX

  • dpkg-reconfigure postfix
    • Configuration: Internet Site
    • System mail name: (Your machines FQDN - fully qualified domain - name goes here)
      • Example: host.cs.uwaterloo.ca
    • Root and postmaster mail recipient: (userid of account to receive root and postmaster email)
    • Other destinations to accept mail for: (make sure this includes the FQDN and local domain names)
      • Example: host.cs.uwaterloo.cs, host.cs, localhost.cs, localhost
    • Force synchronis updates on mail queue: No
    • Local Networks: localhost (Relay Networks leave as localhost unless you relay email bad idea!)
    • Mailbox size limit: 0
    • Local Address extention character: +
    • Internet Protocol to use: ipv4

EXIM4

EXIM4 as a MTA/MDA (Mail Transfer Agent/Mail Delivery Agent) - See http://www.exim.org/
Note: in this example we setup email as an Internet connected site *we send and receive email directly but we do NOT do relaying

Ubuntu 8.10 email setup

  • Become root: sudo bash
  • apt-get install dovecot exim4
  • dpkg-reconfigure exim4-config
    • Internet site; mail is sent and received directly using SMTP
    • Full hostname, example swag-new.cs.uwaterloo.ca
    • IP-addresses to listen on for incoming SMTP connections from anywhere: 127.0.0.1 (ie. local SMTP ONLY)
      • -OR- for full mail servers that receive from anywhere you need to LEAVE BLANK
    • Other destinations for which mail is accepted: If there are alternate host names enter them here
    • Domains to relay mail for: LEAVE BLANK
    • Machines to relay mail for: LEAVE BLANK
    • Keep number of DNS-queries minimal (Dial-on-Demand)? No
    • Delivery method for local mail: mbox format in /var/mail/
    • Split configuration into small files? No
  • /etc/dovecot/dovecot.conf changes
    • protocols = imaps
    • mail_location = mbox:~/mail:INBOX=/var/mail/%u
  • /etc/init.d/dovecot restart

  • You are done!

Relaying

You do not ever want to be an open realy!
  • If you do put something in the "Machines to relay mail for" question put only individual machines like mxer.uwaterloo.ca or 129.97.152.0/24 (for CS machines)

Debugging

  • Download and Install a GUI Exim4 Monitor
    • apt-get install geximon
  • Notes: This tool will let you see all of the transactions that happen when email is sent,received,forwarded

Smarthost setup using mail.cs.uwaterloo.ca

  • apt-get install exim4
  • dpkg-reconfigure exim4-config
    • Mail Server configuration -> OK
    • mail sent by smarthost; received via SMTP or fetchmail -> OK
    • System mail name: (put in our full name with the uwaterloo.ca part included) -> OK
    • Read note about listening IP addresses -> OK
    • IP-addresses to listen on for incoming SMTP connections from anywhere: 127.0.0.1 (ie. local SMTP ONLY)
      • -OR- for full mail servers that receive from anywhere you need to LEAVE BLANK
    • recipient domains (put in our full name with the uwaterloo.ca part included) -> OK
    • Machines to relay mail for: (LEAVE BLANK) -> OK
    • IP address or host name of the outgoing smarthost: mail.cs.uwaterloo.ca -> OK
    • Hide local mail name in outgoing mail? NO
    • Read note about DNS lookups -> OK
    • Keep number of DNS-queries minimal (Dial-on-Demand)? NO
    • Delivery method for local mail: mbox format -> OK
    • Split configuration into small files? NO
Your done!
Edit | Attach | Watch | Print version | History: r8 < r7 < r6 < r5 < r4 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r8 - 2011-03-16 - MikeGore
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback