URL: https://linuxfr.org/forums/linux-debian-ubuntu/posts/exim4-authentification-smtp Title: [EXIM4] Authentification SMTP Authors: Nicko Date: 2009年02月13日T00:59:45+01:00 Tags: debian Score: 1 Bonjour à tous, Je voudrais faire un relais SMTP accessible depuis le net mais pour éviter de mauvaises surprises, je voudrais ajouter une authentification. (Sans TLS pour l'instant) Je tourne sur une Debian avec un Exim 4.69. J'ai réussi à configurer mon serveur afin qu'il puisse faire relais. Mais j'arrive à rien faire pour la partie authentification. Un extrait de /etc/exim4/exim4.conf.template # this returns the matching line from passwd.client and doubles all ^ PASSWDLINE=${sg{\ £spaces£ £/spaces£${lookup{$host}nwildlsearch{CONFDIR/passwd.client}{$value}fail}\ £spaces£ £/spaces£}\ £spaces£ £/spaces£{\\N[\\^]\\N}\ £spaces£ £/spaces£{^^}\ £spaces£ £/spaces£} plain: £spaces£ £/spaces£driver = plaintext £spaces£ £/spaces£public_name = PLAIN .ifndef AUTH_CLIENT_ALLOW_NOTLS_PASSWORDS £spaces£ £/spaces£client_send = "<; ${if !eq{$tls_cipher}{}\ £spaces£ £/spaces£{^${extract{1}{:}{PASSWDLINE}}\ £spaces£ £/spaces£^${sg{PASSWDLINE}{\\N([^:]+: )(.*)\\N}{\\2ドル}}\ £spaces£ £/spaces£}fail}" .else £spaces£ £/spaces£client_send = "<; ^${extract{1}{:}{PASSWDLINE}}\ £spaces£ £/spaces£^${sg{PASSWDLINE}{\\N([^:]+: )(.*)\\N}{\\2ドル}}" .endif login: £spaces£ £/spaces£driver = plaintext £spaces£ £/spaces£public_name = LOGIN £spaces£ £/spaces£.ifndef AUTH_CLIENT_ALLOW_NOTLS_PASSWORDS £spaces£ £/spaces£# Return empty string if not non-TLS AND looking up $host in passwd-file £spaces£ £/spaces£# yields a non-empty string; fail otherwise. £spaces£ £/spaces£client_send = "<; ${if and{\ £spaces£ £/spaces£{!eq{$tls_cipher}{}}\ £spaces£ £/spaces£{!eq{PASSWDLINE}{}}\ £spaces£ £/spaces£}\ £spaces£ £/spaces£{}fail}\ £spaces£ £/spaces£; ${extract{1}{::}{PASSWDLINE}}\ £spaces£ £/spaces£; ${sg{PASSWDLINE}{\\N([^:]+: )(.*)\\N}{\\2ドル}}" £spaces£ £/spaces£.else £spaces£ £/spaces£# Return empty string if looking up $host in passwd-file yields a £spaces£ £/spaces£# non-empty string; fail otherwise. £spaces£ £/spaces£client_send = "<; ${if !eq{PASSWDLINE}{}\ £spaces£ £/spaces£{}fail}\ £spaces£ £/spaces£; ${extract{1}{::}{PASSWDLINE}}\ £spaces£ £/spaces£; ${sg{PASSWDLINE}{\\N([^:]+: )(.*)\\N}{\\2ドル}}" .endif De même voici la configuration de /etc/exim4/update-exim4.conf.conf dc_eximconfig_configtype='internet' dc_other_hostnames='machine.truc' dc_local_interfaces='' dc_readhost='' dc_relay_domains='' dc_minimaldns='false' dc_relay_nets='192.168.1.xx' # mon IP dc_smarthost='' CFILEMODE='644' dc_use_split_config='false' dc_hide_mailname='' dc_mailname_in_oh='true' dc_localdelivery='mail_spool' Auriez-vous des liens vers une documentation complète et simple ? Mes recherches sur Internet n'ont pas été fructueuse ... Pour complément d'information sur mon problème, lors d'une connexion, je n'ai pas besoin d'authentification. 220 ********.**** ESMTP Exim 4.69 Thu, 12 Feb 2009 11:30:24 +0100 EHLO example.com 250-********.**** Hello ********.****.local [192.168.1.**] 250-SIZE 52428800 250-PIPELINING 250-AUTH LOGIN 250 HELP MAIL FROM:from@example.com 250 OK RCPT TO:to@example.com 250 Accepted DATA 354 Enter message, ending with "." on a line by itself Subject:test . 250 OK id=1LXYrZ-0000Xr-Td Enfin, je suis un peu perdu avec le fichier barbare de configuration /etc/exim4/exim4.conf.template qui comportent un peu plus de 2000 lignes. Merci à l'avance