Serveur postfix en smtpd ne marche pas.

WRInaute accro
Bonjour

Mon serveur postfix fonctionne très bien en réception imap, mais pas en smtp ( envoi ).

Voici le fichiers main.cf , master.cf et logs.txt ( restreint au smtp ).

Où est l'erreur ?

Merci beaucoup de vos réponses.

Amicalement.



Code:
-----------------------------------------------------------------------------------------------------------

# /etc/postfix/main.cf
#
# 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)   (no)    (never) (100)
# ==========================================================================
smtp      inet  n       -       y       -       -       smtpd
#smtp      inet  n       -       y       -       1       postscreen
#smtpd     pass  -       -       y       -       -       smtpd
#dnsblog   unix  -       -       y       -       0       dnsblog
#tlsproxy  unix  -       -       y       -       0       tlsproxy
#submission inet n    -    y    -    -    smtpd
#  -o syslog_name=postfix/submission
#  -o smtpd_reject_unlisted_recipient=no
#  -o smtpd_helo_restrictions=$mua_helo_restrictions
#  -o smtpd_sender_restrictions=$mua_sender_restrictions
#  -o milter_macro_daemon_name=ORIGINATING
  -o smtpd_tls_security_level=may
  -o smtpd_sasl_auth_enable=yes
  -o smtpd_sasl_type=dovecot
  -o smtpd_sasl_path=private/auth
  -o smtpd_sasl_security_options=noanonymous
  -o smtpd_sasl_local_domain=$myhostname
  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
  -o smtpd_relay_restrictions=permit_sasl_authenticated,reject
  -o smtpd_sender_login_maps=hash:/etc/postfix/virtual
  -o smtpd_sender_restrictions=reject_sender_login_mismatch
  -o smtpd_recipient_restrictions=reject_non_fqdn_recipient,reject_unknown_recipient_domain,permit_sasl_authenticated,reject
#smtps     inet  n       -       y       -       -       smtpd
#  -o syslog_name=postfix/smtps
#  -o smtpd_tls_wrappermode=yes
#  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_sasl_type=dovecot
#  -o smtpd_sasl_path=private/auth
#  -o smtpd_sasl_security_options=noanonymous
#  -o smtpd_sasl_security_options=noanonymous
#  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#  -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 smtpd_sender_restrictions=reject_sender_login_mismatch
#  -o smtpd_recipient_restrictions=reject_non_fqdn_recipient,reject_unknown_recipient_domain,permit_sasl_authenticated,reject
#  -o milter_macro_daemon_name=ORIGINATING
#628       inet  n       -       y       -       -       qmqpd
pickup    unix  n       -       y       60      1       pickup
cleanup   unix  n       -       y       -       0       cleanup
qmgr      unix  n       -       n       300     1       qmgr
#qmgr     unix  n       -       n       300     1       oqmgr
tlsmgr    unix  -       -       y       1000?   1       tlsmgr
rewrite   unix  -       -       y       -       -       trivial-rewrite
bounce    unix  -       -       y       -       0       bounce
defer     unix  -       -       y       -       0       bounce
trace     unix  -       -       y       -       0       bounce
verify    unix  -       -       y       -       1       verify
flush     unix  n       -       y       1000?   0       flush
proxymap  unix  -       -       n       -       -       proxymap
proxywrite unix -       -       n       -       1       proxymap
smtp      unix  -       -       y       -       -       smtp
relay     unix  -       -       y       -       -       smtp
#       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq     unix  n       -       y       -       -       showq
error     unix  -       -       y       -       -       error
retry     unix  -       -       y       -       -       error
discard   unix  -       -       y       -       -       discard
local     unix  -       n       n       -       -       local
virtual   unix  -       n       n       -       -       virtual
lmtp      unix  -       -       y       -       -       lmtp
anvil     unix  -       -       y       -       1       anvil
scache    unix  -       -       y       -       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}

----------------------------------------------------------------------------------------------------------

# /etc/postfix/master.cf
#
# 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)   (no)    (never) (100)
# ==========================================================================
smtp      inet  n       -       y       -       -       smtpd
#smtp      inet  n       -       y       -       1       postscreen
#smtpd     pass  -       -       y       -       -       smtpd
#dnsblog   unix  -       -       y       -       0       dnsblog
#tlsproxy  unix  -       -       y       -       0       tlsproxy
#submission inet n    -    y    -    -    smtpd
#  -o syslog_name=postfix/submission
#  -o smtpd_reject_unlisted_recipient=no
#  -o smtpd_helo_restrictions=$mua_helo_restrictions
#  -o smtpd_sender_restrictions=$mua_sender_restrictions
#  -o milter_macro_daemon_name=ORIGINATING
  -o smtpd_tls_security_level=may
  -o smtpd_sasl_auth_enable=yes
  -o smtpd_sasl_type=dovecot
  -o smtpd_sasl_path=private/auth
  -o smtpd_sasl_security_options=noanonymous
  -o smtpd_sasl_local_domain=$myhostname
  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
  -o smtpd_relay_restrictions=permit_sasl_authenticated,reject
  -o smtpd_sender_login_maps=hash:/etc/postfix/virtual
  -o smtpd_sender_restrictions=reject_sender_login_mismatch
  -o smtpd_recipient_restrictions=reject_non_fqdn_recipient,reject_unknown_recipient_domain,permit_sasl_authenticated,reject
