Page 2 of 5 FirstFirst 1234 ... LastLast
Results 11 to 20 of 41

Thread: Set up an internal mail server

  1. #11
    Join Date
    Nov 2009
    Location
    Catalunya, Spain
    Beans
    14,560
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: Set up an internal mail server

    Quote Originally Posted by kennethconn View Post
    You do not need to go near DNS for your requirements.

    https://help.ubuntu.com/12.04/server...iguration.html

    If you have read and understood this, you should be able to get this set-up working (again, based on your requirements).
    Pardon my ignorance, but what is the idea here? Using the local hosts file can help relate hostname with local IP, but wouldn't the email sending require MX record information? How can you implement that without your own DNS server in this case when you are working only with local domain??
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 18.04 LTS 64bit

  2. #12
    Join Date
    May 2012
    Beans
    122

    Re: Set up an internal mail server

    It is dealt with in the Postfix configuration, to the best of my knowledge. Let me see if I can find that particular configuration file (internal mail server scenario) for the OP.

  3. #13
    Join Date
    Jul 2006
    Location
    Gujranwala, Pakistan
    Beans
    139
    Distro
    Ubuntu

    Re: Set up an internal mail server

    Quote Originally Posted by kennethconn View Post
    It is dealt with in the Postfix configuration, to the best of my knowledge. Let me see if I can find that particular configuration file (internal mail server scenario) for the OP.
    That would be great because i've been googling and i've found random threads here and there but not a full postfix tutorial for internal mail server w/o setting up a domain.

  4. #14
    Join Date
    Nov 2009
    Location
    Catalunya, Spain
    Beans
    14,560
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: Set up an internal mail server

    If the DNS part is where you are getting stuck, and if you want to try it, here is a tutorial about quick DNS setup on ubuntu:
    http://www.pressbyte.com/4581/setup-...ntu-vps-quick/

    I don't think configuring DNS with a local domain should be stopping you.
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 18.04 LTS 64bit

  5. #15
    Join Date
    Jul 2006
    Location
    Gujranwala, Pakistan
    Beans
    139
    Distro
    Ubuntu

    Re: Set up an internal mail server

    Quote Originally Posted by darkod View Post
    If the DNS part is where you are getting stuck, and if you want to try it, here is a tutorial about quick DNS setup on ubuntu:
    http://www.pressbyte.com/4581/setup-...ntu-vps-quick/

    I don't think configuring DNS with a local domain should be stopping you.
    If Postfix can be configured to deliver mail locally without setting up a DNS server and a domain, I'd like to try that first.

  6. #16
    Join Date
    Jul 2006
    Location
    Gujranwala, Pakistan
    Beans
    139
    Distro
    Ubuntu

    Re: Set up an internal mail server

    I installed debian 6 in vmware player, set network to bridge mode. Selected both mail server and dns server during installation. It asked for a domain name during installation which I set to javed.local.
    After that I installed postfix and dovecot and selected "local only" during postfix configuration setup.
    I followed the debian wiki instructions for postfix and sent a test email from root@localhost to saad@localhost. That worked. Now how do I extend it to send email to other machines on the network (none of which are a part of javed.local domain). Like I want to send an email from saad@debian (machine 1) to saad@ubuntu (machine 2)...

    Here is the postfix config file:

    Code:
    # See /usr/share/postfix/main.cf.dist for a commented, more complete version
    
    
    # Debian specific:  Specifying a file name will cause the first
    # line of that file to be used as the name.  The Debian default
    # is /etc/mailname.
    #myorigin = /etc/mailname
    
    smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
    biff = no
    
    # appending .domain is the MUA's job.
    append_dot_mydomain = no
    
    # Uncomment the next line to generate "delayed mail" warnings
    #delay_warning_time = 4h
    
    readme_directory = no
    
    # TLS parameters
    smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
    smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
    smtpd_use_tls=yes
    smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
    smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
    
    # See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
    # information on enabling SSL in the smtp client.
    
    myhostname = debian.javed.local
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    myorigin = /etc/mailname
    mydestination = debian.javed.local, localhost.javed.local, localhost
    relayhost = 
    mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
    mailbox_command = procmail -a "$EXTENSION"
    mailbox_size_limit = 0
    recipient_delimiter = +
    inet_interfaces = loopback-only
    default_transport = error
    relay_transport = error

  7. #17
    Join Date
    May 2012
    Beans
    122

    Re: Set up an internal mail server

    My understanding of internal mail server is that everybody from your organisation can send email internally to each other. So you have two users on your local network like saad@javed.local and user2@javed.local that can send and receive email. I have got this up and running in the past purely as a learning exercise (but it was a long time ago and I thought I had the config files saved for future reference, can't seem to locate them at the moment).

    What you wish to do sounds a bit cumbersome going forward. I think you need to research a bit more before you start actually configuring. SeijiSensei and darkod have made relevant points in their posts, and I'd imagine they have a lot more experience with configuring mail servers.

  8. #18
    Join Date
    Nov 2009
    Location
    Catalunya, Spain
    Beans
    14,560
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: Set up an internal mail server

    I still think you can't do this without your own local DNS, which I guess you didn't install yet. But I might be wrong.

    It's own thing to select 'local' when installing postfix, but I don't see how that can tell other machines on your network where to find the mailserver. Only DNS service can do that, of any kind. You can use bind9, dnsmasq, or any other similar service, but they need to know where to find the mailserver.

    Right now your machines are using public DNS, or the router as DNS which is the same thing, and the public DNS servers have no clue what javed.local is.
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 18.04 LTS 64bit

  9. #19
    Join Date
    Jul 2006
    Location
    Gujranwala, Pakistan
    Beans
    139
    Distro
    Ubuntu

    Re: Set up an internal mail server

    These are postfix config values I collected from google searches about setting up postfix w/o a domain. Since I have no clue what they actually mean...I thought i'd post them here. Would they work?

    Code:
    myhostname = debian
    mydomain = javed.local
    myorigin = $mydomain
    inet_interfaces = all
    mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
    mynetworks = 192.168.0.100/24, 127.0.0.0/8
    relay_domains = 
    home_mailbox = Maildir/
    append_dot_mydomain = no
    disable_dns_lookups = yes
    saad@ubuntu <-----------------> saad@debian
    (192.168.0.103)--------------------(192.168.0.106)
    Laptop--------------------------------Server

    Can I specify in postfix config different destination addresses like deliver mail to saad@ubuntu at 192.168.0.103? I have 4 machines on the network so i could easily specify addresses manually.

    @darkod If there is any hope to do this w/o setting up a DNS Server, I'll chase it because BIND looks mighty scary. If it doesn't work....I'll set up a DNS Server then
    Last edited by sbjaved; November 18th, 2012 at 09:51 PM.

  10. #20
    Join Date
    Nov 2009
    Location
    Catalunya, Spain
    Beans
    14,560
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: Set up an internal mail server

    I think the network needs to be specified as 192.168.0.0/24, the whole subnet. The 192.168.0.100 might be the server IP but the whole network definition is 192.168.0.0/24.

    In my opinion, you are looking at the domain thing in a wrong way. The point is not whether or not the server is part of a domain.

    The point is how will the client computers know where the server is to deliver mail to it?

    I see the hostname is debian, so do a quick test. From any of the other machines on the network, try to ping the server:
    ping debian.javed.local

    I bet it won't find it, because it doesn't know where javed.local is. That's why you need local DNS to tell the other computers:

    1. The MX record for the domain javed.local points to debian.javed.local
    2. That debian.javed.local is at 192.168.0.100

    You don't need a domain network installed, but you do need DNS resolution that is able to identify the MX record and the server IP.
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 18.04 LTS 64bit

Page 2 of 5 FirstFirst 1234 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •