Page 1 sur 2

[mail] pas de serveur mail (abandon)

Publié : jeu. 09 juin 2011, 23:51
par shom
[EDIT modo: -> http://forums.archlinux.fr/topic8487.html]
Salut amis archlinuxiens ! J'ai besoin de vous car j'ai quelques petits problemes avec l'installation (configuration ?) de mon serveur Mail
Alors.. J'essaie de monter mon serveur Mail avec Postfix, Dovecot, Spamassassin et Postgrey (lui, je sais pas a quoi il sert !). J'ai donc suivi le tuto http://www.gelens.org/archlinux-mailser ... vecot-conf en m'aidant ce celui ci http://blog.rom1v.com/2009/08/hebergez- ... erez-vous/ (histoire de comprendre un peu ce que je faisais en français)

Les trucs que j'ai du faire en dehors du tutoriel :
- J'ai fait un compte gratuit sur DynDNS, choisis "Host with IP adress", coché la case "I have mail server with another name and would like to add MX hostname...", choisis un "MX Hostname" qui ma plaisait, et coché la case "Yes, use it as my primary mail relay"
- Ouvert les ports 25 (TCP-UDP) pour le SMTP et 143 (TCP-UDP) pour le IMAP

Et les problemes que j'ai :
- Impossible de me connecter avec un client mail (meme sur le réseau local) avec comme identifiant "userlinux"@"MXHostname". En configurant mon serveur SMTP et IMAP avec l'adresse FQDN
- Je sais pas si c'est vraiment lié et si c'est vraiment important mais quand je fais un "rc.d restart postfix" il "FAIL" tout le temps a le stoper.. Mais bon, comme il est actif d'apres rc.d list je me fais pas de souci

Si vous pouviez m'aider a m'en sortir :) Merci d'avance !

Re: [MAIL] pas de serveur mail (en cours)

Publié : ven. 10 juin 2011, 00:01
par benjarobin
Avant de passer par un DNS, arrive tu as te connecter avec ton IP ?

Re: [MAIL] pas de serveur mail (en cours)

Publié : ven. 10 juin 2011, 00:30
par shom
Je viens d'essayer avec l'adresse IP locale et internet mais j'ai le meme probleme...
Merci de ta réponse rapide. Une idée ?

Re: [MAIL] pas de serveur mail (en cours)

Publié : ven. 10 juin 2011, 00:42
par shom
Apres un sa-update :

Code : Tout sélectionner

defined(%hash) is deprecated at /usr/share/perl5/vend                           or_perl/Mail/SpamAssassin/Dns.pm line 757.
        (Maybe you should just omit the defined()?)
C'est pas normal ? Mais ça doit pas empecher le serveur SMTP d'etre accessible si ?

Re: [MAIL] pas de serveur mail (en cours)

Publié : ven. 10 juin 2011, 10:23
par shom
et quand je fais rc.d restart spamd :

Code : Tout sélectionner

defined(%hash) is deprecated at /usr/share/perl5/vendor_perl/Mail/SpamAssassin/Dns.pm line 757.
        (Maybe you should just omit the defined()?)
Jun 10 10:53:51.294 [6729] warn: Use of uninitialized value $opt{"syslog-socket"} in lc at /usr/bin/vendor_perl/spamd line 444.
Qu'est ce qui va pas ?

Re: [MAIL] pas de serveur mail (en cours)

Publié : ven. 10 juin 2011, 10:49
par shom
J'ai des news ! quand je fais un

Code : Tout sélectionner

telnet <adresseiplocale> 25  => Connection closed by foreign host.
telnet <adresseiplocale> 143 => telnet: Unable to connect to remote host: Connection refused 
sur un ordinateur du réseau local
Pourtant iptables n'est meme pas lancé, ca devrait marcher sanchant que spamd, postfix, postgrey et dovecot son lancés non ?

Re: [MAIL] pas de serveur mail (en cours)

Publié : ven. 10 juin 2011, 13:28
par shom
En root :

Code : Tout sélectionner

postfix check
postfix/postfix-script: warning: not owned by root: /etc/postfix/LICENSE
postfix/postfix-script: warning: not owned by root: /etc/postfix/TLS_LICENSE
postfix/postfix-script: warning: not owned by root: /etc/postfix/access
postfix/postfix-script: warning: not owned by root: /etc/postfix/aliases
postfix/postfix-script: warning: not owned by root: /etc/postfix/aliases.db
postfix/postfix-script: warning: not owned by root: /etc/postfix/bounce.cf.default
postfix/postfix-script: warning: not owned by root: /etc/postfix/canonical
postfix/postfix-script: warning: not owned by root: /etc/postfix/generic
postfix/postfix-script: warning: not owned by root: /etc/postfix/header_checks
postfix/postfix-script: warning: not owned by root: /etc/postfix/main.cf
postfix/postfix-script: warning: not owned by root: /etc/postfix/main.cf.backupfr
postfix/postfix-script: warning: not owned by root: /etc/postfix/main.cf.default
postfix/postfix-script: warning: not owned by root: /etc/postfix/main.cf.save
postfix/postfix-script: warning: not owned by root: /etc/postfix/main.cf3
postfix/postfix-script: warning: not owned by root: /etc/postfix/makedefs.out
postfix/postfix-script: warning: not owned by root: /etc/postfix/master.cf
postfix/postfix-script: warning: not owned by root: /etc/postfix/postgrey_whitelist_clients
postfix/postfix-script: warning: not owned by root: /etc/postfix/postgrey_whitelist_recipients
postfix/postfix-script: warning: not owned by root: /etc/postfix/relocated
postfix/postfix-script: warning: not owned by root: /etc/postfix/transport
postfix/postfix-script: warning: not owned by root: /etc/postfix/virtual
Y'a un truc qui est pas normal là...