#smtps     inet  n       -       y       -       -       smtpd
#  -o syslog_name=postfix/smtps
#  -o smtpd_tls_wrappermode=yes
#  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_sasl_type=dovecot
#  -o smtpd_sasl_path=private/auth
#  -o smtpd_sasl_security_options=noanonymous
#  -o smtpd_sasl_security_options=noanonymous
#  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#  -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 smtpd_sender_restrictions=reject_sender_login_mismatch
#  -o smtpd_recipient_restrictions=reject_non_fqdn_recipient,reject_unknown_recipient_domain,permit_sasl_authenticated,reject
#  -o milter_macro_daemon_name=ORIGINATING
#628       inet  n       -       y       -       -       qmqpd
pickup    unix  n       -       y       60      1       pickup
cleanup   unix  n       -       y       -       0       cleanup
qmgr      unix  n       -       n       300     1       qmgr
#qmgr     unix  n       -       n       300     1       oqmgr
tlsmgr    unix  -       -       y       1000?   1       tlsmgr
rewrite   unix  -       -       y       -       -       trivial-rewrite
bounce    unix  -       -       y       -       0       bounce
defer     unix  -       -       y       -       0       bounce
trace     unix  -       -       y       -       0       bounce
verify    unix  -       -       y       -       1       verify
flush     unix  n       -       y       1000?   0       flush
proxymap  unix  -       -       n       -       -       proxymap
proxywrite unix -       -       n       -       1       proxymap
smtp      unix  -       -       y       -       -       smtp
relay     unix  -       -       y       -       -       smtp
#       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq     unix  n       -       y       -       -       showq
error     unix  -       -       y       -       -       error
retry     unix  -       -       y       -       -       error
discard   unix  -       -       y       -       -       discard
local     unix  -       n       n       -       -       local
virtual   unix  -       n       n       -       -       virtual
lmtp      unix  -       -       y       -       -       lmtp
anvil     unix  -       -       y       -       1       anvil
scache    unix  -       -       y       -       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}

--------------------------------------------------------------------------------------------------------------------

Sep  6 14:44:39 pronostics dovecot: auth-worker(2713): Debug: sql(webmaster@pronostics.courses,78.194.232.180,<TIEfQTN1ZINOwui0>): query: SELECT username AS user,password FROM mailbox WHERE username = 'webmaster@pronostics.courses' AND active='1'
Sep  6 14:44:39 pronostics dovecot: auth: Debug: client passdb out: OK#0111#011user=webmaster@pronostics.courses
Sep  6 14:44:39 pronostics dovecot: auth-worker(2713): Debug: sql(webmaster@pronostics.courses,78.194.232.180,<TIEfQTN1ZINOwui0>): SELECT maildir, 5000 AS uid, 5000 AS gid, CONCAT('dict:storage=',floor(quota/1000),' proxy::quota') as quota FROM mailbox WHERE username = 'webmaster@pronostics.courses' AND active='1'
Sep  6 14:44:39 pronostics dovecot: auth: Debug: master userdb out: USER#0113514826753#011webmaster@pronostics.courses#011maildir=webmaster@pronostics.courses/#011uid=5000#011gid=5000#011quota=dict:storage=10240 proxy::quota#011auth_token=27e07b04abd87c17d7325a9771ded517e2707fe9
Sep  6 14:44:39 pronostics dovecot: imap-login: Login: user=<webmaster@pronostics.courses>, method=PLAIN, rip=78.194.232.180, lip=54.37.65.148, mpid=4495, session=<TIEfQTN1ZINOwui0>
Sep  6 14:44:46 pronostics dovecot: imap(webmaster@pronostics.courses): Logged out in=169 out=1113
Sep  6 14:45:02 pronostics postfix/smtpd[4490]: connect from unknown[181.214.206.84]
Sep  6 14:45:05 pronostics dovecot: auth: Debug: client passdb out: CONT#0115#011VXNlcm5hbWU6
Sep  6 14:45:06 pronostics dovecot: auth: Debug: client passdb out: CONT#0115#011UGFzc3dvcmQ6

--------------------------------------------------------------------------------------------------------------------------
 
