How To Create Postfix SMTP Credentials Without A Relay Host Or External SMTP?

I would sincerely and immensely appreciate it if someone can answer these questions with enough detail to reduce back and forths. Again, please make sure you read these question and answer each one in full if possible. That would mean a ton and help so many other Linux noobs along the way.

Currently viewing this guide: https://www.linode.com/docs/guides/postfix-smtp-debian7/

All the guides I found on the internet say the same thing. To create Postfix credentials set it up as a relay host.

Here's my use case:

  1. I am not using a third party SMTP like Sendgrid to send bulk emails. Thats the reason why I installed Postfix - to handle bulk emailing.

  2. In essence, my VPS and fully qualified domain name (smtp.mydomain.com) is the "ESP" where I will be warming up my IP to send bulk emails.

  3. My email marketing app is called Mailwizz. It is not an ESP as it cannot send emails. It's my GUI for Postfix think of that as that. I can log into my dashboard, view the stats, manage my lists, create campaigns. I cannot create credentials as a point of emphasis. In order for Mailwizz to work it asks for my hostname, smtp credentials, Authentication (TLS/SSL, STARTTLS, NO). I know what to put for all the fields except username and password.

So now to my question. If I am not using an External SMTP, according to the guide referenced above, what do I put in the file referenced below under the section titled Configuring SMTP Usernames and Passwords?

/etc/postfix/sasl_passwd
[mail.isp.example] username:password

I believe username will just be the sending email like joe@news.mydomain.com

Also, I am using port 587 so shouldn't the above syntax in the sasl_passwd file read: [mail.isp.example]:587 username:password

Can I use my fully qualified domain name for the VPS (i.e. smtp.mydomain.com) to replace [mail.isp.example]?

This will also be the same for:
relayhost = [mail.isp.example]:587

I believe I can use my fully qualified domain name as I am technically an ESP only without clients. So I see no reason why it cant work but maybe I am missing a pertinent factor here?

If it helps, here's a visual of what I need in Mailwizz: https://prnt.sc/92UMvGqyOFRK

THANK YOU IN ADVANCE AGAIN!

1 Reply

Hi @digitaljoegeorge ,

I'll try my best to answer your questions:

If I am not using an External SMTP, according to the guide referenced above, what do I put in the file referenced below under the section titled Configuring SMTP Usernames and Passwords?

/etc/postfix/sasl_passwd [mail.isp.example] username:password

  • Since you are self-hosting SMTP, you can specify your own server's hostname and port in the sasl_passwd file. As you mentioned, the username can be the sending email such as joe@mydomain.com

Also, I am using port 587 so shouldn't the above syntax in the sasl_passwd file read: [mail.isp.example]:587 username:password

  • Yes, specifying the port is correct when referencing your own server in the sasl_passwd file. The syntax would be:
[smtp.yourdomain.com]:587 joe@mydomain.com:password

Can I use my fully qualified domain name for the VPS (i.e. smtp.mydomain.com) to replace [mail.isp.example]?

This will also be the same for:
relayhost = [mail.isp.example]:587

  • Correct, you can use your own server's FQDN in both the sasl_passwd and relayhost settings when configuring Postfix for self-hosted SMTP.

I believe I can use my fully qualified domain name as I am technically an ESP only without clients. So I see no reason why it cant work but maybe I am missing a pertinent factor here?

  • You are thinking through this properly. Since your server is acting as both the sending client and SMTP server, using your own FQDN and port is appropriate in both Postfix authentication and relay configurations.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct