[résolu]Problème de config postfix + domaine ovh

Bonjour, a tous,
je tente de configurer postfix pour recevoir les mails de sécurité sur mon mail perso, mais rien a faire les mails ne partent pas .j’ai autorisé l’utilisation du port smtp de ma free. Et je ne sais par où commencer. Peu être avez vous une idée?> Sep 10 18:17:27 debian postfix/master[1315]: warning: master_wakeup_timer_event: service qmgr(public/qmgr): No such file or directory

Sep 10 18:17:32 debian postfix/smtpd[30704]: fatal: open lock file pid/inet.smtp: cannot create file exclusively: No such file or directory
Sep 10 18:17:33 debian postfix/master[1315]: warning: process /usr/lib/postfix/smtpd pid 30704 exit status 1
Sep 10 18:17:33 debian postfix/master[1315]: warning: /usr/lib/postfix/smtpd: bad command startup – throttling
Sep 10 18:17:52 debian postfix/master[1315]: warning: master_wakeup_timer_event: service pickup(public/pickup): No such file or directory
Sep 10 18:18:14 debian postfix/postdrop[30736]: warning: unable to look up public/pickup: No such file or directory
Sep 10 18:18:33 debian postfix/smtpd[30738]: fatal: open lock file pid/inet.smtp: cannot create file exclusively: No such file or directory
Sep 10 18:18:34 debian postfix/master[1315]: warning: process /usr/lib/postfix/smtpd pid 30738 exit status 1
Sep 10 18:18:34 debian postfix/master[1315]: warning: /usr/lib/postfix/smtpd: bad command startup – throttling
Sep 10 18:18:52 debian postfix/master[1315]: warning: master_wakeup_timer_event: service pickup(public/pickup): No such file or directory

Il y a des pros qui sauront mieux te répondre mais il faudrait peut-être que tu montres ton fichier
~/aliases etc
http://lea-linux.org/documentations/Configurer_postfix_derrière_une_Box

Hello,

Il faudrait le master.cf, le main.cf pour commencer, ton postfix n’a pas l’air de démarrer.
Dans tes logs, il y a beaucoup de “no such file or directory”.
Ton instal est-elle chrootée ? Il semblerait que postfix ne retrouve pas ses petit. Ça pourrait venir d’un problème de droits ou de chemin.
Utilises-tu dovecot ou courier pour la réception ?
Comment gères-tu les utilisateurs : unix, base de données, ldap ?
Et “exit status 1” n’est jamais bon !

Bonjour,

J’ai bossé un peu dessus, j’ai beaucoup moins de messages d’erreurs. Je vous post ça dans la journée. Pour un mon installation n’est pas chrooté, j’utilise une base de données pour mes utilisateurs, et pour la réception c’est dovecot.

Merci beaucoup pour vos réponses.

bonjour,

je vous post mes fichiers:

main.cf:----------------------------------------------------------------------------------------------------

See /usr/share/postfix/main.cf.dist for a commented, more complete version

Debian specific: Specifying a file name will cause the first

line of that file to be used as the name. The Debian default

is /etc/mailname.

#myorigin = /etc/mailname
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no

appending .domain is the MUA’s job.

append_dot_mydomain = no

Uncomment the next line to generate “delayed mail” warnings

#delay_warning_time = 4h
readme_directory = no

TLS parameters

smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_use_tls = yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for

information on enabling SSL in the smtp client.

smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = debian
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = florianbouvet.fr, debian, localhost.localdomain, localhost
relayhost = smtp.free.fr
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_command = procmail -a "$EXTENSION"
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
#smtpd_sasl_local_domain =
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
#smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
#smtpd_tls_auth_only = no
smtp_use_tls = yes
smtp_tls_note_starttls_offer = yes
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
tls_random_source = dev:/dev/urandom
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
mtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
smtpd_tls_security_level = may
smtpd_tls_auth_only = yes
smtpd_recipient_restrictions = permit_mynetworks
permit_sasl_authenticated = reject_unauth_destination
virtual_transport = dovecot
dovecot_destination_recipient_limit = 1

master.conf: -------------------------------------------------------------------------------------------------

Postfix master process configuration file. For details on the format

