postfix mail server

Postfix email forward

On an Ubuntu Server, i done following to setup email forwarding.

Install postfix

Edit /etc/postfix/main.cf, add following

Add

Create Virtual mailbox

Add

Create alias file, used for mail forwarding

Add

Wth above configuration, mail coming to [email protected]_HERE.com will get forwarded to [email protected] Email coming to [email protected]_HERE.com get delivered to local mailbox folder.

Now run following commands to make hashmap

Restart postfix

iredmail increase mail attachment size

Default mail attachment size in iredmail is 10 MB. To increase mail attachment size, login to server as user root, run following commands

Here 104857600 is 100 MB in bytes (100 * 1024 * 1024). Change this as required. Sending very large file using mail attachment is not recommended, it is better use file sharing services like Google Drive, Dropbox, Microsoft OneDrive or another file hosting service for sharing large files.

Now edit php.ini file

Change value for 3 of the following settings. It can be anything above 100 MB or whatever attachment size you want to use.

Restart php-fpm

Edit roundcube configuration file

Set value for

Edit Nginx config file

Set value for

restart nginx

Zimbra webmail not working on port 80/443

On Zimbra mail server, webmail stopped working on Port 80/443. Admin interface worked properly on url https://hostname:7071/. There is no errors displayed under monitor tab of Zimbra Admin.

To fix, run

After running this, netstat -lntp start showing nginx running on port 80 and 443

Zimbra Mail Server CentOS firewall settings

On CentOS 7 server with firewalld running, used following command to open ports used by Zimbra Mail Server.

See Zimbra, firewall-cmd

Zimbra redirect webmail http to https

After Zimbra mail server installed, webmail work on url

https://SERVER-HOSTNAME-HERE/

If you access webmail with out HTTPS, it won’t work.

To set HTTP to redirect to HTTPS, login to server as root, switch to user zimbra

Run

Wait few minutes, HTTP link will redirect to HTTPS.

You need to wait few minutes before it can start working on HTTPS port, no restart required.

Now netstat shows nginx runs on port 80

See Zimbra

Zimbra SSL install

Install SSL Certificate on Zimbra mail server

To install SSL certificate for Zimbra Mail Server, login to server, switch to user zimbra

Now create file commercial.key, paste your Private key.

In commercial.crt, paste your SSL certificate.

Create commercial_ca.crt with content of your ca-bundle file.

Verify SSL cerificate

Zimbra SSL

If SSL verified sucessfully, you can install it with command

Zimbra SSL install

To make SSL active, you need to restart Zimbra mail server with command

DMARC

DMARC is used to protect your email from email spoofing. DMARC use SPF and DKIM record to validate your email.

DMARC is a TXT record added in your domain DNS.

DMARC record look like

p=POLICY_HERE

This specifies what to do with incoming email that fails DMARC.

Valid options are none, quarantine and reject.

p=none – used for monitoring. If DMARC fails, remote mail server will sent a mail to “rua” or “ruf” tags specified in DMARC record.

p=quarantine – tell recipient mail server to put message in SPAM folder if DMARC fail.

p=reject – reject mail if DMARC fail.

rf=afrf – Specify type of report you will get.

Postfix disable IPv6

To disable IPv6 on postfix mail server, edit

Find

Replace with

Restart postfix

Method 2