braveo:docinstallsrvpostfix
Différences
Ci-dessous, les différences entre deux révisions de la page.
| — | braveo:docinstallsrvpostfix [2024/04/16 22:20] (Version actuelle) – créée - modification externe 127.0.0.1 | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| + | =====Installation des services de messagerie ==== | ||
| + | installation de postfix et dovecot : | ||
| + | aptitude install postfix postfix-ldap dovecot-common dovecot-imapd dovecot-pop3d | ||
| + | |||
| + | modifier le fichier / | ||
| + | |||
| + | soft_bounce = no | ||
| + | mail_owner = postfix | ||
| + | mydomain = mdl29.net | ||
| + | smtp_helo_name = mail.mdl29.net | ||
| + | smtpd_helo_required = yes | ||
| + | | ||
| + | myorigin = $mydomain | ||
| + | mynetworks = / | ||
| + | inet_interfaces = all | ||
| + | mydestination = $myhostname, | ||
| + | unknown_local_recipient_reject_code = 450 | ||
| + | disable_dns_lookups = no | ||
| + | alias_maps = hash:/ | ||
| + | alias_database = hash:/ | ||
| + | relay_domains = | ||
| + | relay_host = le_relay_qui_va_bien_si_besoin | ||
| + | debugger_command = | ||
| + | | ||
| + | xxgdb $daemon_directory/ | ||
| + | | ||
| + | virtual_mailbox_domains = mdl29.net | ||
| + | virtual_mailbox_base = /var/mail | ||
| + | virtual_alias_maps = hash:/ | ||
| + | virtual_mailbox_maps = hash:/ | ||
| + | | ||
| + | mailbox_server_host = localhost | ||
| + | mailbox_version = 3 | ||
| + | mailbox_search_base = ou=Users, | ||
| + | mailbox_domain = mdl29.net | ||
| + | mailbox_query_filter = (& | ||
| + | mailbox_result_attribute = uid | ||
| + | mailbox_result_filter = %s/ | ||
| + | | ||
| + | virtual_minimum_uid = 100 | ||
| + | virtual_uid_maps = static:2009 | ||
| + | virtual_gid_maps = static:2009 | ||
| + | | ||
| + | message_size_limit = 10485760 | ||
| + | smtpd_recipient_limit = 2000 | ||
| + | default_destination_recipient_limit = 1000 | ||
| + | | ||
| + | smtpd_sasl_type = dovecot | ||
| + | smtpd_sasl_path = private/ | ||
| + | smtpd_sasl_auth_enable = yes | ||
| + | smtpd_recipient_restrictions = permit_mynetworks, | ||
| + | smtpd_use_tls=no | ||
| + | |||
| + | |||
| + | création du fichier / | ||
| + | 127.0.0.1 | ||
| + | | ||
| + | création du fichier / | ||
| + | touch / | ||
| + | |||
| + | et initialisation de la base : | ||
| + | postmap / | ||
| + | |||
| + | création du fichier / | ||
| + | touch / | ||
| + | |||
| + | et initialisation de la base : | ||
| + | postmap / | ||
| + | |||
| + | création du fichier / | ||
| + | touch / | ||
| + | |||
| + | et initialisation de la base : | ||
| + | postmap / | ||
| + | |||
| + | pour être respectueux des rfc il faut faire travailler postfix sur le port 587 | ||
| + | Il faut donc ajouter une ligne dans le master.cf | ||
| + | on l' | ||
| + | vi / | ||
| + | |||
| + | et on ajoute la ligne | ||
| + | submission inet n - | ||
| + | |||
| + | on peut redémarrer postfix : | ||
| + | / | ||
| + | |||
| + | =====configuration de dovecot==== | ||
| + | édition de dovecot.conf | ||
| + | vi / | ||
| + | |||
| + | y mettre dedans | ||
| + | protocols =imap pop3 | ||
| + | disable_plaintext_auth=no | ||
| + | #ssl: | ||
| + | ssl = no | ||
| + | | ||
| + | mail_location = maildir:/ | ||
| + | login_user = dovecot | ||
| + | auth_debug=yes | ||
| + | auth_debug_passwords=yes | ||
| + | log_path=/ | ||
| + | | ||
| + | protocol imap { | ||
| + | | ||
| + | } | ||
| + | protocol pop3 { | ||
| + | pop3_uidl_format = %08Xu%08Xv | ||
| + | } | ||
| + | auth default { | ||
| + | mechanisms= plain | ||
| + | passdb ldap { | ||
| + | args = / | ||
| + | } | ||
| + | userdb static { | ||
| + | args= uid=2009 gid=2009 home=/ | ||
| + | } | ||
| + | socket listen { | ||
| + | client { | ||
| + | user=postfix | ||
| + | group=postfix | ||
| + | path= / | ||
| + | mode = 0660 | ||
| + | } | ||
| + | } | ||
| + | } | ||
| + | |||
| + | (à noter sous lenny, l' | ||
| + | |||
| + | édition du fichier de configuration pour la connexion ldap | ||
| + | vi / | ||
| + | |||
| + | y mettre dedans | ||
| + | hosts = 127.0.0.1 | ||
| + | default_pass_scheme = PLAIN | ||
| + | auth_bind = yes | ||
| + | ldap_version = 3 | ||
| + | base = dc=mdl29, | ||
| + | deref = never | ||
| + | scope = subtree | ||
| + | pass_attrs = uid=user | ||
| + | pass_filter = (& | ||
| + | |||
| + | créer l' | ||
| + | useradd -u 2009 utilisateurmail | ||
| + | |||
| + | changer les droits afin que cet utilisateur puisse déposer les mails | ||
| + | |||
| + | chown 2009:2009 /var/mail | ||
| + | chmod 750 /var/mail | ||
| + | |||
| + | |||
| + | et redémarrer dovecot | ||
| + | / | ||