of the file, see the master(5) manual page (command: “man 5 master” or

on-line: http://www.postfix.org/master.5.html).

Do not forget to execute “postfix reload” after editing this file.

==========================================================================

service type private unpriv chroot wakeup maxproc command + args

(yes) (yes) (yes) (never) (100)

==========================================================================

smtp inet n - - - - smtpd
#smtp inet n - - - 1 postscreen
#smtpd pass - - - - - smtpd
#dnsblog unix - - - - 0 dnsblog
#tlsproxy unix - - - - 0 tlsproxy
#submission inet n - - - - smtpd

-o syslog_name=postfix/submission

-o smtpd_tls_security_level=encrypt

-o smtpd_sasl_auth_enable=yes

-o smtpd_reject_unlisted_recipient=no

-o smtpd_client_restrictions=$mua_client_restrictions

-o smtpd_helo_restrictions=$mua_helo_restrictions

-o smtpd_sender_restrictions=$mua_sender_restrictions

-o smtpd_recipient_restrictions=

-o smtpd_relay_restrictions=permit_sasl_authenticated,reject

-o milter_macro_daemon_name=ORIGINATING

#smtps inet n - - - - smtpd

-o syslog_name=postfix/smtps

-o smtpd_tls_wrappermode=yes

-o smtpd_sasl_auth_enable=yes

-o smtpd_reject_unlisted_recipient=no

-o smtpd_client_restrictions=$mua_client_restrictions

-o smtpd_helo_restrictions=$mua_helo_restrictions

-o smtpd_sender_restrictions=$mua_sender_restrictions

-o smtpd_recipient_restrictions=

-o smtpd_relay_restrictions=permit_sasl_authenticated,reject

-o milter_macro_daemon_name=ORIGINATING

#628 inet n - - - - qmqpd
pickup unix n - - 60 1 pickup
cleanup unix n - - - 0 cleanup
qmgr unix n - n 300 1 qmgr
#qmgr unix n - n 300 1 oqmgr
tlsmgr unix - - - 1000? 1 tlsmgr
rewrite unix - - - - - 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
proxywrite unix - - n - 1 proxymap
smtp unix - - - - - smtp
relay unix - - - - - smtp

-o smtp_helo_timeout=5 -o smtp_connect_timeout=5

showq unix n - - - - showq
error unix - - - - - error
retry 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/bin/maildrop -d ${recipient}

====================================================================

Recent Cyrus versions can use the existing “lmtp” master.cf entry.

Specify in cyrus.conf:

lmtp cmd=“lmtpd -a” listen=“localhost:lmtp” proto=tcp4

Specify in main.cf one or more of the following:

mailbox_transport = lmtp:inet:localhost

virtual_transport = lmtp:inet:localhost

====================================================================

Cyrus 2.1.5 (Amos Gouaux)

Also specify in main.cf: cyrus_destination_recipient_limit=1

#cyrus unix - n n - - pipe

user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}

====================================================================

Old example of delivery via Cyrus.

#old-cyrus unix - n n - - pipe

flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user}

====================================================================

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 n - - pipe
flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
${nexthop} ${user}

dovecot unix - n n - - pipe
flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/dovecot-lda -f ${sender} -d ${recipient}

le retour de /var/log/mail.log: -----------------------------------------------------------------------------

Sep 11 12:20:17 debian postfix/master[1315]: warning: master_wakeup_timer_event: service pickup(public/pickup): No such file or directory
Sep 11 12:20:51 debian postfix/master[4992]: fatal: bind 0.0.0.0 port 25: Address already in use
Sep 11 12:20:54 debian postfix/smtpd[4993]: fatal: open lock file pid/inet.smtp: cannot create file exclusively: No such file or directory
Sep 11 12:20:55 debian postfix/master[1315]: warning: process /usr/lib/postfix/smtpd pid 4993 exit status 1
Sep 11 12:20:55 debian postfix/master[1315]: warning: /usr/lib/postfix/smtpd: bad command startup – throttling
Sep 11 12:21:10 debian postfix/postfix-script[5018]: fatal: the Postfix mail system is not running

en espérant que ce soit utile.

merci beaucousp à vous.

Hello,

Il y a pas mal d’erreurs dans le main.cf, et il y a aussi des options définies à la fois dans le main et dans le master. Dans ce cas, c’est le master qui gagne.
Mon conseil : définir les options générales dans le main.cf et les ports en écoute dans le master. Il est également possible de définir des options différentes pour chaque port en écoute dans le master mais c’est beaucoup plus complexe, et dans la plupart des scénarios courants la même politique de sécurité est définie pour tous les ports en écoute.

Donc il vaut mieux définir les options : smtpd_client_restrictions, smtpd_recipient_restrictions, smtpd_sender_restrictions dans le main.cf et commenter tout ce qui se rapporte à ces options dans le master.cf.

Voici mon main.cf :

smtpd_banner = exemple Mail System
biff = no
disable_vrfy_command = yes
smtpd_helo_required = yes
smtpd_reject_unlisted_sender = yes
smtpd_delay_reject = yes

# Pour empêcher telnet et openssl de fonctionner avec le serveur
strict_rfc821_envelopes = yes
unknown_address_reject_code  = 554
unknown_hostname_reject_code = 554
unknown_client_reject_code   = 554

# TLS parameters
smtpd_tls_cert_file=/etc/courier/imapd.pem
smtpd_tls_key_file=/etc/courier/imapd.pem
smtpd_use_tls=yes
smtp_use_tls=yes
smtpd_tls_session_cache_database = btree:/var/spool/postfix/var/lib/postfix/smtpd_scache
smtp_tls_session_cache_database = btree:/var/spool/postfix/var/lib/postfix/smtp_scache
smtpd_tls_auth_only = yes
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $mydomain
smtpd_sasl_path = smtpd
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_sasl_authenticated_header = yes
smtpd_tls_security_level = may
smtpd_tls_received_header = yes

# appending .domain is the MUA's job.
append_dot_mydomain = no
myhostname = mail.exemple.org
home_mailbox = Maildir/
myorigin = /etc/mailname
mydestination = mail.exemple.org, localhost.exemple.org, mail, localhost
relayhost =
mynetworks = 127.0.0.0/8, 192.168.1.0/24
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all