WRInaute accro
Perso, je te conseillerai de ne pas te faire ch**r avec ça !
A cette époque où la délivrabilité d'un mail est dur à garantir compte-tenu de la difficulté à rendre "clean" son serveur. Sans parler de la difficulté à remplir TOUS les critères techniques (DKIM, DNS reverse, etc...). Ne pas envoyer des mails qui iront tout droit dans les spams ou même qui n'arriveront jamais !
J'utilise mon compte gmail. Comme tu passes par GG bah tu profites de sa force et donc tes mails arrivent à destination. Biensur en partant du principe que ce n'est pas du mailing de masse ;)
Un peu de lecture :
https://kinsta.com/fr/base-de-connaissances/serveur-smtp-gratuit/

Tu peux envoyer 3 000 emails par mois mais si tu as besoin de plus, GG te proposes des alternatives.
 
WRInaute accro
Voili, voilou

C'est fait... longuement, douloureusement et dur, dur, je n'ai plus qu'à générer un certif. ssl avec Lets-Encrypt., et puis tout le toutim délicat autour du ssl.

C'est les hackers qui vont être content. ;)

Merci beaucoup de votre aide.

Amicalement.
 
WRInaute accro
A propos de Let'sEncrypt et certbot :

J'ai Debian 9 Stretch et un VPS SSD Classic 3 de OVH.

Le site certbot dit que le paquet python-certbot-nginx ne supporte plus le protocole TLS-SNI, et d'autre part il préconise d'installer la version "backports" des paquets.

Y aura-t-il longtemps avant que ces paquets "certbot" supportent en version release le protocole TLS-SNI ?

Le paquet est marqué "non urgent". ;(

Et puis surtout :

Est-il possible d'installer certbot sans python-certbot-nginx, de manière à ne pas utiliser l'authentification HTTP-1.0 ?

Actuellement j'ai pronostics.courses accessible sur le port 80.

Comment installer le certificat - assurer l'authentification du nom de domaine ?

Merci.
 
WRInaute accro
Rebonjour

Quels sous-domaines ( mail.* , smtp.* , pop.* etc... ) peuvent être spécifiés au moment de l'obtention du certificat ?
Est-ce nécessaire pour faire fonctionner postfix avec un certificat ssl ?

Voici l'obtention du certif. sans modification de la config nginx :

certbot certonly --webroot –w /var/www/html/ -d pronostics.courses –d www.pronostics.courses

Est-ce correct pour accéder au site en https ?

Merci beaucoup de vos réponses.

Amicalement.
 
WRInaute accro
Bonsoir

Voici le résultat de ''postconf -,n' :


Code:
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
compatibility_level = 2
home_mailbox = /var/mail/vmail/
inet_interfaces = all
inet_protocols = all
local_recipient_maps = $virtual_mailbox_maps
mailbox_command = /usr/bin/procmail -a "$EXTENSION"
mailbox_size_limit = 0
message_size_limit = 40720000
mydestination = $myhostname, localhost.$mydomain, localhost
mydomain = pronostics.courses
myhostname = mail.$mydomain
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = pronostics.courses
recipient_delimiter = +
relayhost =
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_tls_auth_only = no
smtpd_use_tls = no
virtual_alias_domains =
virtual_alias_maps = proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_maps.cf proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_domain_maps.cf proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_domain_catchall_maps.cf
virtual_gid_maps = static:5000
virtual_mailbox_base = /var/mail/vmail
virtual_mailbox_domains = proxy:mysql:/etc/postfix/sql/mysql_virtual_domains_maps.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/sql/mysql_virtual_mailbox_maps.cf proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_domain_mailbox_maps.cf
virtual_uid_maps = static:5000


Dans ces conditions, quel sera le domaine à spécifier pour le certificat Let'sEncrypt ?

Théoriquement le nom de domaine du serveur SMTP,

Est-ce : $mydomain, ou $myhostname ?

Merci beaucoup de votre aide.

Respectueusement.
 
WRInaute accro
Bof...

D'après Alsacreation, semblerait que ce soit $myhostname ( mail.pronostics.courses dans mon cas ).

Donc, pour Let'sEncrypt :

certbot certonly --webroot –w /var/www/html/ -d pronostics.courses –d www.pronostics.courses -d mail.pronostics.courses

Et vogue la galère...

Mais... Y a -t-il besoin que la version de certbot supporte le protocole SNI-TLS ?

Je suppose que non, puisque j'utilise le protocole HTTP-1.0 ?

Pas besoin de backport ?

Merci.
 
WRInaute accro
Mais tu as posé la question directement à la mailing de postfix et sur Debian FR ? Ça me semblerait bien plus à propos pour ce genre de questions...
 
Discussions similaires
Haut