Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
tutoriaux:install-email-server:install-email-server-part-2 [2023/01/06 18:18] – créée - modification externe 127.0.0.1 | tutoriaux:install-email-server:install-email-server-part-2 [2024/07/06 01:16] (Version actuelle) – frater | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | ====== | + | ====== Part 2 - IMAP and TLS Setup ====== |
- | This is part 2 of building your own secure email server on Debian from scratch tutorial series. In [[tutoriaux: | + | This is part 2 of building your own secure email server on Debian from scratch tutorial series. In [[tutoriaux: |
To be able to send emails using a desktop email client, we need to enable the submission service in Postfix. | To be able to send emails using a desktop email client, we need to enable the submission service in Postfix. | ||
Ligne 149: | Ligne 149: | ||
{{ tutoriaux: | {{ tutoriaux: | ||
+ | |||
===== Enable Submission Service in Postfix ===== | ===== Enable Submission Service in Postfix ===== | ||
To send emails from a desktop email client, we need to enable the submission service of Postfix so that the email client can submit emails to Postfix SMTP server. Edit the '' | To send emails from a desktop email client, we need to enable the submission service of Postfix so that the email client can submit emails to Postfix SMTP server. Edit the '' | ||
Ligne 155: | Ligne 156: | ||
In '' | In '' | ||
+ | |||
+ | {{ tutoriaux: | ||
<code ini> | <code ini> | ||
Ligne 162: | Ligne 165: | ||
-o smtpd_tls_wrappermode=no | -o smtpd_tls_wrappermode=no | ||
-o smtpd_sasl_auth_enable=yes | -o smtpd_sasl_auth_enable=yes | ||
- | -o smtpd_relay_restrictions=permit_sasl_authenticated, | + | -o smtpd_relay_restrictions=permit_mynetworks, |
-o smtpd_recipient_restrictions=permit_mynetworks, | -o smtpd_recipient_restrictions=permit_mynetworks, | ||
-o smtpd_sasl_type=dovecot | -o smtpd_sasl_type=dovecot | ||
Ligne 168: | Ligne 171: | ||
</ | </ | ||
- | {{ tutoriaux:debian-email: | + | **Some explainations** |
+ | {{tablelayout? | ||
+ | ^ parameter | ||
+ | | syslog_name | ||
+ | | smtpd_tls_security_level | ||
+ | | smtpd_tls_wrappermode | ||
+ | | smtpd_relay_restrictions | ||
+ | | smtpd_recipient_restrictions | ||
+ | | smtpd_sasl_type | ||
+ | | smtpd_sasl_path | ||
+ | |||
+ | <WRAP center round tip> | ||
+ | An alternative is to be more restrictive on what your ' | ||
+ | |||
+ | In this case, the trusted network (mynetworks) is only allowed to send | ||
+ | <code ini> | ||
+ | submission | ||
+ | : | ||
+ | -o smtpd_relay_restrictions=permit_sasl_authenticated, | ||
+ | -o smtpd_recipient_restrictions=permit_mynetworks, | ||
+ | : | ||
+ | </ | ||
+ | </ | ||
The above configuration enables the **submission** daemon of Postfix and requires TLS encryption. So later on our desktop email client can connect to the submission daemon in TLS encryption. The submission daemon listens on TCP port **587**. STARTTLS is used to encrypt communications between email client and the submission daemon. | The above configuration enables the **submission** daemon of Postfix and requires TLS encryption. So later on our desktop email client can connect to the submission daemon in TLS encryption. The submission daemon listens on TCP port **587**. STARTTLS is used to encrypt communications between email client and the submission daemon. | ||
Ligne 251: | Ligne 276: | ||
< | < | ||
+ | |||
+ | ===== Define your email network ===== | ||
+ | |||
+ | By default, Postfix will forward mail from clients in authorized network blocks to any destination. | ||
+ | |||
+ | The current default is to authorize the local machine only. | ||
+ | |||
+ | Prior to Postfix 3.0, the default was to authorize all clients in the IP subnetworks that the local machine is attached to. | ||
+ | |||
+ | <WRAP center round important> | ||
+ | changing the definition of the authorized network block is generaly a bad idea, you MUST know what your define and who you trust. | ||
+ | </ | ||
+ | |||
+ | Sometime you need to " | ||
+ | |||
+ | the correct parameter is | ||
+ | |||
+ | <code ini> | ||
+ | mynetworks = [list of IPs separated by comma] | ||
+ | </ | ||
+ | |||
===== Enabling IMAP/POP3 Protocol ===== | ===== Enabling IMAP/POP3 Protocol ===== | ||
Edit the main config file. | Edit the main config file. |