alias_maps = hash:/etc/aliases
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual_aliases.cf,mysql:/etc/postfix/mysql-virtual_aliases_comptes.cf
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual_domaines.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual_comptes.cf
message_size_limit = 20240000
virtual_mailbox_base = /var/spool/vmail/
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000

# adresses d'expedition
smtpd_sender_restrictions =
        permit_sasl_authenticated,
        warn_if_reject,
        reject_unverified_sender,
        reject_unlisted_sender,
        reject_unknown_sender_domain,
        reject_sender_login_mismatch,
        reject_unauth_pipelining,
        reject_non_fqdn_sender,
        reject_unauth_destination,
        reject_authenticated_sender_login_mismatch

# adresses de destination
smtpd_recipient_restrictions =
        permit_mynetworks,
        permit_sasl_authenticated,
        check_policy_service unix:private/policy-spf,
        reject_unauth_destination,
        reject_unknown_sender_domain,
        reject_unknown_recipient_domain

smtpd_client_restrictions =
        permit_mynetworks,
        permit_sasl_authenticated

content_filter = amavis:[127.0.0.1]:10024
milter_protocol = 2
milter_default_action = accept
smtpd_milters = unix:/spamass/spamass.sock
non_smtpd_milters = unix:/spamass/spamass.sock
milter_connect_macros = i j {daemon_name} v {if_name} _
smtpd_tls_mandatory_exclude_ciphers = aNULL, eNULL, EXPORT, DES, RC4, MD5, PSK, aECDH, EDH-DSS-DES-CBC3-SHA, EDH-RSA-DES-CDC3-SHA, KRB5-DE5, CBC3-SHA

Mon master.cf :

smtp      inet  n       -       y       -       -       smtpd
submission inet n       -       y       -       -       smtpd
  -o content_filter=
  -o receive_override_options=no_header_body_checks
#  -o smtpd_sender_restrictions=$mua_sender_restrictions
#  -o smtpd_relay_restrictions=permit_sasl_authenticated,reject
pickup    unix  n       -       -       60      1       pickup
cleanup   unix  n       -       -       -       0       cleanup
qmgr      unix  n       -       n       300     1       qmgr
tlsmgr    unix  -       -       -       1000?   1       tlsmgr
rewrite   unix  -       -       -       -       -       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
proxywrite unix -       -       n       -       1       proxymap
smtp      unix  -       -       -       -       -       smtp
relay     unix  -       -       -       -       -       smtp
showq     unix  n       -       -       -       -       showq
error     unix  -       -       -       -       -       error
retry     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
maildrop  unix  -       n       n       -       -       pipe
  flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
uucp      unix  -       n       n       -       -       pipe
  flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
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       n       -       -       pipe
  flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
  ${nexthop} ${user}

amavis      unix    -       -       y       -       2       smtp
        -o smtp_data_done_timeout=1200
        -o smtp_send_xforward_command=yes
        -o disable_dns_lookups=yes
        -o max_use=20
127.0.0.1:10025 inet    n       -       y       -       -       smtpd
        -o content_filter=
        -o local_recipient_maps=
        -o relay_recipient_maps=
        -o smtpd_restriction_classes=
        -o smtpd_delay_reject=no
#        -o smtpd_client_restrictions=permit_mynetworks,reject
        -o smtpd_helo_restrictions=
        -o smtpd_sender_restrictions=
#        -o smtpd_recipient_restrictions=permit_mynetworks,reject
        -o smtpd_data_restrictions=reject_unauth_pipelining
        -o smtpd_end_of_data_restrictions=
        -o mynetworks=127.0.0.0/8
        -o smtpd_error_sleep_time=0
        -o smtpd_soft_error_limit=1001
        -o smtpd_hard_error_limit=1000
        -o smtpd_client_connection_count_limit=0
        -o smtpd_client_connection_rate_limit=0
        -o receive_override_options=no_header_body_checks,no_unknown_recipient_checks
465     inet  n       -       y       -       -       smtpd
  -o syslog_name=postfix/smtps
  -o smtpd_tls_wrappermode=yes
  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
  -o content_filter=smtp-amavis:[127.0.0.1]:10026
smtps inet n - y - - smtpd
  -o smtpd_tls_wrappermode=yes
  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
spamassassin unix -     n       n       -       -       pipe
  user=debian-spamd argv=/usr/bin/spamc -f -e /usr/sbin/sendmail -oi -f ${sender} ${recipient}
policy-spf  unix  -       n       n       -       -       spawn
  user=nobody argv=/usr/bin/perl /usr/local/bin/postfix-policyd-spf-perl

Cette directive n’est pas utile si tu définies les options citées ci-dessus.

Là il faut le fqdn

Ici tu fait référence à un fichier dans lequel il faut également mettre le fqdn (ça ne se fera pas tout seul, et je ne sais pas si tu l’as fait)

Ici aussi tu dois avoir le fqdn, le hostname, localhost.tondomaine.tld et localhost

Si tu utilise le smtp de free en relayhost, ton serveur ne sera pas vu comme l’émetteur des mails (commande whois ton_fqdn)

pourquoi y mets-tu de l’IPV6 ? et ici tu peux définir ton LAN (ex = 192.168.0.0/24)

