Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 04/09/2007, à 11:02

bertrand.r

[RESOLU] - Problème avec postfix

Bonjour à tous,

J'ai installé postfix, courier, sasl etc.

Mais j'ai un soucis depuis ce matin. Le dossier /etc/postfix est chown en root root. Le contenu de ce dossier est chown en root postfix. Les fichiers sont chmod 644.

Voila l'erreur (en gros j'ai tout réuni au même en droit donc les heures faites pas attention) :
Sep  4 10:44:39 shell postfix/sendmail[31795]: fatal: open /etc/postfix/main.cf: Permission denied
Sep  4 10:56:11 shell postfix/virtual[32221]: fatal: open /etc/postfix/mysql-virtual_mailboxes.cf: Permission denied
Sep  4 10:56:12 shell postfix/master[31005]: warning: process /usr/lib/postfix/virtual pid 32221 exit status 1
Sep  4 10:56:12 shell postfix/master[31005]: warning: /usr/lib/postfix/virtual: bad command startup -- throttling
Sep  4 10:57:12 shell postfix/virtual[32270]: fatal: open /etc/postfix/mysql-virtual_mailboxes.cf: Permission denied
Sep  4 10:57:13 shell postfix/master[31005]: warning: process /usr/lib/postfix/virtual pid 32270 exit status 1
Sep  4 10:57:13 shell postfix/master[31005]: warning: /usr/lib/postfix/virtual: bad command startup -- throttling
Sep  4 10:58:13 shell postfix/virtual[32302]: fatal: open /etc/postfix/mysql-virtual_mailboxes.cf: Permission denied
Sep  4 10:58:14 shell postfix/master[31005]: warning: process /usr/lib/postfix/virtual pid 32302 exit status 1
Sep  4 10:58:14 shell postfix/master[31005]: warning: /usr/lib/postfix/virtual: bad command startup -- throttling
Sep  4 10:59:14 shell postfix/virtual[32334]: fatal: open /etc/postfix/mysql-virtual_mailboxes.cf: Permission denied
Sep  4 10:59:15 shell postfix/master[31005]: warning: process /usr/lib/postfix/virtual pid 32334 exit status 1
Sep  4 10:59:15 shell postfix/master[31005]: warning: /usr/lib/postfix/virtual: bad command startup -- throttling

Comme on peut le voir, il arrive pas à lire les fichiers de conf. J'ai tenté un chmod 777 (juste pour voir) et pareil. Quelqu'un aurait une idée ?

Les users vmail / postfix / postdrop sont dans le groupe postfix.

Merci d'avance.

Dernière modification par bertrand.r (Le 04/09/2007, à 13:50)

Hors ligne

#2 Le 04/09/2007, à 11:06

toniotonio

Re : [RESOLU] - Problème avec postfix

tu as installé postfix par les packages ?

si oui je te conseille un purge puis une reinstall, histoire de remettre tout correctment


Tutoriaux Postfix sur www.starbridge.org/spip
Messagerie Dédiée, Relais Mail Antispam/Antivirus, Infogérance 24/7: http://www.eole-its.com

Hors ligne

#3 Le 04/09/2007, à 11:11

bertrand.r

Re : [RESOLU] - Problème avec postfix

toniotonio le problème c'est qu'on s'est fait chié à tout configurer avec un pote donc j'ai pas trop envie de purger tu vois hmm

Hors ligne

#4 Le 04/09/2007, à 11:13

toniotonio

Re : [RESOLU] - Problème avec postfix

sauvegarde ton master.cf, ton main.cf et les eventuels autres fichiers de conf persos.

puis tu purges...


Tutoriaux Postfix sur www.starbridge.org/spip
Messagerie Dédiée, Relais Mail Antispam/Antivirus, Infogérance 24/7: http://www.eole-its.com

Hors ligne

#5 Le 04/09/2007, à 11:23

bertrand.r

