Bonjour à tous,

Sur un de mes serveurs, sous Fedora 10, j'ai un ptit problème avec postfix.

Il a l'air bien configuré, en local si je fais un telnet sur le 25 tout va bien :

[root@localhost ~]# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 localhost.localdomain ESMTP Sendmail 8.14.3/8.14.3; Sun, 4 Apr 2010 00:50:35 +0200

Mais depuis le net :

nicolas@nico-netbook:~$ telnet 80.x.x.x 25
Trying 80.x.x.x...
telnet: Unable to connect to remote host: No route to host

Voilà ma conf postfix :


mydomain = mondomaine.com
myorigin = $mydomain
inet_interfaces = all
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mynetworks_style = host
#TLS - SMTP AUTH
disable_vrfy_command = yes
smtpd_use_tls = yes
smtpd_tls_auth_only = yes
tls_random_source = dev:/dev/urandom
smtpd_tls_cert_file = /etc/postfix/smtpd.crt
smtpd_tls_key_file = /etc/postfix/smtpd.key
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
# Add some security
smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination
relayhost = smtp.orange.fr
mailbox_command = procmail
mailbox_size_limit = 0


Bien évidemment, les ports sont bien ouverts dans ma box, et je n'ai pas de parefeu actif sur le serveur.

Une idée ?

Merci ;]
Apparemment c'est telnet qui renvoie une erreur. Que se passe-t-il si tu exécutes la commande

$ telnet 80.x.x.x

sans préciser de port 25 ?
nicolas@nico-netbook:~$ telnet 80.x.x.x
Trying 80.x.x.x...

et ça n'en fini pas !
De toute façon ya que le 25 où ça déconne. Si je le fais avec le 993 ou le 995 dovecot répond 😉
Que renvoie : netstat -laptune | grep LISTEN
[root@localhost ~]# netstat -laptune | grep LISTEN
tcp 0 0 0.0.0.0:993 0.0.0.0:* LISTEN 0 4385 1798/dovecot
tcp 0 0 0.0.0.0:995 0.0.0.0:* LISTEN 0 4389 1798/dovecot
tcp 0 0 0.0.0.0:56006 0.0.0.0:* LISTEN 0 3251 1429/rpc.statd
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 27 4310 1767/mysqld
tcp 0 0 0.0.0.0:110 0.0.0.0:* LISTEN 0 4387 1798/dovecot
tcp 0 0 0.0.0.0:143 0.0.0.0:* LISTEN 0 4383 1798/dovecot
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 0 3142 1414/rpcbind
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 0 4208 1685/sshd
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 0 5169 1961/cupsd
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 0 1490972 10975/sendmail: acc
tcp 0 0 :::993 :::* LISTEN 0 4386 1798/dovecot
tcp 0 0 :::995 :::* LISTEN 0 4390 1798/dovecot
tcp 0 0 :::110 :::* LISTEN 0 4388 1798/dovecot
tcp 0 0 :::143 :::* LISTEN 0 4384 1798/dovecot
tcp 0 0 :::111 :::* LISTEN 0 3155 1414/rpcbind
tcp 0 0 :::80 :::* LISTEN 0 4582 1909/httpd
tcp 0 0 :::22 :::* LISTEN 0 4210 1685/sshd
tcp 0 0 ::1:631 :::* LISTEN 0 5168 1961/cupsd
tcp 0 0 :::443 :::* LISTEN 0 4586 1909/httpd

Pourquoi j'ai pas d'écoute sur le 25 :s
donc c'est sendmail qui écoute en uniquement en localhost :
donc :
service sendmail stop
chkconfig sendmail off
chkconfig postfix on
alternatives --config mta (choisir postfix)
service postfix on
après ça déjà c'est mieux en local :

[root@localhost ~]# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 localhost.localdomain ESMTP Postfix

