Exim4 en échec

Bonjour
Pour un blog auto-hébergé, Exim4 est en échec et je tourne en rond depuis plusieurs heures
De l’aide SVP

apt-get update && apt-get install exim4

# /etc/aliases
mailer-daemon: postmaster
postmaster: root
nobody: root
hostmaster: root
usenet: root
news: root
webmaster: root
www: root
ftp: root
abuse: root
noc: root
security: root
root: mpedro@gmail.com
# /etc/email-addresses
#user: someone@isp.com
#otheruser: someoneelse@anotherisp.com
root: mpedro@gmail.com
user1: mpedro@gmail.com

dpkg-reconfigure exim4-config
en utilisant smpt.gmail.com et le port 465

# /etc/exim4/update-exim4.conf.conf
dc_eximconfig_configtype='satellite'
dc_other_hostnames=''
dc_local_interfaces='127.0.0.1 ;::1 ; 192.168.1.54'
dc_readhost='localhost'
dc_relay_domains=''
dc_minimaldns='false'
dc_relay_nets=''
dc_smarthost='smtp.gmail.com:465'
CFILEMODE='644'
dc_use_split_config='false'
dc_hide_mailname='true'
dc_mailname_in_oh='true'
dc_localdelivery='mail_spool'

test d’envoi de mail en échec

# mail -s "mon objet" mpedro@gmail.com
Cc: test

ou

# echo "test mail "   |  mail -s "test"  mpedro@gmail.com

mailq

pedro-H pedropedro # mailq
 1m  2.0K 1bhNLC-0007Ir-6R <> *** frozen ***
          root@pedro-H

 0m  1.9K 1bhNMO-0007K6-As <> *** frozen ***
          root@pedro-H

J’ai essayé en vain de relancer les messages avec la commande [exim -qff]
puis voir la
liste message gelé

# mailq | grep "frozen"
 5m  2.0K 1bhNLC-0007Ir-6R <> *** frozen ***
 3m  1.9K 1bhNMO-0007K6-As <> *** frozen ***

fichier de logs

