PowerMTA SMTP Users section is used to create SMTP user credentials for your PowerMTA installation. There’s no limit on the number of SMTP users you can create. Part 2 of the How to Configure PowerMTA series is going to show you how to create new PowerMTA SMTP users.
Configure PowerMTA SMTP User
We’ve configured PowerMTA General Options in the previous tutorial. SMTP users’ section of the PowerMTA configuration file is comparably smaller than General Options section. it already contains a code snippet for a sample user which looks like below,
password vip1caa6e9fac9c
source {pmta-auth1}
The first line of the above snippet creates an SMTP user with username contact. The line reads,
You need to change contact with your own choice of a username. We’ll use vpsfix for this tutorial. The second line of the code specifies a password for the user. You need to change that too. We’ll be using 1234vpsfix as an example. That’s all you need to change in this section if you only need one SMTP user. Our modified snippet looks like this.
############################################################################
# BEGIN: SMTP USERS
############################################################################
password 1234vpsfix
source {pmta-auth1}
############################################################################
# END: SMTP USERS
############################################################################
We’ll look into adding a second SMTP user in the next section of this tutorial. You can skip that and go to part 3: Virtual MTA if you don’t need multiple SMTP users.
Configure Multiple PowerMTA SMTP Users
Adding additional SMTP users to your PowerMTA server is as easy as it can get. You just need to duplicate the sample snippet from earlier and change the username. We’ll add a new SMTP-user with username vpsfix1 and password 1234vpsfix1. The code will look like this,
password 1234vpsfix1
source {pmta-auth1}
Now we have 2 SMTP users vpsfix and vpsfix1 configured on our PowerMTA server. These users will be using the same set of IP addresses to send out emails. The modified PowerMTA SMTP user section will look like this,
############################################################################
# BEGIN: SMTP USERS
############################################################################
password 1234vpsfix
source {pmta-auth1}
password 1234vpsfix1
source {pmta-auth1}
############################################################################
# END: SMTP USERS
############################################################################
While that’s all you need to have multiple SMTP users on your PMTA server, more advanced configuration is certainly possible. We’ll look into a scenario where you need each SMTP user to have their own set of dedicated IPs.
PowerMTA SMTP users with Individual VirtualMTA Pools
The above SMTP user configuration uses a single Virtual MTA Pool (pmta-pool1) defined by {pmta-auth1} across two smtp user accounts. Meaning both accounts will be sharing a single IP address or set of IP addresses. A PMTA pool can be a single VirtualMTA or set of VirtualMTAs defined in the configuration file. We’ll cover PowerMTA VirtualMTAs in the 3rd tutorial and VirtualMTA pools in the 4th tutorial of this series.
If you want to use dedicated IP addresses for each SMTP user, you can configure it using source. If you look at the SMTP user configuration we added earlier, both users have source {pmta-auth1}Â on their configuration. And settings for {pmta-auth1} is defined a bit later which uses pmta-pool1Â defined by the value of default-virtual-mta.
So, to have dedicated IPs for each SMTP user, you need to have dedicated VirtualMTA pools defined for each SMTP user. Let’s take vpsfix1 and give them a dedicated VirtualMTA pool like this,
password 1234vpsfix1
source {pmta-auth2}
If you look closely, you’ll notice that we’ve changed line 3 on the above snippet and changed {pmta-auth1} to {pmta-auth2}. So, after this change user vpsfix is using {pmta-auth1}Â and vpsfix1 is using {pmta-auth2}.Â
Next, we’ll configure {pmta-auth2}. Copy the following snippet and paste it after source {pmta-auth1} section.
Line 6 of above snippet configures {pmta-auth2} to use pmta-pool2 which we will be adding on part 4 of this tutorial. The SMTP Users section of the PowerMTA configuration file should look like below after the changes,
############################################################################
# BEGIN: SMTP USERS
############################################################################
password 1234vpsfix
source {pmta-auth1}
password 1234vpsfix1
source {pmta-auth2}
############################################################################
# END: SMTP USERS
############################################################################
That should do it. Please don’t use the sample usernames and passwords mentioned in this tutorial. We’ll look into PowerMTA VirtualMTAs and IP rotation in the next tutorial.