kmanchet
By:
kmanchet

Trying to set up postfix on Ubuntu 14.04

June 2, 2017 705 views
Email Ubuntu

I am trying to set up postfix for an smtp server for my company.

I am using this tutorial: https://www.digitalocean.com/community/tutorials/how-to-install-and-setup-postfix-on-ubuntu-14-04

Everything seems to work until I get to testing it by sending an email. I have set up my A and MX recordfor the mail server (hopefully).

I am trying to use virtualaliasmaps in my /etc/postfix/main.cf file, because everyone in the company needs a separate email address.

When I try to send an email my personal account to what will be my company email, and look it /var/mail/my_name it does not show anything. Neither will it when I use mail from mailutils

I am sorry I don't have much information to give you all, I am trying to start over and work through it again to see if I can get it right this time.

When I first enter postfix and set up the internet site for sending, the fqnd should be mail.devplateau.com or just devplateau.com?

Thank you for reading, and any help will be appreciated. Just ask for more information and I will be happy to give it you.

3 comments
  • Actually, setting up your own mail server may difficult, but not impossible.
    What about using mailserver suites? and here is a painless option: Mailcow
    Mailcow is easy to install. It gives a admin panel to configuration, adding domains, accounts, virtual mailboxes, managing spam protection etc. And also have roundcube or SOGO webmail options.

    Mailcow needs

    Resource mailcow (Roundcube) mailcow (SOGo)
    CPU 1 GHz 1 GHz
    RAM 800 MiB 1 GiB
    Disk 5 GiB 5 GiB
    System Type x86 or x86_64 x86_64

    and also a domain, a subdomain for mailcow administration panel like mail.yourcompany.com and SSL

    Installation guide: https://github.com/mailcow/mailcow#installation
    Detailed wiki for post-install config https://github.com/mailcow/mailcow/wiki
    Website https://mailcow.email/

  • Hi @selcukahmet,

    Thank you for the suggestion. I set this up yesterday and it works perfectly.

    I was also wondering if you might know why I cannot get any messages received my the mailboxes I have set up with mailcow?

    I have a look around, and I have found that some people had it that inet_interfaces was not set to all but mine is.

    Any help would be appreciated.

  • @deusMach88
    First ensure that fully setting-up your DNS records and don't forget PTR ( with changing your droplet name as mail.example.org) and ensure that ports not restricted by firewall

    • IMAP: 143
    • IMAPS: 993
    • POP3: 110
    • POP3S: 995
    • SMTP: 587

    So finally check your mail server with
    https://mxtoolbox.com/

    With

    inet_interfaces = all
    
    

    Postfix can use both of IPv4-6. So you can leave as "all".
    otherwise you can specify as which is match with your needs:

    inet_interfaces = all (DEFAULT)
    inet_interfaces = loopback-only (Postfix version 2.2 and later)
    inet_interfaces = 127.0.0.1
    inet_interfaces = 127.0.0.1, [::1] (Postfix version 2.2 and later)
    inet_interfaces = 192.168.1.2, 127.0.0.1
    

    and

    inet_protocols = ipv4
    inet_protocols = all (DEFAULT)
    inet_protocols = ipv6
    inet_protocols = ipv4, ipv6
    
3 Answers

Hi @deusMach88

First off, just want to tell you that running your own mail server difficult. Dealing with spam, malware, security, storage and much more is a constant job.
I would recommend that you don't run your own mail server, but use one of the many providers available like https://www.fastmail.com or https://gsuite.google.com

That being said, there might be other reasons for running your own mail server, but since it seems like you're new to Postfix, I would probably recommend using a control panel like https://vestacp.com which will take care of a lot of advanced configuration and make it much easier to manage everything.
I'm guessing you want to run more than Postfix, since that's only a SMTP - you probably want something like IMAP and perhaps even a webmail too. And on top of that, anti-spam and other measures. This is where VestaCP will give you a helping hand.

Hi @hansen,

I didn't realize there were feel control panels for email. If I cannot get postfix working, I will look into vestacp.com.

We are a small company just starting out and I was under the impression that we did not have a lot of funds for purchasing email services.

Thank you for the information!

@hansen

Thank you for all the links! The other person on our IT team and I will have a look over the material and see what we want to do.

Have another answer? Share your knowledge.