# tail -f /var/log/exim4/mainlog
2016-09-06 22:51:34 1bhNLC-0007Ir-6R <= <> R=1bhNLA-0007Ih-LJ U=Debian-exim P=local S=2076
2016-09-06 22:51:34 1bhNLA-0007Ih-LJ Completed
2016-09-06 22:51:35 1bhNLC-0007Ir-6R ** jd73775@gmail.com <root@pedro-H> R=smarthost T=remote_smtp_smarthost H=gmail-smtp-msa.l.google.com [66.102.1.108] X=TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128 CV=no DN="C=US,ST=California,L=Mountain View,O=Google Inc,CN=smtp.gmail.com": SMTP error from remote mail server after MAIL FROM:<> SIZE=3162: 530-5.5.1 Authentication Required. Learn more at\n530 5.5.1  https://support.google.com/mail/answer/14257 kq2sm35232515wjc.41 - gsmtp
2016-09-06 22:51:35 1bhNLC-0007Ir-6R Frozen (delivery error message)
2016-09-06 22:52:47 1bhNMM-0007K1-T9 <= root@pedro-H U=root P=local S=351
2016-09-06 22:52:48 1bhNMM-0007K1-T9 ** mpedro@gmail.com R=smarthost T=remote_smtp_smarthost H=gmail-smtp-msa.l.google.com [66.102.1.109] X=TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128 CV=no DN="C=US,ST=California,L=Mountain View,O=Google Inc,CN=smtp.gmail.com": SMTP error from remote mail server after MAIL FROM:<root@localhost> SIZE=1386: 530-5.5.1 Authentication Required. Learn more at\n530 5.5.1  https://support.google.com/mail/answer/14257 h7sm35298978wjd.17 - gsmtp
2016-09-06 22:52:48 1bhNMO-0007K6-As <= <> R=1bhNMM-0007K1-T9 U=Debian-exim P=local S=1960
2016-09-06 22:52:48 1bhNMM-0007K1-T9 Completed
2016-09-06 22:52:49 1bhNMO-0007K6-As ** mpedro@gmail.com <root@pedro-H> R=smarthost T=remote_smtp_smarthost H=gmail-smtp-msa.l.google.com [66.102.1.109] X=TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128 CV=no DN="C=US,ST=California,L=Mountain View,O=Google Inc,CN=smtp.gmail.com": SMTP error from remote mail server after MAIL FROM:<> SIZE=3040: 530-5.5.1 Authentication Required. Learn more at\n530 5.5.1  https://support.google.com/mail/answer/14257 i3sm35191295wjd.31 - gsmtp
2016-09-06 22:52:49 1bhNMO-0007K6-As Frozen (delivery error message)
2016-09-06 22:56:28 Start queue run: pid=28208 -qff
2016-09-06 22:56:28 1bhNMO-0007K6-As Unfrozen by forced delivery
2016-09-06 22:56:28 1bhNMO-0007K6-As H=gmail-smtp-msa.l.google.com [2a00:1450:400c:c07::6d] Network is unreachable
2016-09-06 22:56:29 1bhNMO-0007K6-As ** mpedro@gmail.com <root@pedro-H> R=smarthost T=remote_smtp_smarthost H=gmail-smtp-msa.l.google.com [74.125.133.109] X=TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128 CV=no DN="C=US,ST=California,L=Mountain View,O=Google Inc,CN=smtp.gmail.com": SMTP error from remote mail server after MAIL FROM:<> SIZE=3040: 530-5.5.1 Authentication Required. Learn more at\n530 5.5.1  https://support.google.com/mail/answer/14257 vh6sm35207788wjb.0 - gsmtp
2016-09-06 22:56:29 1bhNMO-0007K6-As Frozen (delivery error message)
2016-09-06 22:56:29 1bhNLC-0007Ir-6R Unfrozen by forced delivery
2016-09-06 22:56:29 1bhNLC-0007Ir-6R H=gmail-smtp-msa.l.google.com [2a00:1450:400c:c06::6d] Network is unreachable
2016-09-06 22:56:30 1bhNLC-0007Ir-6R ** mpedro@gmail.com <root@pedro-H> R=smarthost T=remote_smtp_smarthost H=gmail-smtp-msa.l.google.com [74.125.133.109] X=TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128 CV=no DN="C=US,ST=California,L=Mountain View,O=Google Inc,CN=smtp.gmail.com": SMTP error from remote mail server after MAIL FROM:<> SIZE=3162: 530-5.5.1 Authentication Required. Learn more at\n530 5.5.1  https://support.google.com/mail/answer/14257 n7sm35228111wjf.11 - gsmtp
2016-09-06 22:56:30 1bhNLC-0007Ir-6R Frozen (delivery error message)
2016-09-06 22:56:30 End queue run: pid=28208 -qff
2016-09-06 22:57:08 Start queue run: pid=28227
2016-09-06 22:57:08 1bhNMO-0007K6-As Message is frozen
2016-09-06 22:57:08 1bhNLC-0007Ir-6R Message is frozen
2016-09-06 22:57:08 End queue run: pid=28227

Ah bon, je pensais que exim ne servait que de messagerie locale. Il ne me semblait pas qu’on pouvait envoyer vers d’autres serveurs.
Il est donc possible que gmail n’ait pas voulu de ton e-mail car il provient d’un domaine non authentifié.

Bonjour

j’ai compris que tu envoie vers gmail.

voici une doc que j’ai retravaillé afin que ton système fonctionne.

$sudo dpkg-reconfigure exim4-config

choisir : Envoi par relais (« smarthost ») — réception SMTP ou fetchmail 

System mail name =>	localhost
IP addresses to listen on for incoming SMTP connections =>	127.0.0.1
Other destinations for which mail is accepted =>	Leave empty.
Machines to relay mail for => Leave empty.
IP address or host name of the outgoing smarthost => smtp.gmail.com::587
Hide local mail name in outgoing mail? => No
Keep number of DNS-queries minimal (Dial-on-Demand)? => No
Delivery method for local mail	=> mbox format in /var/mail/
Split configuration into small files? => No

$sudo vim /etc/exim4/passwd.client

*.google.com:yourAccount@gmail.com:yourPassword
$ sudo chown root:Debian-exim /etc/exim4/passwd.client
$ sudo chmod 640 /etc/exim4/passwd.client
$ sudo update-exim4.conf
$ sudo invoke-rc.d exim4 restart
$ sudo exim4 -qff

