On 7/6/19 4:26 PM, Basile Starynkevitch
wrote:
On 7/6/19 4:07 PM, Basile
Starynkevitch wrote:
Jean-Michel OLTRA indique dans un autre message:
As tu essayé de configurer Postfix avec un relai (relayhost, smarthost) ?
Tu mets ensuite tes couples login/mdp sous forme, par exemple pour moi :
smtp.wanadoo.fr jm.oltra@wanadoo.fr:xxxxxxxx
dans le fichier /etc/postfix/ton_fichier_sasl
Tu transformes ton_fichier_sasl en bdd avec postmap
et tu ajoutes les lignes dans /etc/postfix/main.cf :
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/ton_fichier_sasl
Il faut installer la libsasl.
Ca devrait le faire, mais dans mon imaginaire j'aurais voulu
que cette configuration se fasse à apt-get install
time.
Et ça commence bien :-(
car dpkg-reconfigure postfix me demande:
Please select the mail server configuration type
that best meets your needs. │
│
│
│ No
configuration:
│
│ Should be chosen to leave the
current configuration unchanged. │
│ Internet
site:
│
│ Mail is sent and received
directly using SMTP. │
│ Internet
with smarthost:
│
│ Mail is received directly using
SMTP or by running a utility such │
│ as fetchmail. Outgoing mail is
sent using a smarthost. │
│ Satellite
system:
│
│ All mail is sent to another
machine, called a 'smarthost', for delivery. │
│ Local
only:
│
│ The only delivered mail is the
mail for local users. There is no network. │
│
│
│ General type of mail
configuration: │
│
│
│ No
configuration │
│
Internet Site │
│
Internet with smarthost │
│
Satellite system │
│ Local
only │
│
Et j'hésite déjà entre Internet with smarthost ou Satellite
system. Je dois répondre quoi?
J'ai choisi: Internet with smarthost.
J'essaie donc:
date +'essai de mel %c' | mail -r basile@starynkevitch.net -s
'essai de mail' basile@starynkevitch.net
Mais cet essai échoue encore: mailq me donne sous root:
-Queue ID- --Size-- ----Arrival Time----
-Sender/Recipient-------
109D550C1CF3 451 Sat Jul 6 17:01:15
basile@starynkevitch.net
(SASL authentication failed; cannot authenticate to
server mail.gandi.net[217.70.178.9]: no mechanism available)
basile@starynkevitch.net
-- 0 Kbytes in 1 Request.
Le message est bizarre. Si mail.gandi.net (le serveur
SMTP de gandi que j'utilise) avait rejeté l'authentification
(mauvais user ou mot de passe) je m'attendrais à une autre
formulation. De quelle mécanisme s'agit il?
Et pourtant:
J'ai un fichier:
# fichier /etc/postfix/rimski_sasl -*- conf -*-
# par Basile, en juillet 2019, voir
#
https://lists.debian.org/debian-user-french/2019/07/msg00080.html
# il faut lancer postmap /etc/postfix/rimski_sasl apres
chaque modification
# il faut veiller à ne pas rendre ce fichier publiquement
lisible!
mail.gandi.net
basile@starynkevitch.net:LEVRAImotdepasseENCLAIR
J'ai bien lancé sous root la commande:
postmap /etc/postfix/rimski_sasl
mon /etc/postfix/main.cf contient bien
# fichier /etc/postfix/main.cf sur rimski
# édité manuellement par Basile en juillet 2019
# relancer le service postfix après chaque modification
donc:
## Après toute modification, veillez à relancer la
commande sous root
## 'service postfix reload'.
et plus loin (configuré par dpkg-reconfigure postfix
probablement, sauf ce qui est en français ou en rouge)
smtp_tls_session_cache_database =
btree:${data_directory}/smtp_scache
#### modifié par Basile d'après
https://lists.debian.org/debian-user-french/2019/07/msg00080.html
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/rimski_sasl
# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc
package for
# information on enabling SSL in the smtp client.
smtpd_relay_restrictions = permit_mynetworks
permit_sasl_authenticated defer_unauth_destination
myhostname = rimski.lesours
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = ours.starynkevitch.net, rimski.lesours,
rimski, localhost.lesours, localhost, .lesours
relayhost = mail.gandi.net
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
192.168.1.0/9
mailbox_size_limit = 268435456
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
et j'avais pourtant bien relancé sous root:
service postfix reload
Où sont mes erreurs?
Librement
--
Basile STARYNKEVITCH == http://starynkevitch.net/Basile
opinions are mine only - les opinions sont seulement miennes
Bourg La Reine, France; <basile@starynkevitch.net>
(mobile phone: cf my web page / voir ma page web ...)