Debian-facile

Bienvenue sur Debian-Facile, site d'aide pour les nouveaux utilisateurs de Debian.

Vous n'êtes pas identifié(e).

#1 18-03-2016 14:27:12

fdf
Membre
Distrib. : Jessie
Noyau : Linux 3.16.0-4-amd64
(G)UI : Gnome 3.14
Inscription : 17-02-2016

Je ne reçois plus d'emails… Postfix??

Bonjour,

J'ai un petit serveur perso chez OVH qui me fait serveur d'email entre autre.

J'ai fait une réinstallation dernièrement et je finalise petit à petit.

Aujourd'hui je suis intervenu sur Postfix pour envoyer les emails directement sans passer par le relay de OVH.

Et plus rien… En fait pas tout à fait. Je me connecte sans problème à la boite en imap. Tout cela marche très bien.
Mais je ne reçois plus les emails. Bien sur, j'avais fais une copie avant de faire de gros changement dans la config, mais roll pas dès le début. du coup je suppose que c'est là que j'ai cassé quelque chose.

Enfin voici la config de postfix et de dovecot (je soupçonne la partie auth à cause des log mail.err)

 postconf -n



alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
disable_vrfy_command = yes
home_mailbox = Maildir/
html_directory = /usr/share/doc/postfix/html
inet_interfaces = all
inet_protocols = all
mailbox_size_limit = 0
mydestination = monserver.com, localhost, localhost.localdomain
mydomain = monserver.com
myhostname = $mydomain
mynetworks = 127.0.0.0/8, [::1]/128
myorigin = $mydomain
readme_directory = /usr/share/doc/postfix
recipient_delimiter = +
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP perso
smtpd_client_restrictions = permit_mynetworks, permit_sasl_authenticated, sleep 1, permit smtpd_helo_restrictions = reject_invalid_helo_hostname
smtpd_helo_required = yes
smtpd_sasl_auth_enable = yes
smtpd_sasl_path = private/auth
smtpd_sasl_type = dovecot
smtpd_sender_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_non_fqdn_sender,reject_unknown_sender_domain, permit
smtpd_tls_auth_only = yes
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
smtpd_use_tls = yes
 


 dovecot -n



# 2.1.7: /etc/dovecot/dovecot.conf
# OS: Linux 3.14.32-xxxx-grs-ipv6-64-vps x86_64 Debian 7.9
mail_location = maildir:~/Maildir
namespace inbox {
  inbox = yes
  location =
  mailbox Drafts {
    special_use = \Drafts
  }
  mailbox Junk {
    special_use = \Junk
  }
  mailbox Sent {
    special_use = \Sent
  }
  mailbox "Sent Messages" {
    special_use = \Sent
  }
  mailbox Trash {
    special_use = \Trash
  }
  prefix =
}
passdb {
  driver = pam
}
protocols = " imap pop3"
ssl_cert = </etc/dovecot/dovecot.pem
ssl_key = </etc/dovecot/private/dovecot.pem
userdb {
  driver = passwd
}



the log:

cat /var/log/mail.err


Mar 18 12:03:49 vpsxxxx postfix/smtpd[18457]: fatal: no SASL authentication mechanisms
Mar 18 12:04:51 vpsxxxx postfix/smtpd[18463]: fatal: no SASL authentication mechanisms
Mar 18 12:05:19 vpsxxxx postfix/smtpd[18464]: fatal: no SASL authentication mechanisms
Mar 18 12:08:02 vpsxxxx postfix/smtpd[18472]: fatal: no SASL authentication mechanisms
Mar 18 12:09:46 vpsxxxx postfix/smtpd[18529]: fatal: no SASL authentication mechanisms
Mar 18 12:12:32 vpsxxxx postfix/smtpd[18537]: fatal: no SASL authentication mechanisms
Mar 18 12:49:48 vpsxxxx postfix/smtpd[19362]: fatal: open /etc/postfix/main.cf: No such file or directory
Mar 18 12:50:50 vpsxxxx postfix/smtpd[19402]: fatal: no SASL authentication mechanisms
Mar 18 12:51:34 vpsxxxx postfix/smtpd[19399]: fatal: no SASL authentication mechanisms
Mar 18 12:52:36 vpsxxxx postfix/smtpd[19404]: fatal: no SASL authentication mechanisms
Mar 18 12:55:15 vpsxxxx postfix/smtpd[19424]: fatal: no SASL authentication mechanisms
Mar 18 12:57:18 vpsxxxx postfix/smtpd[19435]: fatal: no SASL authentication mechanisms
Mar 18 12:57:22 vpsxxxx postfix/smtpd[19448]: fatal: no SASL authentication mechanisms
Mar 18 13:00:33 vpsxxxx postfix/smtpd[19453]: fatal: no SASL authentication mechanisms
Mar 18 13:00:47 vpsxxxx postfix/smtpd[19455]: fatal: no SASL authentication mechanisms
Mar 18 13:02:17 vpsxxxx postfix/smtpd[19460]: fatal: no SASL authentication mechanisms
Mar 18 13:13:51 vpsxxxx postfix/smtpd[19507]: fatal: no SASL authentication mechanisms
Mar 18 13:15:33 vpsxxxx postfix/smtpd[19512]: fatal: no SASL authentication mechanisms
 