Re: [MAIL] pas de serveur mail (en cours)

Publié : ven. 10 juin 2011, 13:38
par widapit
Salut !

Déjà, est-ce que t'arrives à le pinger ton serveur ?? je veux dire en local... après, quand ca marchera, on s'occupera de l'accès vers/depuis l'extérieur...
sinon, par rapport au dernier post: quels sont les droits? comment as-tu installé tout ça ??

Re: [MAIL] pas de serveur mail (en cours)

Publié : ven. 10 juin 2011, 14:38
par shom
J'arrive a le pinger, de l'extérieur ou en local sans probleme ..
Je crois (je suis pas totalement sur) de l'avoir installé en root :)

Re: [mail] pas de serveur mail (en cours)

Publié : ven. 10 juin 2011, 16:07
par tuxce
As tu permis à postfix/dovecot d'être accessible ? (/etc/hosts.allow et /etc/hosts.deny)

Re: [mail] pas de serveur mail (en cours)

Publié : ven. 10 juin 2011, 16:31
par shom
Je ne l'avais pas fait, je viens d'ajouter les lignes

Code : Tout sélectionner

postfix: ALL
dovecot: ALL
a mon hosts. allow mais j'ai toujours le meme probleme avec telnet <ip locale> 25 et telnet <ip locale> 143
Merci de votre aide :)

Re: [mail] pas de serveur mail (en cours)

Publié : ven. 10 juin 2011, 19:05
par shom
Houla ! C'est la guerre dans mon /var/log/mail.log

Code : Tout sélectionner

Jun 10 18:42:06 localhost dovecot: master: Dovecot v2.0.13 starting up (core dumps disabled)
Jun 10 18:42:08 localhost postfix/master[1026]: fatal: /etc/postfix/master.cf: line 12: bad transport type: content_filter=spamassassin
Jun 10 18:46:27 localhost dovecot: imap-login: Fatal: Can't load ssl_cert: There is no valid PEM certificate. (You probably forgot '<' from ssl_cert=</e
tc/ssl/certs/mail.crt)
Jun 10 18:46:27 localhost dovecot: master: Error: service(imap-login): command startup failed, throttling
Jun 10 18:47:27 localhost dovecot: imap-login: Fatal: Can't load ssl_cert: There is no valid PEM certificate. (You probably forgot '<' from ssl_cert=</e
tc/ssl/certs/mail.crt)
Jun 10 18:47:27 localhost dovecot: master: Error: service(imap-login): command startup failed, throttling
Jun 10 18:48:27 localhost dovecot: imap-login: Fatal: Can't load ssl_cert: There is no valid PEM certificate. (You probably forgot '<' from ssl_cert=</e
tc/ssl/certs/mail.crt)
Jun 10 18:48:27 localhost dovecot: master: Error: service(imap-login): command startup failed, throttling
Jun 10 18:49:27 localhost dovecot: imap-login: Fatal: Can't load ssl_cert: There is no valid PEM certificate. (You probably forgot '<' from ssl_cert=</e
tc/ssl/certs/mail.crt)
Jun 10 18:49:27 localhost dovecot: master: Error: service(imap-login): command startup failed, throttling
Jun 10 18:50:27 localhost dovecot: imap-login: Fatal: Can't load ssl_cert: There is no valid PEM certificate. (You probably forgot '<' from ssl_cert=</e
tc/ssl/certs/mail.crt)
Jun 10 18:50:27 localhost dovecot: master: Error: service(imap-login): command startup failed, throttling
Jun 10 19:11:10 localhost dovecot: imap-login: Fatal: Can't load ssl_cert: There is no valid PEM certificate. (You probably forgot '<' from ssl_cert=</e
tc/ssl/certs/mail.crt)
Jun 10 19:11:10 localhost dovecot: master: Error: service(imap-login): command startup failed, throttling
Jun 10 19:12:10 localhost dovecot: imap-login: Fatal: Can't load ssl_cert: There is no valid PEM certificate. (You probably forgot '<' from ssl_cert=</e
tc/ssl/certs/mail.crt)
Jun 10 19:12:10 localhost dovecot: master: Error: service(imap-login): command startup failed, throttling
Jun 10 19:13:10 localhost dovecot: imap-login: Fatal: Can't load ssl_cert: There is no valid PEM certificate. (You probably forgot '<' from ssl_cert=</e
tc/ssl/certs/mail.crt)
Jun 10 19:13:10 localhost dovecot: master: Error: service(imap-login): command startup failed, throttling
Jun 10 19:14:10 localhost dovecot: imap-login: Fatal: Can't load ssl_cert: There is no valid PEM certificate. (You probably forgot '<' from ssl_cert=</e
tc/ssl/certs/mail.crt)
Apres avoir lancé "chown -hR root /etc/postfix" je n'ai plus de message d'erreur apres "check postfix"
Je résume, en gros, j'arrive toujours pas a telneter les ports 25 et 143

