Configure postfix & dovecot to send mail on webmin/virtualmin

This article will show how to configure postfix & dovecot from webmin control panel to send mail.

Logging to your webmin/virtualmin control panel by below url:

https://hostname:10000

switch to webmin part.

Edit Postfix config files:

Go to Servers > Postfix Mail Server and click over the “Edit Config Files” icon.
Select main.cf from the “Edit config file” dropdown box.
Click the “Edit” button.
Scroll down to the end of the configuration file, and add the following settings:

smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
Also make sure you have exactly this line into your main.cf file :

smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination permit_sasl_authenticated

postfix config main.cf

Finally also at the same file (at the middle of the file this time) uncomment the line :

home_mailbox = Maildir/
Click the “Save” button.

postfix config main.cf

Notice that for the last setting we could have done it by navigating at Server > Postfix Mail Server, and by clicking at “Local delivery” icon and by setting Maildir/ at the voice “Home-relative pathname of user mailbox file”.

postfix local delivery

Edit Dovecot config files

Navigate to Servers > Dovecot IMAP/POP3 Server and click over the “Edit Config Files” icon.
Select /etc/dovecot/conf.d/10-master.conf from the “Edit config file” dropdown.
Click the “Edit” button.
Find the configuration section for the auth service, and uncomment lines related to the socket. Specify the username and group name of your Postfix user.
In our case is user=postfix, group = postfix.
The section should look something like the following code when finished:

service auth
{
...
 # Postfix smtp-auth
 unix_listener /var/spool/postfix/private/auth
 {
 mode = 0660
 user = postfix
 group = postfix
 }
...
}

Click “Save”

dovecot config

Now go to file : /etc/dovecot/conf.d/10-auth.conf and hit the “Edit” button.
Find and change auth_mechanisms to :

auth_mechanisms = plain login
Click “Save”.

dovecot config2

Click the “Stop Dovecot Server” button and then the “Start Dovecot Server” button to restart the dovecot daemon.

Set Postfix to listen at Port 587

We need to instruct Postfix to listen for SMTP connections on port 587.
Navigate to Servers > Postfix Mail Server and click at the “Server Processes” icon.
Click the “Add a new server process” link.
In the “Create Server Process” form fill like this :

Set “Transport type” to Internet.
Set Server name/port” to 587.
Set “Process command” to smtpd.
Set “Enabled?” to Yes.
Set “Listen on host address” to Any address.
Set “Private to mail system?” to No.

postfix create process

Click the “Create” button.

At the “Server Processes” list you should have a new process with name 587 like the picture below.

postfix server processes list

Navigate to Servers > Postfix Mail Server.
Click “Stop Postfix” and then “Start Postfix” to restart the service.

Now you can send or receive & can read mail from your virtualmin server.

Thank you for reading this article.

Was this helpful?

0 / 0

Leave a Reply 3

Your email address will not be published. Required fields are marked *


ilukyiho

ilukyiho

Pretty section of content.I enjoyed account your blog posts.
I am extremely impressed with your writing skills and also with the layout on your blog.
Either way keep up the excellent quality writing, it is rare to see a nice
blog like this one nowadays.

icpamuj

icpamuj

Keep up the excellent quality writing, it is rare to see a nice
blog like this one nowadays.

owuqiodzivqo

owuqiodzivqo

Pretty section of content. I just stumbled upon your website and in accession capital to assert that I acquire in fact enjoyed account your blog posts.
Any way I’ll be subscribing to your feeds.
I am extremely impressed with your writing skills and also with the layout on your blog.
Either way keep up the excellent quality writing, it is rare to see a nice
blog like this one nowadays.