il manque le “s” :wink:

Pour le master.cf, difficile à dire car il faudrait que tu repost avec l’indentation (primordiale dans ce fichier !), attention également aux espaces en fin de ligne, postfix n’aime pas trop.
Pour ça avant le fichier tu mets les balises suivantes :

Enfin tu dois avoir un problème de droits dans /usr/lib/postfix/ car visiblement postfix ne peut y écrire.

Qui écoute déjà sur le port 25, as-tu lancé plusieurs instances de postfix, exim n’est-il pas en conflit avec postfix ?
Que renvoie :

netstat -anp | grep 25

Si ça peut aider, voici mon arborescence chrootée :

/var/spool/postfix/
├── active
├── bounce
├── corrupt
├── defer
│   ├── 1
│   ├── 6
│   └── 7
├── deferred
│   ├── 1
│   ├── 6
│   └── 7
├── dev
│   ├── log
│   ├── random
│   └── urandom
├── etc
│   ├── host.conf
│   ├── hosts
│   ├── localtime
│   ├── nsswitch.conf
│   ├── resolv.conf
│   ├── services
│   └── ssl
│       └── certs
│           └── ca-certificates.crt
├── flush
├── hold
├── incoming
├── lib
│   └── x86_64-linux-gnu
│       ├── libgcc_s.so.1
│       ├── libnss_compat-2.19.so
│       ├── libnss_compat.so.2 -> libnss_compat-2.19.so
│       ├── libnss_dns-2.19.so
│       ├── libnss_dns.so.2 -> libnss_dns-2.19.so
│       ├── libnss_files-2.19.so
│       ├── libnss_files.so.2 -> libnss_files-2.19.so
│       ├── libnss_hesiod-2.19.so
│       ├── libnss_hesiod.so.2 -> libnss_hesiod-2.19.so
│       ├── libnss_nis-2.19.so
│       ├── libnss_nisplus-2.19.so
│       ├── libnss_nisplus.so.2 -> libnss_nisplus-2.19.so
│       ├── libnss_nis.so.2 -> libnss_nis-2.19.so
│       ├── libresolv-2.19.so
│       └── libresolv.so.2 -> libresolv-2.19.so
├── maildrop
├── pid
│   ├── inet.127.0.0.1:10025
│   ├── inet.smtp
│   ├── inet.smtps
│   ├── master.pid
│   ├── unix.amavis
│   ├── unix.bounce
│   ├── unix.cleanup
│   ├── unix.defer
│   ├── unix.local
│   ├── unix.policy-spf
│   ├── unix.showq
│   ├── unix.smtp
│   └── unix.virtual
├── private
│   ├── amavis
│   ├── anvil
│   ├── bounce
│   ├── bsmtp
│   ├── defer
│   ├── discard
│   ├── error
│   ├── ifmail
│   ├── lmtp
│   ├── local
│   ├── maildrop
│   ├── mailman
│   ├── policy-spf
│   ├── proxymap
│   ├── proxywrite
│   ├── relay
│   ├── retry
│   ├── rewrite
│   ├── scache
│   ├── scalemail-backend
│   ├── smtp
│   ├── spamassassin
│   ├── tlsmgr
│   ├── trace
│   ├── uucp
│   ├── verify
│   └── virtual
├── public
│   ├── cleanup
│   ├── flush
│   ├── pickup
│   ├── qmgr
│   └── showq
├── saved
├── spamass
│   └── spamass.sock
├── trace
├── usr
│   └── lib
│       ├── sasl2
│       └── zoneinfo
│           └── localtime -> /etc/localtime
└── var
    ├── lib
    │   └── postfix -> /var/lib/postfix
    └── run
        ├── courier
        │   └── authdaemon -> /var/run/courier/authdaemon
        └── saslauthd
            ├── cache.flock
            ├── cache.mmap
            ├── mux
            ├── mux.accept
            └── saslauthd.pid

l’arborescence de /usr/lib/postfix :

/usr/lib/postfix/
├── anvil
├── bounce
├── cleanup
├── dict_mysql.so
├── dict_sqlite.so
├── dict_tcp.so
├── discard
├── dnsblog
├── error
├── flush
├── fsstone
├── lmtp -> smtp
├── local
├── main.cf
├── master
├── master.cf
├── oqmgr
├── pickup
├── pipe
├── postfix-files
├── postfix-script
├── postfix-wrapper
├── post-install
├── postmulti-script
├── postscreen
├── proxymap
├── qmgr
├── qmqpd
├── scache
├── showq
├── smtp
├── smtpd
├── spawn
├── tlsmgr
├── tlsproxy
├── trivial-rewrite
├── verify
└── virtual

les droits dans ce répertoire :