Mais depuis l'extérieur je n'ai toujours pas accès :s
Remontre le résultat de : netstat -laptune | grep LISTEN
tcp 0 0 0.0.0.0:2049 0.0.0.0:* LISTEN 0 1635732 -
tcp 0 0 0.0.0.0:993 0.0.0.0:* LISTEN 0 4385 1798/dovecot
tcp 0 0 0.0.0.0:995 0.0.0.0:* LISTEN 0 4389 1798/dovecot
tcp 0 0 0.0.0.0:56006 0.0.0.0:* LISTEN 0 3251 1429/rpc.statd
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 27 4310 1767/mysqld
tcp 0 0 0.0.0.0:875 0.0.0.0:* LISTEN 0 1635717 28421/rpc.rquotad
tcp 0 0 0.0.0.0:41741 0.0.0.0:* LISTEN 0 1635768 28436/rpc.mountd
tcp 0 0 0.0.0.0:110 0.0.0.0:* LISTEN 0 4387 1798/dovecot
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 0 1635169 28262/rpcbind
tcp 0 0 0.0.0.0:143 0.0.0.0:* LISTEN 0 4383 1798/dovecot
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 0 4208 1685/sshd
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 0 5169 1961/cupsd
tcp 0 0 0.0.0.0:41656 0.0.0.0:* LISTEN 0 1635749 -
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 0 1628759 27670/master
tcp 0 0 :::993 :::* LISTEN 0 4386 1798/dovecot
tcp 0 0 :::995 :::* LISTEN 0 4390 1798/dovecot
tcp 0 0 :::110 :::* LISTEN 0 4388 1798/dovecot
tcp 0 0 :::111 :::* LISTEN 0 1635174 28262/rpcbind
tcp 0 0 :::143 :::* LISTEN 0 4384 1798/dovecot
tcp 0 0 :::80 :::* LISTEN 0 4582 1909/httpd
tcp 0 0 :::22 :::* LISTEN 0 4210 1685/sshd
tcp 0 0 ::1:631 :::* LISTEN 0 5168 1961/cupsd
tcp 0 0 :::443 :::* LISTEN 0 4586 1909/httpd


On a bien du 25 maintenant 😉
Quand tu testes l'IP externe, tu le fais depuis ton réseau local ?
Certains routers ne permettent pas de tester l'IP externe depuis l'intérieur
non je le fais vraiment depuis l'extérieur, le serveur n'est pas chez moi 😉
Les freebox ferment le port 25 par défaut.
Que renvoie nmap TONIPEXTERNE ?
Starting Nmap 5.00 ( http://nmap.org ) at 2010-04-04 16:15 CEST
Interesting ports on LMontsouris-156-24-23-5.w80-14.abo.wanadoo.fr (80.x.X.X:
Not shown: 995 filtered ports
PORT STATE SERVICE
22/tcp open ssh
80/tcp open http
143/tcp open imap
993/tcp open imaps
995/tcp open pop3s

Nmap done: 1 IP address (1 host up) scanned in 24.00 seconds

Je comprends pas, pourtant le 25 est ouvert dans la box :s est-ce que orange pourrait bloquer ?

edit : ça ne peut être qu'orange !
quand je fais le nmap de là où je suis, j'ai le résultat du dessous (depuis une connec orange).
Le serveur aussi est sur une connec orange.
Quand je fais le nmap vers le serveur, depuis une connec sfr j'ai

Not shown: 994 filtered ports
PORT STATE SERVICE
22/tcp open ssh
25/tcp open smtp
80/tcp open http
143/tcp open imap
993/tcp open imaps
995/tcp open pop3s

et je peux faire un telnet :

root@shivaserv:/home/administrateur# telnet mondomaine 25
Trying 80.x.x.x
Connected to mondomaine
Escape character is '^]'.
220 localhost.localdomain ESMTP Postfix
quit
221 2.0.0 Bye

!!
ouafnico wrote:Je comprends pas, pourtant le 25 est ouvert dans la box :s est-ce que orange pourrait bloquer ?
C'est possible, regarde s'il y a une option SMTP quelque part dans l'interface d'admin
il n'y en a pas :s regarde mon edit, c'est sûr c'est orange qui bloque !
j'ai modifié la conf de postfix pour qu'il soit utilisable sur port 587, et j'en ai profité pour le configurer en smtps.
Par contre, du coup, comment ça se passe vis à vis du cheminement des mails, lorsque les mails arrivent au niveau du serveur, qu'est ce qui fait que le port 587 est utilisé au lieu du 25 ?
Ca fait pas !!! 🙁 Les serveurs de mails parlent entre eux sur le port 25