$ -weight: 600;">sudo -weight: 500;">apt -weight: 500;">install -y postfix postfix-ldap dovecot-core dovecot-imapd dovecot-ldap dovecot-lmtpd
-weight: 600;">sudo -weight: 500;">apt -weight: 500;">install -y postfix postfix-ldap dovecot-core dovecot-imapd dovecot-ldap dovecot-lmtpd
-weight: 600;">sudo -weight: 500;">apt -weight: 500;">install -y postfix postfix-ldap dovecot-core dovecot-imapd dovecot-ldap dovecot-lmtpd
myhostname = mail-server.acme.internal
mydomain = acme.internal
mydestination = $myhostname, $mydomain, localhost
mynetworks = 192.168.57.0/24 127.0.0.0/8
inet_interfaces = all
mailbox_transport = lmtp:unix:private/dovecot-lmtp
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
local_recipient_maps = ldap:/etc/postfix/ldap-recipients.cf
myhostname = mail-server.acme.internal
mydomain = acme.internal
mydestination = $myhostname, $mydomain, localhost
mynetworks = 192.168.57.0/24 127.0.0.0/8
inet_interfaces = all
mailbox_transport = lmtp:unix:private/dovecot-lmtp
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
local_recipient_maps = ldap:/etc/postfix/ldap-recipients.cf
myhostname = mail-server.acme.internal
mydomain = acme.internal
mydestination = $myhostname, $mydomain, localhost
mynetworks = 192.168.57.0/24 127.0.0.0/8
inet_interfaces = all
mailbox_transport = lmtp:unix:private/dovecot-lmtp
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
local_recipient_maps = ldap:/etc/postfix/ldap-recipients.cf
server_host = ldaps://ldap-server.acme.internal
bind = yes
bind_dn = cn=sssd,ou=-weight: 500;">service-accounts,dc=acme,dc=internal
bind_pw = SSSDPass123
search_base = ou=users,dc=acme,dc=internal
query_filter = (&(objectClass=posixAccount)(mail=%s))
result_attribute = mail
server_host = ldaps://ldap-server.acme.internal
bind = yes
bind_dn = cn=sssd,ou=-weight: 500;">service-accounts,dc=acme,dc=internal
bind_pw = SSSDPass123
search_base = ou=users,dc=acme,dc=internal
query_filter = (&(objectClass=posixAccount)(mail=%s))
result_attribute = mail
server_host = ldaps://ldap-server.acme.internal
bind = yes
bind_dn = cn=sssd,ou=-weight: 500;">service-accounts,dc=acme,dc=internal
bind_pw = SSSDPass123
search_base = ou=users,dc=acme,dc=internal
query_filter = (&(objectClass=posixAccount)(mail=%s))
result_attribute = mail
-weight: 600;">sudo -weight: 500;">systemctl reload postfix
-weight: 600;">sudo -weight: 500;">systemctl reload postfix
-weight: 600;">sudo -weight: 500;">systemctl reload postfix
debian@mail-server:~/acme-certs$ ls
rootCA.pem
debian@mail-server:~/acme-certs$ -weight: 600;">sudo cp rootCA.pem /usr/local/share/ca-certificates/acme-rootCA.crt
[-weight: 600;">sudo] password for debian: debian@mail-server:~/acme-certs$ -weight: 600;">sudo -weight: 500;">update-ca-certificates
Updating certificates in /etc/ssl/certs...
rehash: warning: skipping ca-certificates.crt, it does not contain exactly one certificate or CRL
1 added, 0 removed; done.
Running hooks in /etc/ca-certificates/-weight: 500;">update.d...
done.
debian@mail-server:~/acme-certs$
debian@mail-server:~/acme-certs$ ls
rootCA.pem
debian@mail-server:~/acme-certs$ -weight: 600;">sudo cp rootCA.pem /usr/local/share/ca-certificates/acme-rootCA.crt
[-weight: 600;">sudo] password for debian: debian@mail-server:~/acme-certs$ -weight: 600;">sudo -weight: 500;">update-ca-certificates
Updating certificates in /etc/ssl/certs...
rehash: warning: skipping ca-certificates.crt, it does not contain exactly one certificate or CRL
1 added, 0 removed; done.
Running hooks in /etc/ca-certificates/-weight: 500;">update.d...
done.
debian@mail-server:~/acme-certs$
debian@mail-server:~/acme-certs$ ls
rootCA.pem
debian@mail-server:~/acme-certs$ -weight: 600;">sudo cp rootCA.pem /usr/local/share/ca-certificates/acme-rootCA.crt
[-weight: 600;">sudo] password for debian: debian@mail-server:~/acme-certs$ -weight: 600;">sudo -weight: 500;">update-ca-certificates
Updating certificates in /etc/ssl/certs...
rehash: warning: skipping ca-certificates.crt, it does not contain exactly one certificate or CRL
1 added, 0 removed; done.
Running hooks in /etc/ca-certificates/-weight: 500;">update.d...
done.
debian@mail-server:~/acme-certs$
-weight: 600;">sudo cp mail-server.acme.internal.pem /etc/dovecot/private/mail-server.crt
-weight: 600;">sudo cp mail-server.acme.internal-key.pem /etc/dovecot/private/mail-server.key
-weight: 600;">sudo chown root:dovecot /etc/dovecot/private/mail-server.key
-weight: 600;">sudo chmod 640 /etc/dovecot/private/mail-server.key
-weight: 600;">sudo cp mail-server.acme.internal.pem /etc/dovecot/private/mail-server.crt
-weight: 600;">sudo cp mail-server.acme.internal-key.pem /etc/dovecot/private/mail-server.key
-weight: 600;">sudo chown root:dovecot /etc/dovecot/private/mail-server.key
-weight: 600;">sudo chmod 640 /etc/dovecot/private/mail-server.key
-weight: 600;">sudo cp mail-server.acme.internal.pem /etc/dovecot/private/mail-server.crt
-weight: 600;">sudo cp mail-server.acme.internal-key.pem /etc/dovecot/private/mail-server.key
-weight: 600;">sudo chown root:dovecot /etc/dovecot/private/mail-server.key
-weight: 600;">sudo chmod 640 /etc/dovecot/private/mail-server.key
ssl_server_cert_file = /etc/dovecot/private/mail-server.crt
ssl_server_key_file = /etc/dovecot/private/mail-server.key
ssl_server_cert_file = /etc/dovecot/private/mail-server.crt
ssl_server_key_file = /etc/dovecot/private/mail-server.key
ssl_server_cert_file = /etc/dovecot/private/mail-server.crt
ssl_server_key_file = /etc/dovecot/private/mail-server.key
debian@mail-server:~/acme-certs$ cat /etc/dovecot/conf.d/10-auth.conf | grep "include auth"
#!include auth-deny.conf.ext
#!include auth-master.conf.ext
#!include auth-oauth2.conf.ext
#!include auth-system.conf.ext
#!include auth-sql.conf.ext
!include auth-ldap.conf.ext
#!include auth-passwdfile.conf.ext
#!include auth-static.conf.ext
debian@mail-server:~/acme-certs$ cat /etc/dovecot/conf.d/10-auth.conf | grep "include auth"
#!include auth-deny.conf.ext
#!include auth-master.conf.ext
#!include auth-oauth2.conf.ext
#!include auth-system.conf.ext
#!include auth-sql.conf.ext
!include auth-ldap.conf.ext
#!include auth-passwdfile.conf.ext
#!include auth-static.conf.ext
debian@mail-server:~/acme-certs$ cat /etc/dovecot/conf.d/10-auth.conf | grep "include auth"
#!include auth-deny.conf.ext
#!include auth-master.conf.ext
#!include auth-oauth2.conf.ext
#!include auth-system.conf.ext
#!include auth-sql.conf.ext
!include auth-ldap.conf.ext
#!include auth-passwdfile.conf.ext
#!include auth-static.conf.ext
ldap_uris = ldaps://ldap-server.acme.internal
ldap_auth_dn = cn=sssd,ou=-weight: 500;">service-accounts,dc=acme,dc=internal
ldap_auth_dn_password = SSSDPass123
ldap_base = ou=users,dc=acme,dc=internal passdb ldap { ldap_filter = (&(objectClass=posixAccount)(uid=%{user})) ldap_bind = yes
} userdb ldap { ldap_filter = (&(objectClass=posixAccount)(uid=%{user})) fields { uid = vmail gid = vmail home = /var/mail/vhosts/%{user | username} }
}
ldap_uris = ldaps://ldap-server.acme.internal
ldap_auth_dn = cn=sssd,ou=-weight: 500;">service-accounts,dc=acme,dc=internal
ldap_auth_dn_password = SSSDPass123
ldap_base = ou=users,dc=acme,dc=internal passdb ldap { ldap_filter = (&(objectClass=posixAccount)(uid=%{user})) ldap_bind = yes
} userdb ldap { ldap_filter = (&(objectClass=posixAccount)(uid=%{user})) fields { uid = vmail gid = vmail home = /var/mail/vhosts/%{user | username} }
}
ldap_uris = ldaps://ldap-server.acme.internal
ldap_auth_dn = cn=sssd,ou=-weight: 500;">service-accounts,dc=acme,dc=internal
ldap_auth_dn_password = SSSDPass123
ldap_base = ou=users,dc=acme,dc=internal passdb ldap { ldap_filter = (&(objectClass=posixAccount)(uid=%{user})) ldap_bind = yes
} userdb ldap { ldap_filter = (&(objectClass=posixAccount)(uid=%{user})) fields { uid = vmail gid = vmail home = /var/mail/vhosts/%{user | username} }
}
-weight: 600;">sudo adduser --system --no-create-home --group vmail
-weight: 600;">sudo mkdir -p /var/mail/vhosts
-weight: 600;">sudo chown -R vmail:vmail /var/mail/vhosts
-weight: 600;">sudo chmod 770 /var/mail/vhosts
-weight: 600;">sudo adduser --system --no-create-home --group vmail
-weight: 600;">sudo mkdir -p /var/mail/vhosts
-weight: 600;">sudo chown -R vmail:vmail /var/mail/vhosts
-weight: 600;">sudo chmod 770 /var/mail/vhosts
-weight: 600;">sudo adduser --system --no-create-home --group vmail
-weight: 600;">sudo mkdir -p /var/mail/vhosts
-weight: 600;">sudo chown -R vmail:vmail /var/mail/vhosts
-weight: 600;">sudo chmod 770 /var/mail/vhosts
mail_driver = maildir
mail_home = /var/mail/vhosts/%{user | username}
mail_path = %{home}/Maildir
first_valid_uid = 100
mail_driver = maildir
mail_home = /var/mail/vhosts/%{user | username}
mail_path = %{home}/Maildir
first_valid_uid = 100
mail_driver = maildir
mail_home = /var/mail/vhosts/%{user | username}
mail_path = %{home}/Maildir
first_valid_uid = 100
-weight: 500;">service lmtp { unix_listener /var/spool/postfix/private/dovecot-lmtp { mode = 0600 user = postfix group = postfix }
}
-weight: 500;">service lmtp { unix_listener /var/spool/postfix/private/dovecot-lmtp { mode = 0600 user = postfix group = postfix }
}
-weight: 500;">service lmtp { unix_listener /var/spool/postfix/private/dovecot-lmtp { mode = 0600 user = postfix group = postfix }
}
-weight: 500;">service auth { unix_listener /var/spool/postfix/private/auth { mode = 0660 user = postfix group = postfix }
}
-weight: 500;">service auth { unix_listener /var/spool/postfix/private/auth { mode = 0660 user = postfix group = postfix }
}
-weight: 500;">service auth { unix_listener /var/spool/postfix/private/auth { mode = 0660 user = postfix group = postfix }
}
-weight: 600;">sudo -weight: 500;">systemctl -weight: 500;">restart dovecot
-weight: 600;">sudo -weight: 500;">systemctl -weight: 500;">restart dovecot
-weight: 600;">sudo -weight: 500;">systemctl -weight: 500;">restart dovecot
debian@debian:~/acme-certs$ -weight: 500;">curl -v --url "smtp://mail-server.acme.internal:25" \ --mail-from "[email protected]" \ --mail-rcpt "[email protected]" \ --upload-file - <<EOF
From: [email protected]
To: [email protected]
Subject: Test from jsmith Hello Alice, this is John.
EOF
debian@debian:~/acme-certs$ -weight: 500;">curl -v --url "smtp://mail-server.acme.internal:25" \ --mail-from "[email protected]" \ --mail-rcpt "[email protected]" \ --upload-file - <<EOF
From: [email protected]
To: [email protected]
Subject: Test from jsmith Hello Alice, this is John.
EOF
debian@debian:~/acme-certs$ -weight: 500;">curl -v --url "smtp://mail-server.acme.internal:25" \ --mail-from "[email protected]" \ --mail-rcpt "[email protected]" \ --upload-file - <<EOF
From: [email protected]
To: [email protected]
Subject: Test from jsmith Hello Alice, this is John.
EOF
250 2.0.0 Ok: queued as 98B624018B
250 2.0.0 Ok: queued as 98B624018B
250 2.0.0 Ok: queued as 98B624018B
debian@mail-server:~$ -weight: 600;">sudo ls /var/mail/vhosts/adoe/Maildir/new/
1773903163.M693787P7845.mail-server.acme.internal,S=560,W=576
debian@mail-server:~$ -weight: 600;">sudo ls /var/mail/vhosts/adoe/Maildir/new/
1773903163.M693787P7845.mail-server.acme.internal,S=560,W=576
debian@mail-server:~$ -weight: 600;">sudo ls /var/mail/vhosts/adoe/Maildir/new/
1773903163.M693787P7845.mail-server.acme.internal,S=560,W=576
debian@debian:~/acme-certs$ -weight: 500;">curl -v --url "imaps://mail-server.acme.internal/INBOX" \ --user "adoe:Password456"
debian@debian:~/acme-certs$ -weight: 500;">curl -v --url "imaps://mail-server.acme.internal/INBOX" \ --user "adoe:Password456"
debian@debian:~/acme-certs$ -weight: 500;">curl -v --url "imaps://mail-server.acme.internal/INBOX" \ --user "adoe:Password456"
* SSL certificate verify ok.
* Connected to mail-server.acme.internal (192.168.57.7) port 993
< A002 OK Logged in
< * LIST (\HasNoChildren) "." INBOX
< A003 OK List completed (0.001 + 0.000 secs).
* SSL certificate verify ok.
* Connected to mail-server.acme.internal (192.168.57.7) port 993
< A002 OK Logged in
< * LIST (\HasNoChildren) "." INBOX
< A003 OK List completed (0.001 + 0.000 secs).
* SSL certificate verify ok.
* Connected to mail-server.acme.internal (192.168.57.7) port 993
< A002 OK Logged in
< * LIST (\HasNoChildren) "." INBOX
< A003 OK List completed (0.001 + 0.000 secs). - VM Intercommunication setup
- Local TLS for HTTPS
- OpenLDAP Home Lab