root@mail:/home/vincent# ls -l /usr/lib/postfix/
total 1308
-rwxr-xr-x 1 postfix postfix  18376 nov.   4  2014 anvil
-rwxr-xr-x 1 postfix postfix  51608 nov.   4  2014 bounce
-rwxr-xr-x 1 postfix postfix 118672 nov.   4  2014 cleanup
-rw-r--r-- 1 postfix postfix  18136 nov.   4  2014 dict_mysql.so
-rw-r--r-- 1 postfix postfix  14040 nov.   4  2014 dict_sqlite.so
-rw-r--r-- 1 postfix postfix   9944 nov.   4  2014 dict_tcp.so
-rwxr-xr-x 1 postfix postfix  10104 nov.   4  2014 discard
-rwxr-xr-x 1 postfix postfix  10184 nov.   4  2014 dnsblog
-rwxr-xr-x 1 postfix postfix  10104 nov.   4  2014 error
-rwxr-xr-x 1 postfix postfix  18376 nov.   4  2014 flush
-rwxr-xr-x 1 postfix postfix  10104 nov.   4  2014 fsstone
lrwxrwxrwx 1 postfix postfix      4 nov.   4  2014 lmtp -> smtp
-rwxr-xr-x 1 postfix postfix  59352 nov.   4  2014 local
-rwxr-xr-x 1 postfix postfix  26409 nov.   4  2014 main.cf
-rwxr-xr-x 1 postfix postfix  38864 nov.   4  2014 master
-rwxr-xr-x 1 postfix postfix   6068 nov.   4  2014 master.cf
-rwxr-xr-x 1 postfix postfix  55240 nov.   4  2014 oqmgr
-rwxr-xr-x 1 postfix postfix  14280 nov.   4  2014 pickup
-rwxr-xr-x 1 postfix postfix  22824 nov.   4  2014 pipe
-rwxr-xr-x 1 postfix postfix  20281 nov.   4  2014 postfix-files
-rwxr-xr-x 1 postfix postfix   8861 nov.   4  2014 postfix-script
-rwxr-xr-x 1 postfix postfix   6543 nov.   4  2014 postfix-wrapper
-rwxr-xr-x 1 postfix postfix  28047 nov.   4  2014 post-install
-rwxr-xr-x 1 postfix postfix   8419 nov.   4  2014 postmulti-script
-rwxr-xr-x 1 postfix postfix  67528 nov.   4  2014 postscreen
-rwxr-xr-x 1 postfix postfix  18376 nov.   4  2014 proxymap
-rwxr-xr-x 1 postfix postfix  67528 nov.   4  2014 qmgr
-rwxr-xr-x 1 postfix postfix  22472 nov.   4  2014 qmqpd
-rwxr-xr-x 1 postfix postfix  14280 nov.   4  2014 scache
-rwxr-xr-x 1 postfix postfix  14424 nov.   4  2014 showq
-rwxr-xr-x 1 postfix postfix 121472 nov.   4  2014 smtp
-rwxr-xr-x 1 postfix postfix 224064 nov.   4  2014 smtpd
-rwxr-xr-x 1 postfix postfix  14280 nov.   4  2014 spawn
-rwxr-xr-x 1 postfix postfix  22744 nov.   4  2014 tlsmgr
-rwxr-xr-x 1 postfix postfix  30664 nov.   4  2014 tlsproxy
-rwxr-xr-x 1 postfix postfix  27032 nov.   4  2014 trivial-rewrite
-rwxr-xr-x 1 postfix postfix  14280 nov.   4  2014 verify
-rwxr-xr-x 1 postfix postfix  22472 nov.   4  2014 virtual

Je ne pourrais t’aider beaucoup plus car pour ma part j’utilise courier et pas dovecot que je ne connais pas.

Bon courage, il va y avoir du taf pour que ça fonctionne !

Edit,
J’allais oublier que pour sasl, il faut paramétrer le démon saslauthd dans le fichier /etc/default/saslauthd ainsi que PAM !

et créer un fichier /etc/postfix/sasl/smtpd.conf dans lequel tu indiques comment interfacer sasl et mysql… Biensûr tu dois indiquer à postfix l’existence de ce fichier (voir mon main.cf)

Mais vu les problèmes que tu rencontres, commence déjà par travailler en clair sans TLS et sasl, quand postfix voudra bien démarrer tu t’y remettras :wink:

Merci vincentsan pour ta réponse, je me mets au boulot et je reviens aux nouvelles

Bonjour,

Désolé pour le délais, mais en ce moment l’emploi du temps est chargé.

Du coup je m’y suis remis, ça ne fonctionne toujours pas, il y a du mieux…

Pour reprendre en détails:

cloud@debian:~$ host -t MX florianbouvet.fr
florianbouvet.fr mail is handled by 1 smtp.florianbouvet.fr.
florianbouvet.fr mail is handled by 1 mail2.forianbouvet.fr.
florianbouvet.fr mail is handled by 1 redirect.ovh.net.
florianbouvet.fr mail is handled by 1 imap.florianbouvet.fr.

Mon /etc/hosts

127.0.0.1 localhost
127.0.1.1 debian.florianbouvet.fr debian

The following lines are desirable for IPv6 capable hosts