Votre aide serait la bien venue car je ne vois vraiment pas ce que j'ai pu casser.

Hors ligne

#2 14-04-2016 20:12:39

clonador
Membre
Distrib. : Proxmox VE 4.1 sur Debian 8.4
Noyau : Linux 4.2.8-1-pve
(G)UI : il n'y a pas
Inscription : 13-04-2016

Re : Je ne reçois plus d'emails… Postfix??

J'ai aussi un serveur personnel OVH
Suivez ce guide pour installer Postfix pour le integration avec ispconfig:
Debian 7: https://www.howtoforge.com/perfect-serv … r-binutils
Debian 8: https://www.howtoforge.com/tutorial/per … r-binutils

peut-être

aptitude purge postfix postfix-mysql postfix-doc
aptitude install postfix postfix-mysql postfix-doc



image.png

Il doit voire cet image dans la isntalation. Parfois, il est impossible, et postfix ne fonctionne pas. Il faut reinstall o purge et install.

Cela génère le fichier de configuration main.cf:

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

myhostname = "ici le domain du server complet"

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

alias_maps = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
alias_database = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
mydestination = dedicado100.ingobernables.club, localhost, localhost.localdomain
relayhost =
mynetworks = 127.0.0.0/8 [::1]/128
inet_interfaces = all
recipient_delimiter = +

readme_directory = /usr/share/doc/postfix
html_directory = /usr/share/doc/postfix/html
myorigin = /etc/mailname
virtual_alias_domains =
virtual_alias_maps = hash:/var/lib/mailman/data/virtual-mailman, proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, proxy:mysql:/etc/postfix/mysql-virtual_email2email.cf
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_mailbox_base = /var/vmail
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
inet_protocols = all
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_sasl_authenticated_header = yes
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, check_recipient_access mysql:/etc/postfix/mysql-virtual_recipient.cf
smtpd_use_tls = yes
smtpd_tls_security_level = may
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.key
transport_maps = hash:/var/lib/mailman/data/transport-mailman, proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
relay_domains = mysql:/etc/postfix/mysql-virtual_relaydomains.cf
relay_recipient_maps = mysql:/etc/postfix/mysql-virtual_relayrecipientmaps.cf
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks
smtpd_sender_restrictions = check_sender_access mysql:/etc/postfix/mysql-virtual_sender.cf
smtpd_client_restrictions = check_client_access mysql:/etc/postfix/mysql-virtual_client.cf
smtpd_client_message_rate_limit = 100
maildrop_destination_concurrency_limit = 1
maildrop_destination_recipient_limit = 1
virtual_transport = dovecot
header_checks = regexp:/etc/postfix/header_checks
mime_header_checks = regexp:/etc/postfix/mime_header_checks
nested_header_checks = regexp:/etc/postfix/nested_header_checks
body_checks = regexp:/etc/postfix/body_checks
owner_request_special = no
smtp_tls_security_level = may
smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3
smtpd_tls_protocols = !SSLv2,!SSLv3
smtp_tls_protocols = !SSLv2,!SSLv3
dovecot_destination_recipient_limit = 1
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
content_filter = amavis:[127.0.0.1]:10024
receive_override_options = no_address_mappings
mailbox_size_limit = 0
message_size_limit = 0
 




nano /etc/postfix/master.cf


[...]
submission inet n       -       -       -       -       smtpd
  -o syslog_name=postfix/submission
  -o smtpd_tls_security_level=encrypt
  -o smtpd_sasl_auth_enable=yes
  -o smtpd_client_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_client_restrictions=permit_sasl_authenticated,reject
#  -o milter_macro_daemon_name=ORIGINATING
[...]



Est-ce que quelqu'un sait s'il est possible d'empêcher la reinstallation?

Salut.

Dernière modification par clonador (14-04-2016 20:31:18)

Hors ligne

Pied de page des forums