• Serveurs
  • [Discussion] Installer un serveur de mail avec Postfix et Dovecot

j'ai ça :

de-mauroy.fr. 0 MX 10 mail.de-mauroy.fr

mail.de-mauroy.fr. 60 A 37.59.30.101

de-mauroy.fr. 0 TXT "v=spf1 a mx ip4:37.59.30.101 ~all"

_dmarc.de-mauroy.fr. 0 TXT "v=DMARC1; p=reject; rua=mailto:postmaster@de-mauroy.fr; ruf=mailto:admin@de-mauroy.fr; fo=0; adkim=s; aspf=s; pct=100; rf=afrf; sp=reject"

mail._domainkey.de-mauroy.fr. 0 DKIM v=DKIM1; k=rsa; s=*; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAztgVix9VgCDJQyDxRw8y7nCnJ1JB1cgW4UnlNAHjtUfFELfq5htoBB46NUiSf6CYZugWiAbmz+byXp1qknl6J/am/Hi3ezm3vJbUR3A5ljqPscVPWp0A3Vy9fgVmEol737SGjSP+NkOBGkpCMNcRhD3jQ7j8za0yc9pGK9dFU0wEy0Aw4fyqXSPUs2mrp5llKGpBnQQgATol.............

Et j'ai aussi ça comme message d'erreur :

2017-03-22T13:27:52.729377+00:00 mail opendkim[215]: mail._domainkey.de-mauroy.fr: key data is not secure: /etc/opendkim/keys can be read or written by other users

Pourtant côté Rainloop IMAP et SMTP réponde bien lors de la création du domaine dans l'admin.

Heu, par contre si c'est bien ton mot de passe SQL que tu as laissé dans ton premier post, tu ferai bien de le changer au plus vite.

De rien, on au tous fait l'erreur au moins une fois 😉

Si j'offre un sandwich à la fraise en guise de trophée ça tente quelqu'un de m'aider à trouver pourquoi ?

😃

Sauvegarde ta clef actuelle et régénère une nouvelle, ensuite paramètre de nouveau ton DNS avec la nouvelle clef pour voir.

20 jours plus tard

Re !

Simplement pour dire qu'après re-génération de la clef et redémarre du conteneur c'est nickel.

Plus d'erreurs et mes mails partent de nouveau.

Encore merci à tous !!

13 jours plus tard

Bonjour, je viens de remarquer que je ne peux plus envoyer ni recevoir de mail. J'ai testé au niveau de rainloop IMAP et SMTP sont ok. J'ai regardé dans le fichier /var/log/mail.log et j'ai ce type d'erreur:

Apr 26 16:32:23 toto postfix/smtpd[25369]: connect from ***-***-***-***.adsl.com[***.***.***.***]
Apr 26 16:32:24 toto postfix/smtpd[25369]: Anonymous TLS connection established from ***-***-***-***.adsl.com[***.***.***.***]: TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)
Apr 26 16:32:24 toto postfix/smtpd[25369]: 68752240071: client=***-***-***-***.adsl.com[***.***.***.***]
Apr 26 16:32:24 toto postfix/cleanup[25374]: 68752240071: message-id=<1d110cbc-d7fb-d2fc-b6e8-65cc1aa4cd9f@domain.nd>
Apr 26 16:32:24 toto opendkim[4000]: 68752240071: ***-***-***-***.adsl.com [***.***.***.***] not internal
Apr 26 16:32:24 toto opendkim[4000]: 68752240071: not authenticated
Apr 26 16:32:24 toto opendmarc[3984]: 68752240071 ignoring Authentication-Results at 0 from toto.domain.nd
Apr 26 16:32:24 toto opendmarc[3984]: 68752240071: domain.nd none
Apr 26 16:32:24 toto postfix/cleanup[25374]: 68752240071: milter-reject: END-OF-MESSAGE from ***-***-***-***.adsl.com[***.***.***.***]: 4.7.1 Service unavailable - try again later; from=<mail@domain.nd> to=<contact@domain.nd> proto=ESMTP helo=<titi.domain.nd>
Apr 26 16:32:24 toto postfix/smtpd[25369]: disconnect from ***-***-***-***.adsl.com[***.***.***.***]

C'est un problème au niveau d'opendkim ?

Ce serait un problème au niveau de opendmarc? Soit, vérifier dkim et spdf.

J'ai vérifié dkim avec l'outil cité ci-dessus http://dkimcore.org/c/keycheck, il me dit bien "This is a valid DKIM key record".
J'ai vérifié la configuration de spdf, tout semble correcte.

Cela fonctionnait avant, je ne comprend pas pourquoi d'un seul coup cela ne fonctionne plus :/

4 mois plus tard

Bonjour a tous

Je souhaiterai me faire un serveur mail pour me passer des services de Gmail avec un raspberry pi B+ qui traine a la maison.

Est ce suffisament puissant pour que faire tourner simplement u serveur mail ?
Si oui, est ce que je pourrai utiliser l'image docker ? ou est ce que je vais devoir utiliser le script qui n'est plus maintenu ?

Merci

K

je suis bete, en plus je l'avais vu la semaine dernière...
Du coup c'est moute, le Rpi B+ est 700 Mhz a moins que je l'overclock jusqu'a 1Ghz

Merci !

un mois plus tard

Bonjour, mon serveur fonctionne plutôt bien depuis 1an mais je viens de me rendre compte que les acents passaient très bien dans le sujet mais pas dans le corps du mail:
si j'utilise la commande: echo "éèç@" | mail -s "éèç" mail.domaine.tld, j'ai en sujet "éèç" et en message "éèç@" mes locales sont LANG=fr_FR.UTF-8.
Une idée?

2 ans plus tard

Bonjour
Je suis debutant et je suis bloqué à la ligne" http://postfixadmin.domain.tld/setup.php" en effet cela m'indique que "file don't exist" si je fais http://postfixadmin.domain.tld j'arrive sur la page default Apache (qui est bien sur mon serveur car j'ai fait une modif pour verifier)
je pense que mon pb viens des droits ou declarations ... merci poru votre aide
Pour info j'ai bien reussi a faire fonctionner www.mondomaine.tld/version.php
merci

    hello Merci j ai commencé à regarder mais je m’aperçois que je me manque de formation sur le sujet
    Je vais me documenter
    A+

    2 mois plus tard

    Bonjour a tous,

    j'ai décider de refaire une boite mail suite a mon changement de domaine , je rencontre quelques soucis notamment quand j'essaye de m'identifier avec une boite mail créer sur postfixadmin.

    j'ai le msg " L'authentification a échoué" sur rainloop malgres que tout passe en vert du coté imap et smtp .

    Du coté log j'ai çela :
    /etc/postfix/master.cf: line 41: using backwards-compatible default setting chroot=y
    Aug 13 14:50:41 server postfix/master[4370]: /etc/postfix/master.cf: line 44: using backwards-compatible default setting chroot=y
    Aug 13 14:50:41 server postfix/master[4370]: /etc/postfix/master.cf: line 45: using backwards-compatible default setting chroot=y
    Aug 13 14:50:41 server postfix/master[4370]: /etc/postfix/master.cf: line 47: using backwards-compatible default setting chroot=y
    Aug 13 14:50:41 server postfix/master[4370]: /etc/postfix/master.cf: line 48: using backwards-compatible default setting chroot=y
    Aug 13 14:50:41 server postfix/master[4370]: /etc/postfix/master.cf: line 49: using backwards-compatible default setting chroot=y
    Aug 13 14:50:41 server postfix/master[4370]: /etc/postfix/master.cf: line 50: using backwards-compatible default setting chroot=y
    Aug 13 14:50:41 server postfix/master[4370]: /etc/postfix/master.cf: line 53: using backwards-compatible default setting chroot=y
    Aug 13 14:50:41 server postfix/master[4370]: /etc/postfix/master.cf: line 54: using backwards-compatible default setting chroot=y
    Aug 13 14:50:41 server postfix/master[4370]: /etc/postfix/master.cf: line 55: using backwards-compatible default setting chroot=y

    merci d'avance

      Diesel Bonjour,

      a l'occasion si tu peut poster ton fichier /etc/postfix/master.cf on pourra y voir plus clair.
      Pense à nous dire si tu as suivi le tuto, effectuer des changement etc bien plus simple pour te répondre 🙂

      J'ai effectuer une install récente avec ce procédé, j'ai du mettre quelques petits truc au gout du jour mais ça marche sans trop de changements. le seul truc qui ne marche plus pour l'instant c'est l'utilisation d'identifiant court au travers de rainloop.

      pour ton soucis :

      If this service should remain chrooted, then the system administrator should make the backwards-compatible setting chroot = y permanent in master.cf. For example, to update the chroot setting for the smtp inet service:
      
      root@mail ~ #postconf -F smtp/inet/chroot=y
      root@mail ~ #postfix reload

      devrais y remedier ... enfin je pense !

        j'ai bien suivi le tuto MattProd me suis arreter au chapitre 8 mon /etc/postfix/master.cf

        `

        service type private unpriv chroot wakeup maxproc command + args

        (yes) (yes) (yes) (never) (100)

        ==========================================================================

        smtp inet n - - - - smtpd
        -o content_filter=spamassassin
        #smtp inet n - - - 1 postscreen
        #smtpd pass - - - - - smtpd
        #dnsblog unix - - - - 0 dnsblog
        #tlsproxy unix - - - - 0 tlsproxy
        submission inet n - - - - smtpd
        -o syslog_name=postfix/submission
        -o smtpd_tls_dh1024_param_file=${config_directory}/dh2048.pem
        -o smtpd_tls_security_level=encrypt
        -o smtpd_sasl_auth_enable=yes
        -o smtpd_client_restrictions=permit_sasl_authenticated,reject

        -o milter_macro_daemon_name=ORIGINATING

        #smtps inet n - - - - smtpd

        -o syslog_name=postfix/smtps

        -o smtpd_tls_wrappermode=yes

        -o smtpd_sasl_auth_enable=yes

        -o smtpd_client_restrictions=permit_sasl_authenticated,reject

        -o milter_macro_daemon_name=ORIGINATING

        #628 inet n - - - - qmqpd
        pickup fifo n - - 60 1 pickup
        cleanup unix n - - - 0 cleanup
        qmgr fifo n - n 300 1 qmgr
        #qmgr fifo n - n 300 1 oqmgr
        tlsmgr unix - - - 1000? 1 tlsmgr
        rewrite unix - - - - - trivial-rewrite
        bounce unix - - - - 0 bounce
        defer unix - - - - 0 bounce
        trace unix - - - - 0 bounce
        verify unix - - - - 1 verify
        flush unix n - - 1000? 0 flush
        proxymap unix - - n - - proxymap
        proxywrite unix - - n - 1 proxymap
        smtp unix - - - - - smtp
        relay unix - - - - - smtp

        -o smtp_helo_timeout=5 -o smtp_connect_timeout=5

        showq unix n - - - - showq
        error unix - - - - - error
        retry unix - - - - - error
        discard unix - - - - - discard
        local unix - n n - - local
        virtual unix - n n - - virtual
        lmtp unix - - - - - lmtp
        anvil unix - - - - 1 anvil
        scache unix - - - - 1 scache

        Interfaces to non-Postfix software. Be sure to examine the manual

        pages of the non-Postfix software to find out what options it wants.

        #

        Many of the following services use the Postfix pipe(8) delivery

        agent. See the pipe(8) man page for information about ${recipient}

        and other message envelope options.

        maildrop. See the Postfix MAILDROP_README file for details.

        Also specify in main.cf: maildrop_destination_recipient_limit=1

        #
        maildrop unix - n n - - pipe
        flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}

        Recent Cyrus versions can use the existing "lmtp" master.cf entry.

        Specify in cyrus.conf:

        lmtp cmd="lmtpd -a" listen="localhost:lmtp" proto=tcp4

        #

        Specify in main.cf one or more of the following:

        mailbox_transport = lmtp:inet:localhost

        virtual_transport = lmtp:inet:localhost

        Cyrus 2.1.5 (Amos Gouaux)

        Also specify in main.cf: cyrus_destination_recipient_limit=1

        #cyrus unix - n n - - pipe

        user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}

        Old example of delivery via Cyrus.

        #old-cyrus unix - n n - - pipe

        flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user}

        See the Postfix UUCP_README file for configuration details.

        uucp unix - n n - - pipe
        flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)

        Other external delivery methods.

        ifmail unix - n n - - pipe
        flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
        bsmtp unix - n n - - pipe
        flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient
        scalemail-backend unix - n n - 2 pipe
        flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
        mailman unix - n n - - pipe
        flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
        ${nexthop} ${user} `

        quand je tape ce que tu ma donner j'ai cela

        root@server:~# postconf -F smtp/inet/chroot=y
        root@server:~# postfix reload
        postfix: Postfix is running with backwards-compatible default settings
        postfix: See http://www.postfix.org/COMPATIBILITY_README.html for details
        postfix: To disable backwards compatibility use "postconf compatibility_level=2" and "postfix reload"
        /usr/sbin/postconf: warning: /etc/postfix/main.cf: undefined parameter: server
        postfix/postfix-script: refreshing the Postfix mail system