::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
f02::2 ip6-allrouters`

Mon /var/log/mail.log

root@debian:/home/cloud# tail -f /var/log/mail.log
Nov 14 16:51:38 debian dovecot: master: Dovecot v2.2.13 starting up for imap (core dumps disabled)
Nov 14 17:29:30 debian postfix/master[13338]: terminating on signal 15
Nov 14 17:29:31 debian postfix/master[13741]: daemon started – version 2.11.3, configuration /etc/postfix
Nov 14 17:29:55 debian dovecot: master: Warning: Killed with signal 15 (by pid=1 uid=0 code=kill)
Nov 14 17:29:55 debian dovecot: anvil: Warning: Killed with signal 15 (by pid=1 uid=0 code=kill)
Nov 14 17:29:55 debian dovecot: log: Warning: Killed with signal 15 (by pid=1 uid=0 code=kill)
Nov 14 17:29:55 debian dovecot: master: Dovecot v2.2.13 starting up for imap (core dumps disabled)
Nov 14 18:36:50 debian dovecot: auth: Fatal: No passdbs specified in configuration file. LOGIN mechanism needs one
Nov 14 18:36:50 debian dovecot: master: Error: service(auth): command startup failed, throttling for 2 secs
Nov 14 18:36:50 debian dovecot: imap-login: Disconnected: Auth process broken (disconnected before auth was ready, waited 0 secs): user=<>, rip=127.0.0.1, lip=127.0.0.1, secured, session=<8UfwSEZBTgB/AAAB>
Nov 14 19:44:27 debian postfix/smtpd[14081]: fatal: bad boolean configuration: smtpd_use_tls = yes smtpd_tls_auth_only=yes
Nov 14 19:44:28 debian postfix/master[13741]: warning: process /usr/lib/postfix/smtpd pid 14081 exit status 1
Nov 14 19:44:28 debian postfix/master[13741]: warning: /usr/lib/postfix/smtpd: bad command startup – throttling
Nov 14 19:45:28 debian postfix/smtpd[14082]: fatal: bad boolean configuration: smtpd_use_tls = yes smtpd_tls_auth_only=yes
Nov 14 19:45:29 debian postfix/master[13741]: warning: process /usr/lib/postfix/smtpd pid 14082 exit status 1
Nov 14 19:45:29 debian postfix/master[13741]: warning: /usr/lib/postfix/smtpd: bad command startup – throttling
Nov 14 19:46:29 debian postfix/smtpd[14092]: fatal: bad boolean configuration: smtpd_use_tls = yes smtpd_tls_auth_only=yes
Nov 14 19:46:30 debian postfix/master[13741]: warning: process /usr/lib/postfix/smtpd pid 14092 exit status 1
Nov 14 19:46:30 debian postfix/master[13741]: warning: /usr/lib/postfix/smtpd: bad command startup – throttling
Nov 14 19:47:30 debian postfix/smtpd[14099]: fatal: bad boolean configuration: smtpd_use_tls = yes smtpd_tls_auth_only=yes
Nov 14 19:47:31 debian postfix/master[13741]: warning: process /usr/lib/postfix/smtpd pid 14099 exit status 1
Nov 14 19:47:31 debian postfix/master[13741]: warning: /usr/lib/postfix/smtpd: bad command startup – throttling
Nov 14 19:48:31 debian postfix/smtpd[14102]: warning: connect #1 to subsystem private/proxymap: Connection refused
Nov 14 19:48:33 debian postfix/master[13741]: terminating on signal 15
Nov 14 19:48:34 debian postfix/master[14236]: daemon started – version 2.11.3, configuration /etc/postfix
Nov 14 19:48:41 debian dovecot: master: Warning: Killed with signal 15 (by pid=1 uid=0 code=kill)
Nov 14 19:48:41 debian dovecot: anvil: Warning: Killed with signal 15 (by pid=1 uid=0 code=kill)
Nov 14 19:48:41 debian dovecot: log: Warning: Killed with signal 15 (by pid=1 uid=0 code=kill)
Nov 14 19:48:41 debian dovecot: master: Dovecot v2.2.13 starting up for imap (core dumps disabled)
Nov 14 19:53:45 debian postfix/master[14236]: terminating on signal 15
Nov 14 19:53:45 debian postfix/master[14390]: daemon started – version 2.11.3, configuration /etc/postfix
Nov 14 19:53:50 debian dovecot: anvil: Warning: Killed with signal 15 (by pid=1 uid=0 code=kill)
Nov 14 19:53:50 debian dovecot: log: Warning: Killed with signal 15 (by pid=1 uid=0 code=kill)
Nov 14 19:53:50 debian dovecot: master: Warning: Killed with signal 15 (by pid=1 uid=0 code=kill)
Nov 14 19:53:50 debian dovecot: master: Dovecot v2.2.13 starting up for imap (core dumps disabled)
Nov 14 20:15:17 debian postfix/master[14390]: terminating on signal 15
Nov 14 20:15:39 debian dovecot: master: Warning: Killed with signal 15 (by pid=1 uid=0 code=kill)
Nov 14 20:15:39 debian dovecot: anvil: Warning: Killed with signal 15 (by pid=1 uid=0 code=kill)
Nov 14 20:15:39 debian dovecot: log: Warning: Killed with signal 15 (by pid=1 uid=0 code=kill)
Nov 14 20:15:50 debian postfix/master[14681]: daemon started – version 2.11.3, configuration /etc/postfix
Nov 14 20:15:59 debian dovecot: master: Dovecot v2.2.13 starting up for imap (core dumps disabled)
Nov 14 20:19:12 debian dovecot: master: Dovecot v2.2.13 starting up for imap (core dumps disabled)
Nov 14 20:19:17 debian postfix/master[1182]: daemon started – version 2.11.3, configuration /etc/postfix
Nov 14 20:38:00 debian dovecot: auth: Fatal: No passdbs specified in configuration file. LOGIN mechanism needs one
Nov 14 20:38:00 debian dovecot: master: Error: service(auth): command startup failed, throttling for 2 secs
Nov 14 20:38:00 debian dovecot: imap-login: Disconnected: Auth process broken (disconnected before auth was ready, waited 0 secs): user=<>, rip=127.0.0.1, lip=127.0.0.1, secured, session=<bY89+kdBsQB/AAAB>
Nov 14 20:44:47 debian dovecot: auth: Fatal: No passdbs specified in configuration file. LOGIN mechanism needs one
Nov 14 20:44:47 debian dovecot: master: Error: service(auth): command startup failed, throttling for 4 secs
Nov 14 20:44:47 debian dovecot: imap-login: Disconnected: Auth process broken (disconnected before auth was ready, waited 0 secs): user=<>, rip=185.35.63.148, lip=192.168.0.48, session=<zMiAEkhBGwC5Iz+U>

Mon main.cf

root@debian:/home/cloud# tail -f /etc/postfix/main.cf

SSL/TLS certificates

smtpd_tls_cert_file=/etc/ssl/certs/mail.crt
smtpd_tls_key_file=/etc/ssl/private/mail.key
smtpd_use_tls=yes smtpd_tls_auth_only=yes

~/Maildir directories

home_mailbox = Maildir/

SASL

smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes

Mon master.cf

/etc/postfix/master.cf

smtp inet n - - - - smtpd
-o smtpd_tls_security_level=encrypt
-o smtpd_sasl_auth_enable=yes
smtps inet n - - - - smtpd
-o syslog_name=postfix/smtps
-o smtpd_tls_wrappermode=yes
-o smtpd_sasl_auth_enable=yes
-o smtpd_client_restrictions=permit_sasl_authenticated,reject
-o milter_macro_daemon_name=ORIGINATING

Bonjour,

De nouveaux messages d’erreur ce matin dans mon log

root@debian:~# tail -f -n 50 /var/log/mail.log
Nov 14 20:38:00 debian dovecot: master: Error: service(auth): command startup failed, throttling for 2 secs
Nov 14 20:38:00 debian dovecot: imap-login: Disconnected: Auth process broken (disconnected before auth was ready, waited 0 secs): user=<>, rip=127.0.0.1, lip=127.0.0.1, secured, session=<bY89+kdBsQB/AAAB>
Nov 14 20:44:47 debian dovecot: auth: Fatal: No passdbs specified in configuration file. LOGIN mechanism needs one
Nov 14 20:44:47 debian dovecot: master: Error: service(auth): command startup failed, throttling for 4 secs
Nov 14 20:44:47 debian dovecot: imap-login: Disconnected: Auth process broken (disconnected before auth was ready, waited 0 secs): user=<>, rip=185.35.63.148, lip=192.168.0.48, session=<zMiAEkhBGwC5Iz+U>
Nov 14 21:24:58 debian postfix/master[1182]: terminating on signal 15
Nov 14 21:25:05 debian postfix/master[2303]: daemon started – version 2.11.3, configuration /etc/postfix
Nov 14 21:25:21 debian dovecot: master: Warning: Killed with signal 15 (by pid=1 uid=0 code=kill)
Nov 14 21:25:21 debian dovecot: anvil: Warning: Killed with signal 15 (by pid=1 uid=0 code=kill)
Nov 14 21:25:21 debian dovecot: log: Warning: Killed with signal 15 (by pid=1 uid=0 code=kill)
Nov 14 21:25:34 debian dovecot: master: Dovecot v2.2.13 starting up for imap (core dumps disabled)
Nov 15 01:44:35 debian dovecot: auth: Fatal: No passdbs specified in configuration file. LOGIN mechanism needs one
Nov 15 01:44:35 debian dovecot: master: Error: service(auth): command startup failed, throttling for 2 secs
Nov 15 01:44:35 debian dovecot: imap-login: Disconnected: Auth process broken (disconnected before auth was ready, waited 0 secs): user=<>, rip=139.162.251.231, lip=192.168.0.48, TLS handshaking, session=
Nov 15 01:44:35 debian dovecot: imap-login: Disconnected (disconnected before auth was ready, waited 0 secs): user=<>, rip=139.162.251.231, lip=192.168.0.48, TLS handshaking: SSL_accept() failed: error:1407609C:SSL routines:SSL23_GET_CLIENT_HELLO:http request, session=
Nov 15 01:44:37 debian dovecot: imap-login: Disconnected (disconnected before auth was ready, waited 0 secs): user=<>, rip=139.162.251.231, lip=192.168.0.48, TLS handshaking: SSL_accept() failed: error:14076102:SSL routines:SSL23_GET_CLIENT_HELLO:unsupported protocol, session=
Nov 15 01:44:37 debian dovecot: imap-login: Disconnected (disconnected before auth was ready, waited 0 secs): user=<>, rip=139.162.251.231, lip=192.168.0.48, TLS handshaking: SSL_accept() syscall failed: Connection reset by peer, session=
Nov 15 01:44:37 debian dovecot: auth: Fatal: No passdbs specified in configuration file. LOGIN mechanism needs one
Nov 15 01:44:37 debian dovecot: master: Error: service(auth): command startup failed, throttling for 4 secs
Nov 15 01:44:37 debian dovecot: imap-login: Disconnected: Auth process broken (disconnected before auth was ready, waited 0 secs): user=<>, rip=139.162.251.231, lip=192.168.0.48, TLS, session=
Nov 15 01:44:39 debian dovecot: imap-login: Disconnected (disconnected before auth was ready, waited 2 secs): user=<>, rip=139.162.251.231, lip=192.168.0.48, TLS, session=<8vPmQkxBkgCLovvn>
Nov 15 01:44:41 debian dovecot: auth: Fatal: No passdbs specified in configuration file. LOGIN mechanism needs one
Nov 15 01:44:41 debian dovecot: master: Error: service(auth): command startup failed, throttling for 8 secs
Nov 15 11:22:46 debian postfix/postfix-script[4221]: stopping the Postfix mail system
Nov 15 11:22:46 debian postfix/master[2303]: terminating on signal 15
Nov 15 12:40:45 debian postfix/postfix-script[4535]: starting the Postfix mail system
Nov 15 12:40:45 debian postfix/master[4537]: daemon started – version 2.11.3, configuration /etc/postfix
Nov 15 12:41:06 debian dovecot: master: Warning: Killed with signal 15 (by pid=1 uid=0 code=kill)
Nov 15 12:41:06 debian dovecot: anvil: Warning: Killed with signal 15 (by pid=1 uid=0 code=kill)
Nov 15 12:41:06 debian dovecot: log: Warning: Killed with signal 15 (by pid=1 uid=0 code=kill)
Nov 15 12:41:06 debian dovecot: master: Dovecot v2.2.13 starting up for imap (core dumps disabled)
Nov 15 12:46:37 debian postfix/postfix-script[4579]: fatal: the Postfix mail system is already running
Nov 15 12:58:54 debian dovecot: imap-login: Fatal: Can’t load private ssl_key: Key is for a different cert than ssl_cert
Nov 15 12:58:54 debian dovecot: master: Error: service(imap-login): command startup failed, throttling for 2 secs
Nov 15 14:57:00 debian dovecot: master: Warning: Killed with signal 15 (by pid=1 uid=0 code=kill)
Nov 15 14:57:00 debian dovecot: log: Warning: Killed with signal 15 (by pid=1 uid=0 code=kill)
Nov 15 14:57:01 debian dovecot: master: Dovecot v2.2.13 starting up for imap (core dumps disabled)
Nov 15 14:57:06 debian dovecot: master: Warning: Killed with signal 15 (by pid=1 uid=0 code=kill)
Nov 15 14:57:06 debian dovecot: anvil: Warning: Killed with signal 15 (by pid=1 uid=0 code=kill)
Nov 15 14:57:06 debian dovecot: log: Warning: Killed with signal 15 (by pid=1 uid=0 code=kill)
Nov 15 14:57:06 debian dovecot: master: Dovecot v2.2.13 starting up for imap (core dumps disabled)
Nov 15 14:57:09 debian dovecot: master: Warning: Killed with signal 15 (by pid=1 uid=0 code=kill)
Nov 15 14:57:09 debian dovecot: anvil: Warning: Killed with signal 15 (by pid=1 uid=0 code=kill)
Nov 15 14:57:09 debian dovecot: log: Warning: Killed with signal 15 (by pid=1 uid=0 code=kill)
Nov 15 14:57:09 debian dovecot: master: Dovecot v2.2.13 starting up for imap (core dumps disabled)
Nov 15 14:57:26 debian dovecot: master: Warning: Killed with signal 15 (by pid=1 uid=0 code=kill)
Nov 15 14:57:26 debian dovecot: anvil: Warning: Killed with signal 15 (by pid=1 uid=0 code=kill)
Nov 15 14:57:26 debian dovecot: log: Warning: Killed with signal 15 (by pid=1 uid=0 code=kill)
Nov 15 14:57:26 debian dovecot: master: Dovecot v2.2.13 starting up for imap (core dumps disabled)
Nov 15 15:02:53 debian dovecot: master: Fatal: Dovecot is already running with PID 5948 (read from /var/run/dovecot/master.pid)

Bonjour,

Je suis au taf j’ai peu de temps pour analyser tes logs mais la première chose qui me saute aux yeux est ton fichier host. La deuxième ligne est réservée aux serveurs en DHCP. Il faudrait qu’il ressemble à a :

127.0.0.1 localhost
#127.0.1.1 debian.florianbouvet.fr debian
@IP_V4 debian.florianbouvet.fr debian

As-tu pensé à renseigner le fichier /etc/mailname ?
Tes main et master semblent incomplets… il faudrait tout poster pour que quelqu’un puisse t’aider.

A +

oui il y a ça !

as-tu fait :
kill -9 5948

Merci pour vos réponses

J’ai repris tout depuis le debut en suivant ce conseil (vincentsan)

Mais vu les problèmes que tu rencontres, commence déjà par travailler en clair sans TLS et sasl, quand postfix voudra bien démarrer tu t'y remettras :wink:

Tout est OK, maintenant.

Merci à vous