Pb postfix pour envoyer/recevoir mail exterie

Fermé
Trevor - 27 mai 2010 à 12:24
bob031 Messages postés 8158 Date d'inscription samedi 7 août 2004 Statut Membre Dernière intervention 1 septembre 2014 - 28 mai 2010 à 21:52
Bonjour a tous.


Débutant dans l'utilisation d'un serveur mail, j'ai quelques soucis à paramétrer l'envoi de mail et la réception depuis l'extérieur alors qu'en local, je n'ai aucun problème et je ne comprend pas pourquoi.

Voici le résultat du postconf -n:

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
html_directory = /usr/share/doc/postfix/html
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
mydestination = $myhostname, altaconcept.com, mail.ALTA.interne, localhost.ALTA.interne, localhost
mydomain = servermail.com
myhostname = severmail.com
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = $mydomain
readme_directory = /usr/share/doc/postfix
recipient_delimiter = +
relayhost = [smtp-msa@orange.fr]
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes

Est ce que quelqu'un pourrait m'aider à remédier à ce petit soucis?
A voir également:

10 réponses

jipicy Messages postés 40842 Date d'inscription jeudi 28 août 2003 Statut Modérateur Dernière intervention 10 août 2020 4 895
27 mai 2010 à 12:28
Salut,

relayhost = [smtp-msa@orange.fr]

relayhost = [smtp-msa.orange.fr] 

Plutôt, non ?
0
KuKrApOk59 Messages postés 437 Date d'inscription jeudi 27 décembre 2007 Statut Membre Dernière intervention 13 septembre 2013 84
Modifié par KuKrApOk59 le 27/05/2010 à 12:30
Salut,

C'est normal ça :
mydomain = servermail.com  
myhostname = severmail.com
?

Si tu possèdes ces domaines, oui c'est normal, sinon, y'a un souci à ce niveau (au moins)
Si vous avez votre réponse, pensez à spécifier : [Résolu]
0
J'ai modifié certaines choses, mais ce n'est toujours pas bon.
Je vous joint les nouvelles données:

Log:
May 27 14:14:29 mail postfix/postfix-script[22160]: warning: not owned by root: /etc/postfix/main.cf~
May 27 14:14:29 mail postfix/postfix-script[22162]: warning: group or other writable: /etc/postfix/./dynamicmaps.cf
May 27 14:14:29 mail postfix/postfix-script[22163]: warning: group or other writable: /etc/postfix/./master.cf
May 27 14:14:29 mail postfix/postfix-script[22164]: warning: group or other writable: /etc/postfix/./postfix-script
May 27 14:14:29 mail postfix/postfix-script[22165]: warning: group or other writable: /etc/postfix/./post-install
May 27 14:14:29 mail postfix/postfix-script[22166]: warning: group or other writable: /etc/postfix/./postfix-files
May 27 14:14:29 mail postfix/postfix-script[22186]: warning: /var/spool/postfix/etc/resolv.conf and /etc/resolv.conf differ
May 27 14:14:29 mail postfix/postfix-script[22188]: warning: /var/spool/postfix/etc/hosts and /etc/hosts differ
May 27 14:14:29 mail postfix/postfix-script[22191]: warning: /var/spool/postfix/etc/nsswitch.conf and /etc/nsswitch.conf differ
May 27 14:14:29 mail postfix/postfix-script[22210]: starting the Postfix mail system
May 27 14:14:29 mail postfix/master[22211]: daemon started -- version 2.5.5, configuration /etc/postfix
May 27 14:14:30 mail postfix/postfix-script[22255]: warning: not owned by root: /etc/postfix/main.cf~
May 27 14:14:30 mail postfix/postfix-script[22257]: warning: group or other writable: /etc/postfix/./dynamicmaps.cf
May 27 14:14:30 mail postfix/postfix-script[22258]: warning: group or other writable: /etc/postfix/./master.cf
May 27 14:14:30 mail postfix/postfix-script[22259]: warning: group or other writable: /etc/postfix/./postfix-script
May 27 14:14:30 mail postfix/postfix-script[22260]: warning: group or other writable: /etc/postfix/./post-install
May 27 14:14:30 mail postfix/postfix-script[22261]: warning: group or other writable: /etc/postfix/./postfix-files
May 27 14:14:30 mail postfix/postfix-script[22281]: warning: /var/spool/postfix/etc/resolv.conf and /etc/resolv.conf differ
May 27 14:14:30 mail postfix/postfix-script[22283]: warning: /var/spool/postfix/etc/hosts and /etc/hosts differ
May 27 14:14:30 mail postfix/postfix-script[22286]: warning: /var/spool/postfix/etc/nsswitch.conf and /etc/nsswitch.conf differ


Postconf -n:
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
html_directory = /usr/share/doc/postfix/html
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
mydestination = $myhostname, altaconcept.com, mail.ALTA.interne, localhost.ALTA.interne, localhost
mydomain = servermail.com
myhostname = severmail.com
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = $mydomain
readme_directory = /usr/share/doc/postfix
recipient_delimiter = +
relayhost = [smtp-msa@orange.fr]
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
0
KuKrApOk59 Messages postés 437 Date d'inscription jeudi 27 décembre 2007 Statut Membre Dernière intervention 13 septembre 2013 84
27 mai 2010 à 15:05
Pour ça :