Re : [RESOLU] - Problème avec postfix

Tenté mais ça change rien sad

Sinon tu vois pas de quoi ça pourrait venir ? A part un pb d'installation car ça marchait hier soir tout ça.

Hors ligne

#6 Le 04/09/2007, à 11:26

toniotonio

Re : [RESOLU] - Problème avec postfix

as tu essayé sans restaurer ta conf ?
c'est a dire juste apres l'install  ?

sinon quels sont les fichiers que tu as modifié auparavant ?


fait un ls -la /etc/postfix/

Dernière modification par toniotonio (Le 04/09/2007, à 11:27)


Tutoriaux Postfix sur www.starbridge.org/spip
Messagerie Dédiée, Relais Mail Antispam/Antivirus, Infogérance 24/7: http://www.eole-its.com

Hors ligne

#7 Le 04/09/2007, à 11:27

Uggy

Re : [RESOLU] - Problème avec postfix

http://doc.ubuntu-fr.org/serveur/comment_soumettre_un_probleme_postfix_sur_le_forum


Et donne nous les droits des fichiers:
$ stat /etc/postfix/main.cf

Hors ligne

#8 Le 04/09/2007, à 11:28

Uggy

Re : [RESOLU] - Problème avec postfix

bertrand.r a écrit :

ça marchait hier soir tout ça.

Qu'est ce que t'as changé hier soir sur ton serveur ?

Hors ligne

#9 Le 04/09/2007, à 11:47

bertrand.r

Re : [RESOLU] - Problème avec postfix

Je vais refaire mon explication conforme.

Hier soir j'ai installé le serveur avec un pote. On a mis postfix / courier / sasl / spamassassin.
Le tout fonctionnait.

Ce matin j'arrive je veux envoyer un mail : impossible pb au niveau du relay.
Je tente un postfix check qui me dit que des fichiers ont les droits en écritures (la conf par exemple) ce que je corrige directement par un 640 (sur un fichier de conf ça me parait logique ?).

Depuis j'ai les problèmes cités ci-dessus.

Résultat du postconf -n :
append_dot_mydomain = yes
biff = no
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
disable_vrfy_command = yes
inet_interfaces = all
mydestination = localhost
myhostname = mx1.baliston.fr
mynetworks = 127.0.0.0/8
relayhost =
smtpd_banner = Baliston International
smtpd_client_restrictions = reject_unknown_client,        permit_mynetworks
smtpd_helo_required = yes
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sender_restrictions = permit_mynetworks,        reject_unknown_sender_domain,        warn_if_reject reject_unverified_sender
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual_aliases.cf,mysql:/etc/postfix/mysql-virtual_aliases_mailbox.cf
virtual_gid_maps = static:5000
virtual_mailbox_base = /var/spool/vmail/
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_uid_maps = static:5000

Ensuite je tente un envoi de mail avec un smtp orange vers une des boîtes de mon serveur local (j'ai volontairement remplacé l'adresse expéditeur à cause du spam). Voila le contenu de mail.log après cet envoi :