To test, send an email to yourself, and check your Inbox:

$ echo test only | mail -s 'Test Subject' myAddress@gmail.com

log : /var/log/exim4/mainlog.
1 J'aime

suite pour la suite :

#sudo vim /etc/aliases

---
mailer-daemon: postmaster 
postmaster: root 
nobody: root 
hostmaster: root 
usenet: root 
news: root 
webmaster: root 
www: root 
ftp: root 
abuse: root 
noc: root 
security: root 
root: peter
peter: vers adresse gmail
---

#sudo newaliases
2 J'aime

:slight_smile:

Induit en erreur j’ai cherché au mauvais endroit car dans des logs ou bien je ne sais plus où, sur un retour de commande il y avait mpedro@gmail.com :25 (comme mis par défaut) alors que c’est le port 465 qui était configuré. _Je m’apprêtais à revoir les règles de port.

Bref!

Pas besoin de reconfigurer par [dpkg-reconfigure exim4-config].

Donc dans le fichier aliases il manquait la dernière ligne
root: mpedro@gmail.com a été remplacé par une vraie adresse gmail.

Avec plus de temps je reviendrais sans doute poser quelques questions sur le fil même si le sujet est classé en Résolu.

Un grand merci à vous et pour la réactivité du forum.

Suite à l’installation de Exim4 j’ai des soucis avec Truecrypt et pourquoi?

Message recu sur une adresse gmail??
From: mpedro *******@gmail.com
X-Google-Original-From: pedro pedropedro@localhost
Received: from mpedrompedro by pedro-H with local (Exim 4.86_2)
(envelope-from mpedrompedro@gmail.com)
id 1bhuX6-00073I-QW
for root@gmail.com; Thu, 08 Sep 2016 10:18:04 +0200
To: root@gmail.com
Auto-Submitted: auto-generated
Subject: *** SECURITY information for mpedro-H ***
Message-Id: E1bhuX6-00073I-QW@pedro-H
Date: Thu, 08 Sep 2016 10:18:04 +0200

pedro-H : Sep 8 10:18:04 : mpedrompedro : 1 incorrect password attempt ; TTY=unknown ; PWD=/home/mpedr****edro ; USER=root ; COMMAND=/usr/bin/truecrypt --core-service

Bon, j’arrive quand-même à utiliser tc avec une manip supplémentaire mais chaque fois que j’ouvre truecrypt gmail envoie un mail avec Exim
To: root@gmail.com
Auto-Submitted: auto-generated
Subject: *** SECURITY information for pedro-H ***
Message-Id: E1bi4oq-0001mS-8V@pedro-H
Date: Thu, 08 Sep 2016 21:17:04 +0200

pedro-H : Sep  8 21:17:03 : pedropedro : 1 incorrect password attempt ; TTY=unknown ; PWD=/home/pedropedro ; USER=root ; COMMAND=/usr/bin/truecrypt --core-service

La question est comment stopper exim4 car

le demon est toujours actif meme avec la commande [systemctl stop exim4]

ou avec la command service

Pour l’arrêter avec rcconf en enlevant la petite étoile et en rebootant le PC, exim est toujours actif
pour vérifier
rcconf --list
exim est bien off donc pas actif

Et pourtant exim est bien actif puisque l’envoi de mails via un formulaire de contact au blog auto-hébergé arrive à destination sur ma boite mail

pourquoi mdm & network-manager sont désactivés je n’y comprends rien.
rcconf ne servirai que s’il existe des taches de fond au boot?

Et avec systemctl disable exim4 ?

Je viens de le faire puis ai accéder en 4G au blog auto-hébergé pour m’envoyer un mail depuis le blog.
Le message du mail est arrivé dans la boite mail au PC et exim est donc toujours actif.

Idem si j’ouvre TrueCrypt pour ouvrir un container, désormais il faut être en root et avant l’installation de Exim, non. Et puis je recois un mail root@gmail.

Delivery to the following recipient failed permanently:

     root@gmail.com

Technical details of permanent failure: 
Google tried to deliver your message, but it was rejected by the server for the recipient domain gmail.com by gmail-smtp-in.l.google.com. [2b00:1530:400c:c02::1b].

