mail server setup? using free DNS services. ultimate setup needed

Discussion in 'Server Operation' started by mnewbegin, Jun 10, 2007.

  1. mnewbegin

    mnewbegin New Member

    I have setup my server at work; it is going to be for mail/web server functions.

    I followed the link here

    Setup guide

    But when I try to send mail out it comes as
    instead of

    I know I can change this but during the install it said to use localhost, and a few others for the name, to make sure mail sends correctly.

    My other problem is I am using webmin, I love it but everyone says it’s harder to configure than ispconfig, it looks so nice though and seems to do the trick.

    My 2 main concerns are getting the domain name settled and getting incoming mail working. I am not using bind, I am using free dns servers, and they provide me with 4 name servers. I am using “everydns” service, but I don’t know how to add a MX record for that service, do I just make one that’s called or
    And point it to my IP address and my server will do the rest?

    I cannot receive mail to this box now because I have no incoming mail server configured.

    I have a static IP address, and can buy another if I need a second IP address.

    Please help,

    Ultimately I want to end with I will be shooting for hosting, my mailserver that will provide services for 60 email clients,


    also what program should i use for a gui interface?

    squirrelmail ? and do you recommend postfix or other for this number of clients.

    a step by step guide start to finish just configuring mailserver part would be excellent.
  2. falko

    falko Super Moderator

    You must set the correct sender address in your email client (e.g. Thunderbird, Outlook, Evolution,...).

    You must create an A record for or (doesn't matter) which points to your server's public IP address, and then you must create an MX record like this:

    Code: MX 10

    Code: MX 10
    Of course, Postfix must be configured to accept emails for You can either do this with webmin or on the command line:

    You don't need a second IP address. :)

    Squirrelmail is fine.

    You can't go wrong with Postfix. :)
  3. mnewbegin

    mnewbegin New Member

    im still sort of lost

    Ive caught on to most of what I had to do for this stuff but im still lost, I started over with a fresh install.

    When I was using the perfect setup ubuntu 7.04 tutorial,

    What do i type here

    The directions say

    echo > /etc/hostname

    my hostname right now is ubuntu

    but for my mail to resolve correctly, do I change this to or just plain

    and then further down in the instructions I what do I use for.


    and other destinations to accept mail for?

    on the ubuntu page

    they show an example of

    I have configured to goto my ip address all ready.

    sorry some of the generic directions mess with my head during the setup, if someone posts an example just make a fake company name please.
  4. falko

    falko Super Moderator

    First you must make up your mind which hostname you want to use (e.g. Then you simply replace with should have an A record pointing to your server. If you want to receive emails for, you create an MX record like this: MX 0
  5. mnewbegin

    mnewbegin New Member

    hopefully this will help me and others.

    hopefully this will help me and others,

    here are screenshots of what I have.

    how do i fix this.

    I will post any file needed here so i can get this working.

    I thought, a picture speaks a thousand words, so where could i go wrong.

    there has to be something wrong with my setup.

    mail goes out, but doesnt come in.

    I am running postfix, dovecot, im installing squirrelmail soon, and hopefully I will have this working today.

    I hope I have all the available ports and things open.

    I can do a clean install if i need to.
    Last edited: Jun 21, 2007
  6. falko

    falko Super Moderator

    The DNS records look ok (if is your server's IP address).

    What's the output of
    postconf -n
    netstat -tap
    ? Any errors in your mail log?
  7. mnewbegin

    mnewbegin New Member


    mark@ubuntu:/$ postconf -n

    alias_database = hash:/etc/aliases
    alias_maps = hash:/etc/aliases
    append_dot_mydomain = no
    biff = no
    broken_sasl_auth_clients = yes
    config_directory = /etc/postfix
    home_mailbox = Maildir/
    inet_interfaces = all
    inet_protocols = all
    mailbox_command = procmail -a "$EXTENSION"
    mailbox_size_limit = 0
    mydestination =, localhost, localhost.localdomain, localhost
    myhostname =
    mynetworks =
    myorigin = /etc/mailname
    recipient_delimiter = +
    relayhost =
    smtp_tls_note_starttls_offer = yes
    smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache
    smtp_use_tls = yes
    smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
    smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_local_domain =
    smtpd_sasl_security_options = noanonymous
    smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
    smtpd_tls_auth_only = no
    smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
    smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
    smtpd_tls_loglevel = 1
    smtpd_tls_received_header = yes
    smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
    smtpd_tls_session_cache_timeout = 3600s
    smtpd_use_tls = yes
    tls_random_source = dev:/dev/urandom

    mark@ubuntu:~$ netstat -tap
    (Not all processes could be identified, non-owned process info
    will not be shown, you would have to be root to see it all.)
    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
    tcp 0 0 ubuntu.lyncomail.c:2208 *:* LISTEN -
    tcp 0 0 *:imaps *:* LISTEN -
    tcp 0 0 *:pop3s *:* LISTEN -
    tcp 0 0 *:mysql *:* LISTEN -
    tcp 0 0 *:netbios-ssn *:* LISTEN -
    tcp 0 0 *:pop3 *:* LISTEN -
    tcp 0 0 *:imap2 *:* LISTEN -
    tcp 0 0 *:webmin *:* LISTEN -
    tcp 0 0 *:www *:* LISTEN -
    tcp 0 0 *:* LISTEN -
    tcp 0 0 *:smtp *:* LISTEN -
    tcp 0 0 *:https *:* LISTEN -
    tcp 0 0 *:microsoft-ds *:* LISTEN -
    tcp 0 0 ubuntu.lyncomail.c:2207 *:* LISTEN -
    tcp6 0 0 *:5900 *:* LISTEN 13869/vino-server
    tcp6 0 0 *:ftp *:* LISTEN -
    tcp6 0 0 *:ssh *:* LISTEN -
    tcp6 0 0 ip6-localhost:ipp *:* LISTEN -
    tcp6 0 0 *:smtp *:* LISTEN -

    where do i find my mail log file?
    im kinda new to postfix sorry.
  8. mnewbegin

    mnewbegin New Member


    I went into my mailbox and i had a message in there
    but i cant remember if i have changed my server name in apache,

    what should that be set at at my situation?

    apache2: apr_sockaddr_info_get() failed for
    apache2: Could not reliably determine the server's fully qualified domain name, using for ServerName
    apache2: apr_sockaddr_info_get() failed for
    apache2: Could not reliably determine the server's fully qualified domain name, using for ServerName
  9. falko

    falko Super Moderator

    I don't see the file included in your Postfix configuration where the email addresses are definded. What's the output of
    ls -la /etc/postfix
  10. mnewbegin

    mnewbegin New Member


    heres the output

    root@ubuntu:/home/mark# ls -la /etc/postfix
    total 88
    drwxr-xr-x 4 root root 4096 2007-06-19 13:26 .
    drwxr-xr-x 119 root root 12288 2007-06-25 09:46 ..
    -rw-r--r-- 1 root root 318 2007-06-15 14:15
    -rw-r--r-- 1 root root 1750 2007-06-19 13:26
    -rw-r--r-- 1 root root 3968 2007-06-15 14:15
    -rw-r--r-- 1 root root 17975 2007-03-28 10:40 postfix-files
    -rwxr-xr-x 1 root root 6840 2007-03-28 10:40 postfix-script
    -rwxr-xr-x 1 root root 22239 2007-03-28 10:40 post-install
    drwxr-xr-x 2 root root 4096 2007-06-15 14:19 sasl
    drwxr-xr-x 2 root root 4096 2007-06-15 14:24 ssl
  11. falko

    falko Super Moderator

Share This Page