Sep  4 11:42:19 shell postfix/smtpd[2402]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
Sep  4 11:42:19 shell postfix/smtpd[2402]: connect from smtp20.orange.fr[80.12.242.27]
Sep  4 11:42:19 shell postfix/cleanup[2406]: 4C290DB9FD: message-id=<20070904094219.4C290DB9FD@mx1.baliston.fr>
Sep  4 11:42:19 shell postfix/qmgr[1390]: 4C290DB9FD: from=<postmaster@mx1.baliston.fr>, size=263, nrcpt=1 (queue active)
Sep  4 11:42:22 shell postfix/virtual[2408]: fatal: open /etc/postfix/mysql-virtual_mailboxes.cf: Permission denied
Sep  4 11:42:23 shell postfix/master[1388]: warning: process /usr/lib/postfix/virtual pid 2408 exit status 1
Sep  4 11:42:23 shell postfix/master[1388]: warning: /usr/lib/postfix/virtual: bad command startup -- throttling
Sep  4 11:42:25 shell postfix/smtpd[2402]: NOQUEUE: reject_warning: RCPT from smtp20.orange.fr[80.12.242.27]: 450 4.1.7 <monadressesrc@baliston.com>: Sender address rejected: unverified address: Address verification in progress; <monadressesrc@baliston.com>: to=<postmaster@baliston.fr> proto=ESMTP helo=<smtp20.orange.fr>
Sep  4 11:42:25 shell postfix/smtpd[2402]: 4DFE9DB9FE: client=smtp20.orange.fr[80.12.242.27]
Sep  4 11:42:25 shell postfix/cleanup[2406]: 4DFE9DB9FE: message-id=<46DD287B.9060604@baliston.com>
Sep  4 11:42:25 shell postfix/qmgr[1390]: 4DFE9DB9FE: from=<monadressesrc@baliston.com>:, size=1021, nrcpt=1 (queue active)
Sep  4 11:42:25 shell postfix/smtpd[2402]: disconnect from smtp20.orange.fr[80.12.242.27]
Sep  4 11:42:25 shell spamd[1998]: spamd: connection from localhost.localdomain [127.0.0.1] at port 42269
Sep  4 11:42:25 shell spamd[1998]: spamd: processing message <46DD287B.9060604@baliston.com> for vmail:5000
Sep  4 11:42:29 shell spamd[1998]: spamd: clean message (0.0/5.0) for vmail:5000 in 3.8 seconds, 999 bytes.
Sep  4 11:42:29 shell spamd[1998]: spamd: result: . 0 - scantime=3.8,size=999,user=vmail,uid=5000,required_score=5.0,rhost=localhost.localdomain,raddr=127.0.0.1,rport=42269,mid=<46DD287B.9060604@baliston.com>,autolearn=ham
Sep  4 11:42:29 shell spamd[2357]: prefork: child states: II
Sep  4 11:42:29 shell postfix/sendmail[2410]: fatal: open /etc/postfix/main.cf: Permission denied
Sep  4 11:42:29 shell postfix/pipe[2409]: 4DFE9DB9FE: to=<postmaster@baliston.fr>, relay=spamassassin, delay=9.9, delays=6/0/0/3.9, dsn=4.3.0, status=deferred (temporary failure. Command output: sendmail: fatal: open /etc/postfix/main.cf: Permission denied )
Sep  4 11:42:29 shell postfix/smtp[2407]: 4C290DB9FD: to=<monadressesrc@baliston.com>:, relay=mail.baliston.com[213.251.149.245]:25, delay=10, delays=0.02/0/0.03/10, dsn=2.1.5, status=deliverable (250 2.1.5 Ok)
Sep  4 11:42:29 shell postfix/qmgr[1390]: 4C290DB9FD: removed

Enfin voila le résultat du stat :
root@shell  # stat /etc/postfix/main.cf
  File: `/etc/postfix/main.cf'
  Size: 2350            Blocks: 8          IO Block: 4096   fichier régulier
Device: 901h/2305d      Inode: 2960861     Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (  107/ postfix)
Access: 2007-09-04 11:45:25.000000000 +0200
Modify: 2007-09-04 09:50:09.000000000 +0200
Change: 2007-09-04 11:02:47.000000000 +0200

Hors ligne

#10 Le 04/09/2007, à 11:52

toniotonio

Re : [RESOLU] - Problème avec postfix

et le ls -la /etc/postfix/ ?


Tutoriaux Postfix sur www.starbridge.org/spip
Messagerie Dédiée, Relais Mail Antispam/Antivirus, Infogérance 24/7: http://www.eole-its.com

Hors ligne

#11 Le 04/09/2007, à 11:57

Uggy

Re : [RESOLU] - Problème avec postfix

bertrand.r a écrit :

root@shell  # stat /etc/postfix/main.cf
  File: `/etc/postfix/main.cf'
  Size: 2350            Blocks: 8          IO Block: 4096   fichier régulier
