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 19/04/2007, à 13:38

cube45

[Résolu]Postfix ne se lance pas au boot ni avec /etc/init.d/postfix

Bonjour tout le monde!
J'ai actuellement un problème avec postfix : il ne se lance pas au démarrage, ni avec/etc/init.d/postfix , voici le message d'erreur:

#/etc/init.d/postfix start
 * Starting Postfix Mail Transport Agent postfix
postfix/postfix-script: fatal: usage: postfix start (or stop, reload, abort, flush, check, set-permissions, upgrade-configuration)

mad
alors qu'avec postfix start, il se lance correcement...
Ma question est simple(même si je n'ai pas pu y répondre cool ), comment faire pour que postfix arrive à se lancer (sans erreurs de préférence)?

Je précise ma configuration:
DELL Dimension XPS R400 (vieux pc transformé en serveur)
Ubuntu feisty server (donc pas de serveur X)
connexion WIFI(je sais, ca sert à rien mais je suis fier d'avoir réussi à l'installer big_smile )
pour toute autre info, demandez-moi wink

Merci d'avance big_smile

Dernière modification par cube45 (Le 19/04/2007, à 15:16)

Hors ligne

#2 Le 19/04/2007, à 13:43

toniotonio

Re : [Résolu]Postfix ne se lance pas au boot ni avec /etc/init.d/postfix

c'est ton init.d/postfix qui n'est pas bon
poste le pour voir

Dernière modification par toniotonio (Le 19/04/2007, à 13:43)


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 19/04/2007, à 13:45

cube45

Re : [Résolu]Postfix ne se lance pas au boot ni avec /etc/init.d/postfix

Tout d'abord, merci de ta réponse aussi rapide cool
Voici mon fichier /etc/init.d/postfix

#!/bin/sh -e

# Start or stop Postfix
#
# LaMont Jones <lamont@debian.org>
# based on sendmail's init.d script

PATH=/bin:/usr/bin:/sbin:/usr/sbin
DAEMON=/usr/sbin/postfix
NAME=Postfix
TZ=
unset TZ

# Defaults - don't touch, edit /etc/default/postfix
SYNC_CHROOT="y"

test -f /etc/default/postfix && . /etc/default/postfix

test -x $DAEMON && test -f /etc/postfix/main.cf || exit 0

. /lib/lsb/init-functions
DISTRO=$(lsb_release -is 2>/dev/null || echo Debian)

running() {
    queue=$(postconf -h queue_directory 2>/dev/null || echo /var/spool/postfix)
    if [ -f ${queue}/pid/master.pid ]; then
    pid=$(sed 's/ //g' ${queue}/pid/master.pid)
    exe=$(ls -l /proc/$pid/exe 2>/dev/null | sed 's/.* //; s/.*\///')
    if [ "X$exe" = "Xmaster" ]; then
        echo y
    fi
    fi
}
case "$1" in
    start)
    log_daemon_msg "Starting Postfix Mail Transport Agent" postfix
    RUNNING=$(running)
    if [ -n "$RUNNING" ]; then
        log_end_msg 0
    else
        # see if anything is running chrooted.
        NEED_CHROOT=$(awk '/^[0-9a-z]/ && ($5 ~ "[-yY]") { print "y"; exit}' /etc/postfix/master.cf)

        if [ -n "$NEED_CHROOT" ] && [ -n "$SYNC_CHROOT" ]; then
        # Make sure that the chroot environment is set up correctly.
        oldumask=$(umask)
        umask 022
        cd $(postconf -h queue_directory)

        # if we're using unix:passwd.byname, then we need to add etc/passwd.
        local_maps=$(postconf -h local_recipient_maps)
        if [ "X$local_maps" != "X${local_maps#*unix:passwd.byname}" ]; then
            if [ "X$local_maps" = "X${local_maps#*proxy:unix:passwd.byname}" ]; then
            sed 's/^\([^:]*\):[^:]*/\1:x/' /etc/passwd > etc/passwd
            chmod a+r etc/passwd
            fi
        fi

        FILES="etc/localtime etc/services etc/resolv.conf etc/hosts \
            etc/nsswitch.conf etc/nss_mdns.config"
        for file in $FILES; do
            [ -d ${file%/*} ] || mkdir -p ${file%/*}
            if [ -f /${file} ]; then rm -f ${file} && cp /${file} ${file}; fi
            if [ -f  ${file} ]; then chmod a+rX ${file}; fi
        done
        rm -f usr/lib/zoneinfo/localtime
        mkdir -p usr/lib/zoneinfo
        ln -sf /etc/localtime usr/lib/zoneinfo/localtime
        rm -f lib/libnss_*so*
        tar cf - /lib/libnss_*so* 2>/dev/null |tar xf -
        umask $oldumask
        fi

        if start-stop-daemon --start --exec ${DAEMON} -- quiet-quick-start; then
        log_end_msg 0
        else
        log_end_msg 1
        fi
    fi
    ;;

    stop)
    RUNNING=$(running)
    log_daemon_msg "Stopping Postfix Mail Transport Agent" postfix
    if [ -n "$RUNNING" ]; then
        if ${DAEMON} quiet-stop; then
        log_end_msg 0
        else
        log_end_msg 1
        fi
    else
        log_end_msg 0
    fi
    ;;

    restart)
        $0 stop
        $0 start
    ;;
   
    force-reload|reload)
    log_action_begin_msg "Reloading Postfix configuration"
    if ${DAEMON} quiet-reload; then
        log_action_end_msg 0
    else
        log_action_end_msg 1
    fi
    ;;

    flush|check|abort)
    ${DAEMON} $1
    ;;

    *)
    log_action_msg "Usage: /etc/init.d/postfix {start|stop|restart|reload|flush|check|abort|force-reload}"
    exit 1
    ;;
esac

exit 0

Postfix a été installé via apt-get

Hors ligne

#4 Le 19/04/2007, à 13:56

toniotonio

Re : [Résolu]Postfix ne se lance pas au boot ni avec /etc/init.d/postfix

je l'ai survolé et je vois rien de bizarre comme ca...

ca donne quoi /etc/init.d/postfix check ?


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 19/04/2007, à 14:01

cube45

Re : [Résolu]Postfix ne se lance pas au boot ni avec /etc/init.d/postfix

/etc/init.d/postfix check ne renvoie aucune erreur hmm
(Pour une fois que j'espère qu'il y ait une erreur pour comprendre ce qu'il se passe sad )

Hors ligne

#6 Le 19/04/2007, à 14:03

toniotonio

Re : [Résolu]Postfix ne se lance pas au boot ni avec /etc/init.d/postfix

as tu modifié qques chose dans le init.d ?
poste le /etc/default/postfix

lance postfix start et poste les logs


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 19/04/2007, à 14:05

cube45

Re : [Résolu]Postfix ne se lance pas au boot ni avec /etc/init.d/postfix

je n'ai rien modifié dans le init.d
il n'existe pas de /etc/default/postfix (bonne nouvelle ?)
Dans syslog:

Apr 19 14:04:35 LTPG2 postfix/postfix-script: fatal: usage: postfix start (or stop, reload, abort, flush, check, set-permissions, upgrade-configuration)

lol

Hors ligne

#8 Le 19/04/2007, à 14:08

toniotonio

Re : [Résolu]Postfix ne se lance pas au boot ni avec /etc/init.d/postfix

tu disais qu'il se lancait correctmetn pourtant quand tu faisais postfix start ?

faudrait voir les logs de ce demarrage

sinon ote moi d'un doute: tu as bien parametré postfix apres l'install (main.cf et master.cf ) ?


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

#9 Le 19/04/2007, à 14:11

cube45

Re : [Résolu]Postfix ne se lance pas au boot ni avec /etc/init.d/postfix

Dans syslog

Apr 19 14:09:08 LTPG2 postfix/postfix-script: starting the Postfix mail system
Apr 19 14:09:08 LTPG2 postfix/master[5814]: daemon started -- version 2.3.8, configuration /etc/postfix

En fait, avant, j'avais la même config sur ce serveur (mais Breezy) et j'ai copié les fichiers de config de postfix.Je les ai remis sur le serveur après installation de postfix.

Hors ligne

#10 Le 19/04/2007, à 14:14

toniotonio

Re : [Résolu]Postfix ne se lance pas au boot ni avec /etc/init.d/postfix

et la un postfix check ca donne quoi ?


poste aussu un postconf -n et ton master.cf


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 19/04/2007, à 14:19

cube45

Re : [Résolu]Postfix ne se lance pas au boot ni avec /etc/init.d/postfix

Posfix check: idem(rien)
Postconf -n

alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
disable_vrfy_command = yes
inet_interfaces = all
mydestination = localhost, localhost.localdomain
mydomain = ***
myhostname = LTPG2
mynetworks = 192.168.0.5,127.0.0.1,localhost
relayhost =
smtp_sasl_security_options = noanonymous
smtp_tls_note_starttls_offer = yes
smtp_use_tls = yes
smtpd_banner = $myhostname ESMTP (Debian/GNU)
smtpd_client_restrictions = permit_mynetworks,reject_unknown_client
smtpd_helo_required = yes
smtpd_helo_restrictions = permit_mynetworks,reject_invalid_hostname
smtpd_recipient_restrictions = permit_mynetworks,  permit_sasl_authenticated,  reject_non_fqdn_hostname,  reject_non_fqdn_sender,  reject_non_fqdn_recipient,    reject_unauth_destination,  reject_unauth_pipelining,     reject_invalid_hostname,  reject_rbl_client opm.blitzed.org,  reject_rbl_client list.dsbl.org,  reject_rbl_client bl.spamcop.net,  reject_rbl_client sbl-xbl.spamhaus.org
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =
smtpd_sender_restrictions = permit_mynetworks,reject_unknown_sender_domain,reject_unknown_address,reject_maps_rbl
smtpd_tls_ask_ccert = yes
smtpd_tls_auth_only = yes
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.key
smtpd_tls_loglevel = 3
smtpd_tls_received_header = yes
smtpd_use_tls = yes
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 = /home/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

J'ai volontairement caché mydomain.
master.cf

#
# Postfix master process configuration file.  For details on the format
# of the file, see the Postfix master(5) manual page.
#
# ==========================================================================
# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (yes)   (never) (100)
# ==========================================================================
smtp      inet  n       -       n       -       -       smtpd
#submission inet n      -       -       -       -       smtpd
#    -o smtpd_etrn_restrictions=reject
#    -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#smtps    inet  n       -       n       -       -       smtpd
#  -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes
#submission inet n      -       -       -       -       smtpd
#  -o smtpd_etrn_restrictions=reject
#  -o smtpd_enforce_tls=yes -o smtpd_sasl_auth_enable=yes
#628      inet  n       -       -       -       -       qmqpd
pickup    fifo  n       -       -       60      1       pickup
cleanup   unix  n       -       n       -       0       cleanup
qmgr      fifo  n       -       -       300     1       qmgr
#qmgr     fifo  n       -       -       300     1       oqmgr
tlsmgr    unix  -       -       -       1000?   1       tlsmgr
rewrite   unix  -       -       n       -       -       trivial-rewrite
bounce    unix  -       -       -       -       0       bounce
defer     unix  -       -       -       -       0       bounce
trace     unix  -       -       -       -       0       bounce
verify    unix  -       -       -       -       1       verify
flush     unix  n       -       -       1000?   0       flush
proxymap  unix  -       -       n       -       -       proxymap
smtp      unix  -       -       n       -       -       smtp
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay     unix  -       -       -       -       -       smtp
    -o fallback_relay=
#       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq     unix  n       -       -       -       -       showq
error     unix  -       -       -       -       -       error
discard   unix  -       -       -       -       -       discard
local     unix  -       n       n       -       -       local
virtual   unix  -       n       n       -       -       virtual
lmtp      unix  -       -       -       -       -       lmtp
anvil     unix  -       -       -       -       1       anvil
scache      unix    -    -    -    -    1    scache
#
# ====================================================================
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# Many of the following services use the Postfix pipe(8) delivery
# agent.  See the pipe(8) man page for information about ${recipient}
# and other message envelope options.
# ====================================================================
#
# maildrop. See the Postfix MAILDROP_README file for details.
# Also specify in main.cf: maildrop_destination_recipient_limit=1
#
maildrop  unix  -       n       n       -       -       pipe
  flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
#
# See the Postfix UUCP_README file for configuration details.
#
uucp      unix  -       n       n       -       -       pipe
  flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
#
# Other external delivery methods.
#
ifmail    unix  -       n       n       -       -       pipe
  flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp     unix  -       n       n       -       -       pipe
  flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient
scalemail-backend unix    -    n    n    -    2    pipe
  flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
mailman   unix  -       -       n       -       -       pipe
  flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
  ${nexthop} ${user}
amavis unix - - - - 2 smtp
   -o smtp_data_done_timeout=1200
   -o smtp_send_xforward_command=yes

127.0.0.1:10025 inet n - - - - smtpd
   -o content_filter=
   -o local_recipient_maps=
   -o relay_recipient_maps=
   -o smtpd_restriction_classes=
   -o smtpd_client_restrictions=
   -o smtpd_helo_restrictions=
   -o smtpd_sender_restrictions=
   -o smtpd_recipient_restrictions=permit_mynetworks,reject
   -o mynetworks=127.0.0.0/8
   -o strict_rfc821_envelopes=yes
   -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks

    cyrus     unix     -     n     n     -     -     pipe flags=R user=cyrus argv=/usr/sbin/cyrdeliver -e -q -r $sender -m $extension $user

Hors ligne

#12 Le 19/04/2007, à 14:21

cube45

Re : [Résolu]Postfix ne se lance pas au boot ni avec /etc/init.d/postfix

Je vient de rebooter le serveur et je précise que j'ai le même message à l'arrêt du serveur.

Hors ligne

#13 Le 19/04/2007, à 14:25

toniotonio

Re : [Résolu]Postfix ne se lance pas au boot ni avec /etc/init.d/postfix

bizarre
t'as essaye une reinstall complete ?

Dernière modification par toniotonio (Le 19/04/2007, à 14:25)


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 19/04/2007, à 14:30

cube45

Re : [Résolu]Postfix ne se lance pas au boot ni avec /etc/init.d/postfix

ben, justement, je viens d'installer le serveur, ca fait deux jours que j'essaye de tout réinstaller correctement, le site fonctionne a peu près, la carte wifi aussi et le seul truc qui ne marche pas est postfix.Je ne vais quand même pas formatter jusqu'à avoir un ordi parfait(la derniere fois c'était ndiswrapper qui merdait).
Bref 3 formattages en 2 jours, c'est assez...

J'aimerais savoir si c'était grave s'il n'y avait pas de /etc/default/postfix ?(et si oui, que faut-il mettre dedans)

Dernière modification par cube45 (Le 19/04/2007, à 14:31)

Hors ligne

#15 Le 19/04/2007, à 14:32

toniotonio

Re : [Résolu]Postfix ne se lance pas au boot ni avec /etc/init.d/postfix

non a priori pas de /etc/default/postfix c'est normal

sinon pas la peine de formater !
tu sauvegardes ton repertoire /etc/postfix
tu fais un
aptitude purge postfix
aptitude install postfix

et tu vois ce que ca donne au demarrage par init.d  (donc avant de mettre ta config)


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

#16 Le 19/04/2007, à 14:39

cube45

Re : [Résolu]Postfix ne se lance pas au boot ni avec /etc/init.d/postfix

aptitude est en train de m'installer pleins de nouveaux paquets... on verra bien ce que ca donnera! (je te tiens au courant)

EDIT: Pour moi, réinstallation complète = formattage +réinstallation big_smile

Dernière modification par cube45 (Le 19/04/2007, à 14:40)

Hors ligne

#17 Le 19/04/2007, à 14:50

cube45

Re : [Résolu]Postfix ne se lance pas au boot ni avec /etc/init.d/postfix

Merci, ca marche sans ma configuration. big_smile
Je charge ma config , je redémarre et je te dis ça;)

Hors ligne

#18 Le 19/04/2007, à 14:52

cube45

Re : [Résolu]Postfix ne se lance pas au boot ni avec /etc/init.d/postfix

Mais avec ça bug hmm

Hors ligne

#19 Le 19/04/2007, à 14:56

toniotonio

Re : [Résolu]Postfix ne se lance pas au boot ni avec /etc/init.d/postfix

tu modifies quoi comme fichiers ?

Dernière modification par toniotonio (Le 19/04/2007, à 14:57)


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

#20 Le 19/04/2007, à 15:09

cube45

Re : [Résolu]Postfix ne se lance pas au boot ni avec /etc/init.d/postfix

Ca y est j'ai trouvé lol (enfin je crois roll )
En fait, je prenait tout le dossier et j' écrasait le dossier /etc/postfix.Mais dans ce dossier se trouvait le fichier postfix-script qui se retrouvait remplacé.
Et à priori, il n'aimait pas trop tongue

Merci pour ton aide, je mettrais ce sujet en résolu si après une batterie de tests, ça fonctionne wink

Hors ligne

#21 Le 19/04/2007, à 15:12

toniotonio

Re : [Résolu]Postfix ne se lance pas au boot ni avec /etc/init.d/postfix

ah oui tu y allais un peu fort !

bon l'essentiel c'est que ca marche


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

#22 Le 19/04/2007, à 15:15

cube45

Re : [Résolu]Postfix ne se lance pas au boot ni avec /etc/init.d/postfix

Après un reboot et 2 /etc/init.d/postfix restart, aucun problème cool
Merci beaucoup pour ton aide!

Hors ligne

#23 Le 19/04/2007, à 15:17

cube45

Re : [Résolu]Postfix ne se lance pas au boot ni avec /etc/init.d/postfix

Faut pas croire, mais je suis bourrin des fois, notamment pour les sauvegardes big_smile

Hors ligne

#24 Le 19/04/2007, à 15:19

matt29

Re : [Résolu]Postfix ne se lance pas au boot ni avec /etc/init.d/postfix

Bjr,
g 1 pti pb je sui en IUT R&T et je doi créer un serveur d'impression via CUPS. J'ai télécharger les drivers mai kan  je ve les installer avec la commande cupsaddsmb -v -a, j'ai un message "Connection to failed".
Pouvez-vous m'aider je sui vraiment en galère !!!

#25 Le 19/04/2007, à 15:21

cube45

Re : [Résolu]Postfix ne se lance pas au boot ni avec /etc/init.d/postfix

premièrement, relis bien les règles du forum, tu y apprendra qu'il ne faut pas écrire en language SMS
deuxièmement, aucun rapport avec ce sujet, postes-en un nouveau.

Hors ligne