Simplest Way to Configure Postal & Create SMTP + Install SSL
In the article Install Postal SMTP server on Ubuntu 22.04, I already have discussed steps to install Postal Successfully. Now in this article, I will tell you the commands and steps required to configure Postal, create organizations, add domains, create SMTP, etc. Apart from that, I will also discuss the steps required to install an SSL certificate. Now, here note that SSL for click tracking is handled by Postal and therefore you don’t have to do anything for that. It’s only the SSL for web UI and SMTP that we are going to install and configure.
Creating the First SMTP on postal
First of all login into your Postal and then create your first organization.
Next, create your First SMTP server
On the next screen fill in the details
After you have successfully built the server, it’s time to add a domain.
Next, you will be given a set of DNS records to create. So, just create them.
Creating DNS records for Postal
There is a very nice article already written by developers of Postal to create DNS records. But if you follow along, you might get lost and miss the mail-tester 10/10 score.
Create the following records
Name | Type | Value |
A | 1.2.3.4 | |
rp.mail | A | 1.2.3.4 |
track.mail | A | 1.2.3.4 |
psrp | CNAME | rp.mail.inguide.in |
@ | MX | 10; mail.inguide.in |
routes.mail | MX | 10; mail.inguide.in |
rp.mail | MX | 10; mail.inguide.in |
@ | TXT | v=spf1 a mx include:spf.mail.example.com ~all |
rp.mail | TXT | v=spf1 a mx include:spf.mail.example.com ~all |
spf.mail | TXT | v=spf1 ip4:1.2.3.4 ~all |
postal-a1b2c3._domainkey | TXT | v=DKIM1; t=s; h=sha256; p=MIGfMA0GC…; |
_dmarc | TXT | v=DMARC1; p=reject; sp=reject; rua=mailto:[email protected] |
Creating SMTP server
Go to the credentials tab and add credentials
After you have created credentials, the key will automatically appear which is none other than your SMTP password in case you have selected SMTP from the drop-down list. Otherwise, it can be used as an API key.
Now you can do the testing with several email marketing tools available.
Installing Free SSL on Postal
The postal dev team has done a commendable job implementing Caddy for Auto SSL. All you need to run the following command to install SSL.
docker run -d \
--name postal-caddy \
--restart always \
--network host \
-v /opt/postal/config/Caddyfile:/etc/caddy/Caddyfile \
-v /opt/postal/caddy-data:/data \
caddy
Now you can go to https://mail.yourdomain.com
and log in using admin credentials.
Video
Conclusion
Installing and configuring Postal for beginners could be a daunting task. But with the help of this and the previous article along with the video guide, I hope you would be able to install it successfully.
Hello sir, thanks for your video that explains how to create Postal SMTP!
i followed ur Video and everything went Just great till the last part! when i do test sending email
it failed saying ” soft fail “
SSL not install
When i run this command certbot certonly –webroot –webroot-path /opt/postal/app/public –domains mail.mydomain.com then the message show “/opt/postal/app/public does not exist or is not a directory”
I create a directory /opt/postal/app/public this path..after I run the command which i mention
above the command the message showing below.
Would you be willing to share your email address with the Electronic Frontier
Foundation, a founding partner of the Let’s Encrypt project and the non-profit
organization that develops Certbot? We’d like to send you email about our work
encrypting the web, EFF news, campaigns, and ways to support digital freedom.
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
(Y)es/(N)o: Y
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for postal.mydomain.org
Using the webroot path /opt/postal/app/public for all unmatched domains.
Waiting for verification…
Challenge failed for domain postal.mydomain.org
http-01 challenge for postal.mydomain.org
Cleaning up challenges
Some challenges have failed.
IMPORTANT NOTES:
– The following errors were reported by the server:
Domain: postal.mydomain.org
Type: unauthorized
Detail: Invalid response from
https://postal.mydomain.org/.well-known/acme-challenge/wTVdxm0GyfEiUEr XVjsKdTLrVg1esDxGa5NR2UMRs0Y
[62.38.62.32]: 502
To fix these errors, please make sure that your domain name was
entered correctly and the DNS A/AAAA record(s) for that domain
contain(s) the right IP address.
– Your account credentials have been saved in your Certbot
configuration directory at /etc/letsencrypt. You should make a
secure backup of this folder now. This configuration directory will
also contain certificates and private keys obtained by Certbot so
making regular backups of this folder is ideal.
please help me.
The latest Postal has a different way of SSL installation. Please use caddy as provided by them for SSL.
hello i can’t sent messages they still in pending, and i have this error
postal_cron_1 /docker-entrypoint.sh post … Up
postal_requeuer_1 /docker-entrypoint.sh post … Exit 1
postal_smtp_1 /docker-entrypoint.sh post … Up
postal_web_1 /docker-entrypoint.sh post … Up
postal_worker_1 /docker-entrypoint.sh post … Exit 1
what should i do please ?
Check your config file. You might have some missing or incorrect information in it.
Othmane : that exit 1 if you past to google you will know what mean that ,, so just in terminal put postal stop , then postal start , then postal status ,,,, do that fast and you will see all up ,,,,,,but if you use again postal status after 1 minute you will see exit 1 because the docker do that by default when nothing in their containers ,,,,,,,,,
my problem now why the test not work in server and how I uninstall or delete the kaddy for I reinstall again because not work
Make sure you have used the correct information in postal.yml file.
exit 1 is related to this only
all information is true , now i need fix the SSL
I tried install ssl with command
#certbot certonly –webroot –webroot-path /opt/postal/app/public –domains mail.obelixnorp.net
But result be fail like this
/opt/postal/app/public does not exist or is not a directory
Can u expland?
make an article on IP rotation, how to use more than on IP to send mails, and also there’s tracking available on postal as well, do that too
Hi Dheeraj,
Please share the link to the next part where you have made the videos on Postal IP rotation, and how to configure mailwizz/mautic with Postal Smtp.
I have searched on your Youtube channel, it is not available there.
Please share the link here
“certbot certonly –webroot –webroot-path /opt/postal/app/public –domains mail.get4free.site
/opt/postal/app/public does not exist or is not a directory
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /tmp/tmp_t9oel0l/log or re-run Certbot with -v for more details.”
How To Fix This?
Use caddy to get SSL
hello after I set up my vps smtp in postal & wanted to relate it with acellemail I got this message
Please help
Something went wrong! Please check your entry and try again.
Connection could not be established with host mail.amazingfabrica.us :stream_socket_client(): unable to connect to mail.amazingfabrica.us:25 (Connection refused)
Try to use another port apart from 25. And also check your smtp credentials at smtper.net
where you able to fix the issue because i keep having the same issue
WARNING No TXT records were returned for postal-jMZ2si._domainkey.yourdomain.com
even after entering the valid Dkim record it says this please help me out with this
You have to usually wait for DNS Propagation.
postal_cron_1 /docker-entrypoint.sh post … Up
postal_requeuer_1 /docker-entrypoint.sh post … Up
postal_smtp_1 /docker-entrypoint.sh post … Up
postal_web_1 /docker-entrypoint.sh post … Up
postal_worker_1 /docker-entrypoint.sh post … Exit 1 how can i fix this
Please check the postal.yml configuration file
receiving this on sending email
No SMTP servers were available for srv1.mail-tester.com. Tried reception.mail-tester.com
execution expired
Support Ref: UTUHDPHD
mail-tester rejecting a connection request.
How do I set Postal to start on boot? I searched the entire web and could not find one single document on this.
you have to deploy the container again, which means you can write a bash script to to do that on each boot
Thank you so much for this guide
But I need help with the postal IP pool I have search almost the whole if youtube and no one
No single person has thought of teaching that please can you help?
I need Ip rotation