Re: [mail] pas de serveur mail (en cours)

Publié : ven. 10 juin 2011, 19:14
par widapit
Jun 10 18:42:08 localhost postfix/master[1026]: fatal: /etc/postfix/master.cf: line 12: bad transport type: content_filter=spamassassin
Jun 10 18:46:27 localhost dovecot: imap-login: Fatal: Can't load ssl_cert: There is no valid PEM certificate. (You probably forgot '<' from ssl_cert=</e
tc/ssl/certs/mail.crt)
Jun 10 18:46:27 localhost dovecot: master: Error: service(imap-login): command startup failed, throttling
Jun 10 18:47:27 localhost dovecot: imap-login: Fatal: Can't load ssl_cert: There is no valid PEM certificate. (You probably forgot '<' from ssl_cert=</e
tc/ssl/certs/mail.crt)
Jun 10 18:47:27 localhost dovecot: master: Error: service(imap-login): command startup failed, throttling
Jun 10 18:48:27 localhost dovecot: imap-login: Fatal: Can't load ssl_cert: There is no valid PEM certificate. (You probably forgot '<' from ssl_cert=</e
tc/ssl/certs/mail.crt)
Jun 10 18:48:27 localhost dovecot: master: Error: service(imap-login): command startup failed, throttling
.....
apparemment, je regarderais dans '/etc/postfix/master.cf' ....

Re: [mail] pas de serveur mail (en cours)

Publié : ven. 10 juin 2011, 19:58
par shom
Dans le tuto, il est écrit :

Code : Tout sélectionner

# Replace the following line:
smtp      inet  n       -       n       -       -       smtpd
# with these three lines:
smtp      inet  n       -       n       -       -       smtpd
  -o content_filter=spamassassin
  -o receive_override_options=no_address_mappings

# And add the following three lines to the end of the file:
spamassassin unix -     n       n       -       -       pipe
  user=spamd argv=/usr/bin/vendor_perl/spamc -f -e
        /usr/sbin/sendmail -oi -f ${sender} ${recipient} 
Voilà les lignes 11,12,13 de ce fichier

Code : Tout sélectionner

smtp      inet  n       -       n       -       -       smtpd
-o content_filter=spamassassin
-o receive_override_options=no_address_mappings
C'est bien ce que j'ai fait mais j'ai ce message .. Le probleme de connexion vient de là ?

Re: [mail] pas de serveur mail (en cours)

Publié : ven. 10 juin 2011, 20:27
par widapit
mmoui, je sais pas trop comment ça marche mais apparement il te faut créer un certificat ou voir où est-ce qu'il manque ce fameux

Code : Tout sélectionner

(You probably forgot '<' from ssl_cert=</etc/ssl/certs/mail.crt)" ...

Re: [mail] pas de serveur mail (en cours)

Publié : ven. 10 juin 2011, 22:35
par shom
Non. en fait c'était un probleme dans mon fichier dovecot.conf et 10-ssl.conf. Mais c'est reglé en rajoutant "<" devant l'adresse de mon certificat SSL ! :)
Et maintenant quand je fais
telnet <IP locale> 143 (IMAP)j'obtiens ça

Code : Tout sélectionner

 OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE STARTTLS LOGINDISABLED] Dovecot ready.
ça veut dire que ça marche ? :D
Par contre avec le port 25 (SMTP) :

Code : Tout sélectionner

telnet <adresse IP> 25
telnet: Unable to connect to remote host: Connection refused
Et mon client mail me dit qu'il arrive a se connecter a mon serveur IMAP, a relever les couriers, par contre, il ne trouve aucun serveur SMTP

Re: [mail] pas de serveur mail (en cours)

Publié : sam. 11 juin 2011, 23:52
par shom
J'ai besoin de votre aide ! J'ai toujours pas de serveur SMTP !

Re: [mail] pas de serveur mail (en cours)

Publié : lun. 13 juin 2011, 00:06
par shom
Je continue a chercher mais j'ai rien ... Vous avez une idée ?

Re: [mail] pas de serveur mail (en cours)

Publié : lun. 13 juin 2011, 21:23
par shom
Allez.. Si'ouplez !

Re: [mail] pas de serveur mail (en cours)

Publié : lun. 13 juin 2011, 22:21
par widapit
heu, désolé, là je vois plus trop.... tes daemons sont bien tous démarrés correctement ? erreur de syntaxe dans le '/etc/hosts' ?
que donne

Code : Tout sélectionner

netstat
?