The error that the other server returned was:
550-5.1.1 The email account that you tried to reach does not exist. Please try
550-5.1.1 double-checking the recipient's email address for typos or
550-5.1.1 unnecessary spaces. Learn more at
550 5.1.1  https://support.google.com/mail/?p=NoSuchUser n121si3329131wmg.68 - gsmtp


----- Original message -----

DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=from:to:auto-submitted:subject:message-id:date;
        bh=IF+SQZ/sOJLNGkuBKGmKmw+4TdQy+FLZW89asiYm9vw=;
        b=KT2miEdzUvArLM5bFu+q45ubjWf4Vp4kc6tz9g8pVJa6A8VgPAgHSzHp9QqKjcwaoj
         7OlLTkCd/Ot/BVTLR/BrsDvHVvWgGFA761hosLzPWS34RAFwA2xC7DiXjjkkEyAoC/Rp
         kdF6ZQaXmiEo8KEHON/y7ksEQb+M6iZxYRR8d4pfGYp01T4ZCQ1LWifCDvQw75fK7PpV
         fSpiWgVqI/vlWkfiI02sWwbiVhnCJVk7Gr+YtlB7ywMJ/Tt3rS5LO0DBlmUiZLOFxcr/
         mmrF/CFYLPk+68Avf5BiUkrV0AtOWUjDJT/NgZeAr79DcwIruYQMU4nPXS6QvlvUmUAe
         TbNg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:from:to:auto-submitted:subject:message-id:date;
        bh=IF+SQZ/sOJLNGkuBKGmKmw+4TdQy+FLZW89asiYm9vw=;
        b=hpb0rmUNNTgbJu/qvGiJ++UHWgGX0eP0/G22e1370BYrqlVHtU/rp4a1AWaMHRQedU
         cnkYUBXktpIR1qiDXrrtvh3Css3ymdlPYDyHnug4Kt3zwHKUV9Hc1AqQLsOavNVk99Q
         R6Wgyh7WsiZaLmqdQt6Z7FM9EDZaVLSSwqoxihriu6Q5qGSAbVxFRJAxiQKGkPao2o4B
         CKmh78PD2Ibat3djvQU5XHoSpojaoeOKS9uH6aiHLdCZFPS7Jy6CmhIYffpvPeyxb6ZN
         +ZjaHUNnuWueBvcQYN3SFT8Tg8BDlfLxU3TX7GyIKBrgE7WZnMY83Mvan2V60vcYoWbt
         7oPA==
X-Gm-Message-State: AE9vXwM1ulDt0JZRRoaAFQTpPXbMHajQNQyt4Q+V9d3Yqnxg5tA6ZullRLk3U/Kiz2khEA==
X-Received: by 10.28.174.11 with SMTP id x11mr153358wme.41.1950785190388;
        Fri, 09 Sep 2016 14:06:30 -0700 (PDT)
Return-Path: <mpedro***@gmail.com>
Received: from pedro-H ([176.152.103.90])
        by smtp.gmail.com with ESMTPSA id m133sm5155173wmg.0.2016.09.09.14.06.29
        for <root@gmail.com>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Fri, 09 Sep 2016 14:06:29 -0700 (PDT)
From: pedro <mpedro***@gmail.com>
X-Google-Original-From: pedro <pedropedro@localhost>
Received: from pedrompedro by pedro-H with local (Exim 4.86_2)
	(envelope-from <pedropedro@gmail.com>)
	id 1biSzw-0007gI-N9
	for root@gmail.com; Fri, 09 Sep 2016 23:06:08 +0200
To: root@gmail.com
Auto-Submitted: auto-generated
Subject: *** SECURITY information for pedro-H ***
Message-Id: <E1biSzw-0007gI-N9@pedro-H>
Date: Fri, 09 Sep 2016 23:06:08 +0200

pedro-H : Sep  9 23:06:07 : pedropedro : 1 incorrect password attempt ; TTY=unknown ; PWD=/home/pedropedro ; USER=root ; COMMAND=/usr/bin/truecrypt --core-service

Tu essaies d’envoyer un mail à root@gmail.com ? Tu cherches les ennuis ? :confused:

Des fois je l’entends crier Root me :flushed::yum: