Configuration postfix

bonjour a tous,

j’ai installé postfix et postfix admin mais je n’arrive pas a recevoir les mails de extérieur.
Pouvez vous m’aider a trouver l’origine du problème ?

j ai fait quelque test

retour mail google

[code]From: Mail Delivery Subsystem mailer-daemon@googlemail.com
To:
Subject: Delivery Status Notification (Failure)
Date: Tue, 24 Nov 2015 22:50:01 +0000

Delivery to the following recipient failed permanently:

 xxxx@mondedomian.com

Technical details of permanent failure:
The recipient server did not accept our requests to connect. Learn more at https://support.google.com/mail/answer/7720
[(10) smtp.mondedomian.com. [x.x.x.x]:25: socket error]

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

DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20120113;
h=message-id:date:from:to:subject:mime-version:content-type
:content-transfer-encoding;
bh=VQe0l+ZAypjNoEKhDmHKIefbg5IvQ7u/nev7wysGxYQ=;
b=eAhNQqZZ/6vrcA914q/kJrYroON+WIU5Ecawu90MIzmShEbSRxURpPhG4VjriJYVRO
th3Rq1ismhFFLs2ftloG86Akaqglg1WOORbFUbPXo4GLlChxiyCxx23JvE1KxIsv/laP
c2MaDxFDeBW7Ch2cVUkGiHfGdwRiITBVeLeQ4dY44/o1EQOPryEmSPWCTv9gkU1e/NPx
kZJj6vJuQSLVrCTIOjjBNmn1wauBOh2LWQPx+VLqkfbIpU0t9CTT104Wb2U+lQvHo0QA
uy901AM5Fqoe1at3BAb00QcpBn+fOIzn+F/Wz1Gg/ws0MCYR+R9q9JUlhYneom/2gduJ
S0/g==
X-Received: by 10.28.50.70 with SMTP id y67mr10524373wmy.91.1448139598066;
Sat, 21 Nov 2015 12:59:58 -0800 (PST)
Return-Path: <>
Received: from (x. [x.x.x.x])
by smtp.gmail.com with ESMTPSA id n7sm5624839wmf.21.2015.11.21.12.59.56
for
(version=TLSv1/SSLv3 cipher=OTHER);
Sat, 21 Nov 2015 12:59:57 -0800 (PST)
Message-ID: 5650db4d.07bd1c0a.e33a5.ffffe8a2@mx.google.com
Date: Sat, 21 Nov 2015 12:59:57 -0800 (PST)
From: xxxx
To: xxxx
Subject: test mail
X-Mailer: Sylpheed 3.5.0beta1 (GTK+ 2.24.25; i586-pc-linux-gnu)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

test mail!
[/code]

host -t MX nomdedomain.com

ping smpt.nomdedomain.com ok

telnet nomdedomain.com 25

telnet 127.0.0.1 25

Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. 220 nomdedomain.com ESMTP Sendmail 8.14.4/8.14.4/Debian-8; Sun, 22 Nov 2015 11:37:14 +0100; (No UCE/UBE) logging access from: localhost(OK)-localhost [127.0.0.1] 500 5.5.1 Command unrecognized: "" 221 2.0.0 nomdedomain.com closing connection

iptable -L

[code]Chain INPUT (policy DROP)
target prot opt source destination
fail2ban-ssh tcp – anywhere anywhere multiport dports ssh
ACCEPT all – anywhere anywhere state RELATED,ESTABLISHED
ACCEPT all – anywhere anywhere
ACCEPT icmp – anywhere anywhere
ACCEPT tcp – anywhere anywhere tcp dpt:domain
ACCEPT udp – anywhere anywhere udp dpt:domain
ACCEPT tcp – anywhere anywhere tcp dpt:smtp
ACCEPT tcp – anywhere anywhere tcp dpt:ssh
ACCEPT tcp – anywhere anywhere tcp dpt:http
ACCEPT tcp – anywhere anywhere tcp dpt:https
ACCEPT tcp – anywhere anywhere tcp dpt:8443

Chain FORWARD (policy DROP)
target prot opt source destination

Chain OUTPUT (policy DROP)
target prot opt source destination
ACCEPT all – anywhere anywhere state RELATED,ESTABLISHED
ACCEPT all – anywhere anywhere
ACCEPT icmp – anywhere anywhere
ACCEPT tcp – anywhere anywhere tcp dpt:domain
ACCEPT udp – anywhere anywhere udp dpt:domain
ACCEPT tcp – anywhere anywhere tcp dpt:smtp
ACCEPT tcp – anywhere anywhere tcp dpt:ssh
ACCEPT tcp – anywhere anywhere tcp dpt:http
ACCEPT tcp – anywhere anywhere tcp dpt:https

Chain fail2ban-ssh (1 references)
target prot opt source destination
RETURN all – anywhere anywhere [/code]

netsat

Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1366/sshd tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 745/sendmail: MTA: tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 1141/mysqld tcp 0 0 127.0.0.1:587 0.0.0.0:* LISTEN 745/sendmail: MTA: tcp 0 0 x.x.x.x:22 x.x.x.x:34949 ESTABLISHED 3505/sshd: xxxx [pr tcp 0 0 x.x.x.x:22 x.x.x.x:34650 ESTABLISHED 3211/sshd: xxxxx [p tcp 0 44 x.x.x.x:22 x.x.x.x:58824 ESTABLISHED 3384/sshd: xxxxx [p tcp6 0 0 :::80 :::* LISTEN 832/apache2 tcp6 0 0 :::22 :::* LISTEN 1366/sshd udp 0 0 0.0.0.0:11077 0.0.0.0:* 436/dhclient udp 0 0 0.0.0.0:68 0.0.0.0:* 436/dhclient udp6 0 0 :::7278 :::* 436/dhclient

main.cf

[code]# See /usr/share/postfix/main.cf.dist for a commented, more complete version

Debian specific: Specifying a file name will cause the first

line of that file to be used as the name. The Debian default

is /etc/mailname.

#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP1 $mail_name (Debian/GNU22)
biff = no

appending .domain is the MUA’s job.

append_dot_mydomain = no

Uncomment the next line to generate “delayed mail” warnings

#delay_warning_time = 4h

readme_directory = no

TLS parameters

smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

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 = localhost
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = nomdedomain.com, localhost, localhost.localdomain, localhost
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = eth0 [/code]

merci d avance pour votre contribution

Sur notre wiki, tu as la marche à suivre pour l’installer.

merci de m’avoir répondue.
j’ai fini par trouvé, je n’avais pas fait attention a cela

[code]Votre DNS est correctement configuré ? Les ports sont ouverts ? Bien. Vous avez fait le plus dur.

Vérifiez le nom de votre machine :

$ hostname

Cette commande doit vous retourner smtp.monDomaine.com. Si ce n’est pas le cas, éditez le fichier /etc/hosts et vérifiez que vous avez une ligne comme suit :

127.0.0.1 smtp.monDomaine.com smtp

Puis :

hostname smtp.monDomaine.com

Normalement, le hostname est maintenant OK.

Il est important que le hostname de votre machine soit le même que celui retourné par la commande host -t MX monDomaine.com, sinon Postfix posera des problèmes. [/code]

et un petit reboot.

Heureux que tu ai réussi a trouver la solution par toi même.
Je voulais juste te félicité pour la formulation de ta question, tu as donné un luxe d’information qui est rare, surtout pour un premier poste sur le forum. :023