May 27 14:14:30 mail postfix/postfix-script[22255]: warning: not owned by root: /etc/postfix/main.cf~
May 27 14:14:30 mail postfix/postfix-script[22257]: warning: group or other writable: /etc/postfix/./dynamicmaps.cf
May 27 14:14:30 mail postfix/postfix-script[22258]: warning: group or other writable: /etc/postfix/./master.cf
May 27 14:14:30 mail postfix/postfix-script[22259]: warning: group or other writable: /etc/postfix/./postfix-script
May 27 14:14:30 mail postfix/postfix-script[22260]: warning: group or other writable: /etc/postfix/./post-install
May 27 14:14:30 mail postfix/postfix-script[22261]: warning: group or other writable: /etc/postfix/./postfix-files

Il faut que tu changes les droits de tes fichiers
C'est pas bon, et postfix râle ...

Exemple de droits chez moi (dans /etc/postfix) :

-rw-r--r-- 1 root root   318 Mar 19 15:08 dynamicmaps.cf
-rw-r--r-- 1 root root  1252 Mar 23 18:24 main.cf
-rw-r--r-- 1 root root  4300 Mar 19 15:08 master.cf
-rwxr-xr-x 1 root root 22774 Sep 14  2008 post-install
-rw-r--r-- 1 root root 18231 Sep 14  2008 postfix-files
-rwxr-xr-x 1 root root  7421 Sep 14  2008 postfix-script
0

Vous n’avez pas trouvé la réponse que vous recherchez ?

Posez votre question
J'ai essayé de changé mais soit ça ne marche pas soit je suis nul (ce que jepense etre le cas).
Quels sont les lignes de commandes a écrire?
0
KuKrApOk59 Messages postés 437 Date d'inscription jeudi 27 décembre 2007 Statut Membre Dernière intervention 13 septembre 2013 84
27 mai 2010 à 16:00
Pour changer le propriétaire d'un fichier :
chown root:root LE_NOM_DU_FICHIER

Pour changer les droits d'un fichier :
chmod 644 LE_NOM_DU_FICHIER
(si tu veux -rw-r--r-- comme droits)
0
bob031 Messages postés 8158 Date d'inscription samedi 7 août 2004 Statut Membre Dernière intervention 1 septembre 2014 472
27 mai 2010 à 21:02
Bonjour,


peut-être manque-t-il cette étape :

http://www.linux-kheops.com/doc/postfix-jaco/postfix-jaco-5.html

0
C'est fait mais cela ne marche toujours pas
0
bob031 Messages postés 8158 Date d'inscription samedi 7 août 2004 Statut Membre Dernière intervention 1 septembre 2014 472
Modifié par bob031 le 28/05/2010 à 21:57
je ne pense pas que cela a été fait correctement.

pour preuve voici mon

> root@mandriva[192.168.1.2]:~# postconf -n  
command_directory = /usr/sbin  
config_directory = /etc/postfix  
daemon_directory = /usr/lib/postfix  
data_directory = /var/lib/postfix  
html_directory = /usr/share/doc/postfix/html  
inet_interfaces = localhost  
mail_owner = postfix  
mailq_path = /usr/bin/mailq  
manpage_directory = /usr/share/man  
mynetworks_style = host  
newaliases_path = /usr/bin/newaliases  
queue_directory = /var/spool/postfix  
readme_directory = /usr/share/doc/postfix/README_FILES  
relayhost = [smtp.club-internet.fr]  
sender_canonical_maps = hash:/etc/postfix/canonical  
sendmail_path = /usr/sbin/sendmail.postfix  
setgid_group = postdrop  
smtp_sasl_auth_enable = yes  
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd  
smtp_sasl_security_options =  
smtpd_banner = $myhostname ESMTP $mail_name ($mail_version) (Mandriva Linux)  
unknown_local_recipient_reject_code = 450  
> root@mandriva[192.168.1.2]:~#


j'ai mis en gras la ligne que je ne retrouve pas chez toi.

il n'y a que comme ça (en suivant les indications de toute la page) que j'ai pu envoyer un mail vers l'extérieur (mais bon, je n'était pas dans un contexte "professionnel", c'était juste pour le fun chez moi et je ne possède pas de nom de domaine valide!).

je confirme aussi ce que souligne Jipicy, il faut suivre sa correction (et pour moi le port est inutile).
0
jipicy Messages postés 40842 Date d'inscription jeudi 28 août 2003 Statut Modérateur Dernière intervention 10 août 2020 4 895
28 mai 2010 à 08:38
Je persiste avec le :
relayhost = [smtp-msa@orange.fr]

L'arobase est en trop !!!

Et même à la limite préciser le port aussi :

relayhost = [smtp-msa.orange.fr]:587
0
J'ai modifié mais cela ne marche toujours pas.
0