alias_maps table des noms & des adresses de mydestination alias_database table des noms d’usages de alias_maps myorigin pas de nom de domaine -> ajoute celui dans fichier mydestination domaines acceptés d’échange recipient_delimiter truc@$mydomain & truc+random@$mydomain == les mêmes (pourriel)
vérification syntaxique après édition
postfix check
redémarrage du service pour appliquer les modifications
systemctl restart postfix
création de deux users gnu/linux
Note mot de passe contingeant à l’authentification…
autres paquets dans la suite dovecot-*, e.g. dovecot-ldap pour support ldap
fichiers de configuration de dovecot dans /etc/dovecot/conf.d/
modification des méthodes d’authentification
nano /etc/dovecot/conf.d/10-auth.conf
précision de tout laisser passer en clair
5
6
7
8
9
10
# Disable LOGIN command and all other plaintext authentications unless# SSL/TLS is used (LOGINDISABLED capability). Note that if the remote IP# matches the local IP (ie. you're connecting from the same computer), the# connection is considered secure and plaintext authentication is allowed.# See also ssl=required setting.disable_plaintext_auth= no
définition des méchanismes d’authentification (login obsolète mais toujours utilisé)
96
97
98
99
100
# Space separated list of wanted authentication mechanisms:# plain login digest-md5 cram-md5 ntlm rpa apop anonymous gssapi otp# gss-spnego# NOTE: See also disable_plaintext_auth setting.auth_mechanisms= plain login
modification de l’emplacement de destination des mails
nano /etc/dovecot/conf.d/10-mail.conf
22
23
24
25
26
27
28
29
30
# See doc/wiki/Variables.txt for full list. Some examples:## mail_location = maildir:~/Maildir# mail_location = mbox:~/mail:INBOX=/var/mail/%u# mail_location = mbox:/var/mail/%d/%1n/%n:INDEX=/var/indexes/%d/%1n/%n## <doc/wiki/MailLocation.txt>#mail_location= maildir:~/Maildir
modification de la gestion des logs - a été utile
nano /etc/dovecot/conf.d/10-logging.conf
5
6
7
8
9
10
11
12
13
14
15
16
17
# Log file to use for error messages. "syslog" logs to syslog,# /dev/stderr logs to stderr.log_path= /var/log/dovecot.log
# Log file to use for informational messages. Defaults to log_path.#info_log_path = # Log file to use for debug messages. Defaults to info_log_path.#debug_log_path = # Syslog facility to use if you're logging to syslog. Usually if you don't# want to use "mail", you'll use local0..local7. Also other standard# facilities are supported.syslog_facility= mail
39
40
# Log unsuccessful authentication attempts and the reasons why they failed.auth_verbose= yes
50
51
52
# Even more verbose logging for debugging purposes. Shows for example SQL# queries.auth_debug= yes
default_transport protocole/serveur d’envoi, par défaut smtp mail_spool_directory dossier de stockage des mails virtual_mailbox_domains liste domaines où postfix destinataire virtual_mailbox_maps adresses valides de virtual_mailbox_domains virtual_uid_maps user id pour écrire les mails virtual_uid_maps pareil que virtual_uid_maps pour group id
définition du domaine virtuel
nano /etc/postfix/vdomain
Note pas le droit d’être le même que celui dans postfix
1
rzo.private #
création de messageries virtuelles accordément à virtual_mailbox_maps
utilisation des comptes virtuels avec authentification correcte
modification de la méthode d’accès
nano /etc/dovecot/conf.d/10-auth.conf
5
6
7
8
9
10
# Disable LOGIN command and all other plaintext authentications unless# SSL/TLS is used (LOGINDISABLED capability). Note that if the remote IP# matches the local IP (ie. you're connecting from the same computer), the# connection is considered secure and plaintext authentication is allowed.# See also ssl=required setting.disable_plaintext_auth= yes
ajout d’une méthode d’authentification sécurisée
96
97
98
99
100
# Space separated list of wanted authentication mechanisms:# plain login digest-md5 cram-md5 ntlm rpa apop anonymous gssapi otp# gss-spnego# NOTE: See also disable_plaintext_auth setting.auth_mechanisms= cram-md5 plain login
ajout du fichier auth-static.conf.ext dans la configuration
# System user and group used to access mails. If you use multiple, userdb# can override these by returning uid or gid fields. You can use either numbers# or names. <doc/wiki/UserIds.txt>mail_uid=5000mail_gid=5000# Group to enable temporarily for privileged operations. Currently this is# used only with INBOX when either its initial creation or dotlocking fails.# Typically this is set to "mail" to give access to /var/mail.mail_privileged_group= vmail
définition des autorisations pour lister utilisateurs
//
// Do any local configuration here
//
// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";zone "rzo.lan" IN {type master; file "/etc/bind/rzo.lan";};zone "rzo.private" IN {type master; file "/etc/bind/rzo.private";};zone "122.168.192.in-addr.arpa"{type master; file "/etc/bind/rzo.lan.inverse";};
vérification syntaxique
named-checkconf /etc/bind/named.conf.local
édition de celles-ci
nano /etc/bind/rzo.lan
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
$TTL86400$ORIGIN rzo.lan.
@ IN SOA ns.rzo.lan. admin.rzo.lan. (2023100101; serial
21600; refresh
10800; retry
43200; expire
10800); minimum
@ IN NS ns.rzo.lan.
@ IN MX 10 mail.rzo.lan.
mail IN A 192.168.122.10
ns IN A 192.168.122.11
postfix IN CNAME mail
bind1 IN CNAME ns
nano /etc/bind/rzo.private
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
$TTL86400$ORIGIN rzo.private.
@ IN SOA ns.rzo.private. admin.rzo.private. (2023100201; serial
21600; refresh
10800; retry
43200; expire
10800); minimum
@ IN NS ns.rzo.private.
@ IN MX 10 mail.rzo.private.
mail IN A 192.168.122.10
ns IN A 192.168.122.11
postfix IN CNAME mail
bind1 IN CNAME ns
nano /etc/bind/rzo.lan.inverse
1
2
3
4
5
6
7
8
9
10
11
12
$TTL 86400
@ IN SOA ns.rzo.lan. admin.rzo.lan. (
2023100101 ; serial
21600 ; refresh
10800 ; retry
43200 ; expire
10800 ) ; minimum
@ IN NS ns.
11 IN PTR ns
10 IN PTR mail