exiwhat

exiwhat commands shows what exim mail server is doing.

exim

mail-in-a-box

Install Mail-in-a-Box

Mail-In-A-Box is a complete mail server, that included webmail, smtp, imap, pop3.

https://mailinabox.email

Installation

You need Ubuntu 14.04 to install Mail-In-A-Box.

Before you start installation, make sure you have server hostname set properly.

To start installation, run

During installation, it ask you to set password for admin email account – [email protected]

Once installation finished, you will be able to login at

https://YOUR-SERVER-IP/admin

mail-in-a-box

Dovecot

Dovecot is a IMAP/POP3 server.

To install on Debian/Ubuntu, run

To see dovecot config, run

elasticemail postfix

Configure ElasticEmail with Postfix

To configure ElasticEmail with postfix, first install sasl support

On Debian/Ubuntu

On RHEL/CentOS

Edit postfix config

On Ubuntu/Debian, you need to comment the line starting with “relayhost”.

Add following

Now create file

Add following content

You can find your SMTP user name and password from

https://elasticemail.com/account/#/settings/apiconfiguration

elasticemail postfix

Now run

Restart postfix with

Postfix will relay mails using postfix now.

See postfix

Setting up Mail Forwarding in Postfix

To setup mail forward in postfix,

Edit postfix config file

Add

Create file /etc/postfix/virtual_alias_domains

Add your domains on this file. 1 Per line.

Example

Here i have 2 domains added, postfix will service as incoming email server for these 2 domains.

Now create /etc/postfix/virtual_alias_maps, this file will list all email accounts you need and where the email needed to be forwarded to.

Add

here email coming to [email protected] and [email protected] get forwarded to [email protected]

If you need catch all email account, just use

If you want email forwarded to more than one recipient, add them one after other like

Now run

Restart postfix

You need to set MX record of your domain to point to server running the postfix mail server to receive mails.

Configure Postfix to sent emails using MailGun

First install requirements

Run

Edit /etc/postfix/main.cf

Add

Create file /etc/postfix/sasl_passwd

Replace SMTP_LOGIN and SMTP_PASSWORD with your user and password you get from mailgun.

Run

Restart postfix

You can test email with