Device: 901h/2305d      Inode: 2960861     Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (  107/ postfix)
Access: 2007-09-04 11:45:25.000000000 +0200
Modify: 2007-09-04 09:50:09.000000000 +0200
Change: 2007-09-04 11:02:47.000000000 +0200

Chez moi ca donne:
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)

Hors ligne

#12 Le 04/09/2007, à 12:05

bertrand.r

Re : [RESOLU] - Problème avec postfix

ls -al /etc/postfix :

root@shell baliston-fc # ls -al /etc/postfix/
total 104
drw-rw----  3 root root     4096 2007-09-04 11:14 .
drwxr-xr-x 77 root root     4096 2007-09-04 11:14 ..
-rw-r--r--  1 root postfix   373 2007-09-03 19:31 dynamicmaps.cf
-rw-r--r--  1 root postfix  2350 2007-09-04 09:50 main.cf
-rw-r--r--  1 root postfix  1201 2007-09-03 21:08 main.cf.save
-rw-r--r--  1 root postfix  4117 2007-09-04 11:14 master.cf
-rw-r--r--  1 root postfix   168 2007-09-03 19:56 mysql-virtual_aliases.cf
-rw-r--r--  1 root postfix   163 2007-09-03 19:56 mysql-virtual_aliases_mailbox.cf
-rw-r--r--  1 root postfix   167 2007-09-03 19:55 mysql-virtual_domains.cf
-rw-r--r--  1 root postfix   232 2007-09-03 19:55 mysql-virtual_mailboxes.cf
-rw-r--r--  1 root postfix   128 2007-09-03 19:56 mysql-virtual_mailbox_limit_maps.cf
-rw-r--r--  1 root postfix 17975 2007-03-21 12:17 postfix-files
-rwxr-xr-x  1 root postfix  6840 2007-03-21 12:17 postfix-script
-rw-r--r--  1 root postfix 22239 2007-03-21 12:17 post-install
drw-r--r--  2 root postfix  4096 2007-09-03 20:50 sasl

J'ai tenté de remettre root partout ça change rien.

Hors ligne

#13 Le 04/09/2007, à 12:10

toniotonio

Re : [RESOLU] - Problème avec postfix

les droits sur /etc/postfix ne permettent pas le parcours du rep


Tutoriaux Postfix sur www.starbridge.org/spip
Messagerie Dédiée, Relais Mail Antispam/Antivirus, Infogérance 24/7: http://www.eole-its.com

Hors ligne

#14 Le 04/09/2007, à 12:15

toniotonio

Re : [RESOLU] - Problème avec postfix

chmod 755 /etc/postfix


et puis n'oublie pas d'enlever le droit en lecture pour tout le monde sur les lookup sql

Dernière modification par toniotonio (Le 04/09/2007, à 12:15)


Tutoriaux Postfix sur www.starbridge.org/spip
Messagerie Dédiée, Relais Mail Antispam/Antivirus, Infogérance 24/7: http://www.eole-its.com

Hors ligne

#15 Le 04/09/2007, à 12:17

bertrand.r

Re : [RESOLU] - Problème avec postfix

Merci l'ami c'était ça smile

Par contre tu pourrais me dire, tant qu'à faire, comment je peux sécuriser les fichiers et tout ça ? (Les droits quoi).

Hors ligne

#16 Le 04/09/2007, à 13:46

Uggy

Re : [RESOLU] - Problème avec postfix

[resolu] ?
Securiser les fichiers ? -> Tu peux chrooter Postfix...

Hors ligne

#17 Le 04/09/2007, à 13:50

bertrand.r

Re : [RESOLU] - Problème avec postfix

Eventuellement je ferai ça.

Hors ligne