Mail aliasing is another form of mail forwarding. In earlier days of postfix, we used to configure email aliases to forward emails. In this article, we will check the details of email forwarding and aliasing.
Understanding The Mail Forwarding Concept
Let’s take a look at some scenarios:
Your company’s existing contact email address is something like
email@example.com. As you can see the address is self-explanatory and quite difficult for the user’s to use. So you want another easy address that can also collect emails on behalf of
firstname.lastname@example.org. So you set an easy alias(
email@example.com and all the emails destined for these two emails will be delivered to the same mailbox.
You want to set up forwarding in such a way that a copy of all of your incoming and outgoing emails will be saved/forwarded to another mailbox.
What if your organization demands multiple levels of forwarding as shown in the below-mentioned image? Take a look:
I hope now you have got some ideas about aliasing and forwarding. So let’s check how can we configure them.
How To Configure Email Aliasing Using GUI?
You can configure email aliasing using both GUI and CLI panels.
Let’s try the GUI first. From the screenshot, you can see we have an existing contact address(
contactthe firstname.lastname@example.org). But as you can see it is very inconvenient to use as an email address.
So you want another easy-looking address as an alias for the mentioned address. Go to the Aliases and create one.
So now whoever mails to
email@example.com, the email will be delivered to the inbox of
Let’s send a test message to
firstname.lastname@example.org and check both log and inbox:
Aug 8 13:59:44 mail postfix/smtp: 5A3332419C1: email@example.com, firstname.lastname@example.org, relay=127.0.0.1[127.0.0.1]:10026, delay=0.13, delays=0.01/0.01/0/0.11, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10030): 250 2.0.0 Ok: queued as 71EE12419C4) Aug 8 13:59:44 mail postfix/qmgr: 71EE12419C4: removed
And you can the message sent to
email@example.com is successfully delivered to
contactthe firstname.lastname@example.org‘s mailbox.
With CLI access, you can easily create an alias email address with the following commands:
root@mail:~# su - zimbra zimbra@mail:~$ zmprov aaa email@example.com firstname.lastname@example.org
How To Configure always_bcc Using CLI?
As mentioned earlier that a copy of all of your incoming and outgoing emails will be saved in a designated email address through this auto_bcc settings. And you can set only 1 (One) address as auto_bcc address. Let’s see how you can do it:
[Add auto_bcc in /opt/zimbra/common/conf/main.cf] vi /opt/zimbra/common/conf/main.cf always_bcc = email@example.com [save & exit] zimbra@mail:~$ postfix reload /postfix-script: refreshing the Postfix mail system
Check the settings by testing send/receive emails.
How To Configure Multiple Forwarding Using CLI?
We can configure multiple forwarding using sender_bcc and recipient_bcc.
# su - zimbra $ cd /opt/zimbra/common/conf/ $ vi sender_bcc firstname.lastname@example.org email@example.com [Remarks: Whenever firstname.lastname@example.org sends an email, email@example.com will get one copy of it] $ vi /opt/zimbra/common/conf/main.cf sender_bcc_maps = lmdb:/opt/zimbra/common/conf/sender_bcc $ postmap /opt/zimbra/postfix/conf/sender_bcc $ postfix reload VERIFY $ postconf | egrep "sender_bcc_maps"
# su - zimbra $ cd /opt/zimbra/common/conf/ $ vi recipient_bcc firstname.lastname@example.org email@example.com [Remarks: whenever firstname.lastname@example.org receives an email, email@example.com will get one copy of it] $ vi /opt/zimbra/common/conf/main.cf recipient_bcc_maps = lmdb:/opt/zimbra/common/conf/recipient_bcc $ postmap /opt/zimbra/postfix/conf/recipient_bcc $ postfix reload VERIFY $ postconf | egrep "recipient_bcc_maps"
This is how you can set multiple layers of forwarding in your Zimbra server.
How To Configure Simple Forwarding From Admin Panel?
As a system admin, you can also configure simple email forwarding form the GUI admin panel. To do so, login into the admin panel of your zimbra server. Go to Manage > Accounts and double click the account to open its settings where you can find options for mail forwarding.
In the upper section of this forwarding option, you can set following policies:
- Allow the user to specify a forwarding address – If this option is checked only then the following option “User-specified forwarding addresses” can be set.
- Don’t keep a local copy of messages – If you want to keep any copy of a forwarded message, you need to uncheck this option. If this option is checked, then no local copy of forwarded message will be stored into original recipient’s inbox.
- User-specified forwarding addresses – User can specify a forwarding address here and user will be able to notice the forwarding.
In this lower section of the forwarding option, you can set following policy:
- Forwarding addresses hidden from the user – If any forwarding address is set here, it will be hidden from the user.
In this article, you learnt, how to set aliasing and multiple types of forwarding in your Zimbra Server.
So that’s it for today.