Pages : 1
#1 Le 15/05/2016, à 21:15
- helje
[postfix-dovecot] No such file or directory
Bonjour,
J'essaye de monter un serveur de mail à la maison (postfix-mysql-dovecot-roundcube).
main.cf :
# 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 Welcome
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/server.crt
smtpd_tls_key_file = /etc/ssl/private/server.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.
relayhost =
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = domaine.com
alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf
myorigin = /etc/mailname
mydestination = localhost
mynetworks = 127.0.0.0/8, 192.168.2.0/24, 192.168.1.0/24
mailbox_size_limit = 5368709120
recipient_delimiter = +
inet_protocols = ipv4
inet_interfaces = all
queue_directory = /mail/postfix
home_mailbox = Maildir/
smtpd_sasl_authenticated_header = yes
smtpd_sasl_local_domain =
broken_sasl_auth_clients = yes
smtpd_sender_restrictions = reject_unknown_sender_domain
mailbox_command = /usr/lib/dovecot/dovecot-lda -f "$SENDER" -a "$RECIPIENT" -d "$USER"
smtp_use_tls = yes
smtpd_tls_received_header = yes
smtpd_tls_mandatory_protocols = SSLv3, TLSv1
smtpd_tls_mandatory_ciphers = medium
smtpd_tls_auth_only = yes
tls_random_source = dev:/dev/urandom
smtp_tls_security_level = may
smtpd_tls_security_level = may
smtp_tls_note_starttls_offer = yes
smtpd_tls_loglevel = 1
smtpd_tls_CAfile = /etc/ssl/certs/cacert.pem
virtual_uid_maps = static:150
virtual_gid_maps = static:8
virtual_mailbox_base = /mail/vmail
virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_mailbox_domains.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf
relay_domains = mysql:/etc/postfix/mysql_relay_domains.cf
relay_recipient_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf
virtual_transport = lmtp:unix:private/dovecot-lmtp
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
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
milter_default_action = accept
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_relay_restrictions=permit_sasl_authenticated,reject
-o milter_macro_daemon_name=ORIGINATING
smtps inet n - - - - smtpd
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
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
maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
dovecot unix - n n - - pipe
flags=DRhu user=vmail:mail argv=/usr/lib/dovecot/dovecot-lda -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}
J'ai configuré tous les fichiers nécessaires (pour mysql, etc) en suivant les tutos en ligne.
Je bloque sur un problème : la délivrance du courrier ne fonctionne pas avec dovecot. J'ai un courrier dans la file d'attente, lorsque j'essaye un flush, j'ai dans les logs :
May 15 22:12:46 mail postfix/qmgr[2374]: 719CE44008A: from=<jerome@domaine1.com>, size=2220, nrcpt=1 (queue active)
May 15 22:12:46 mail postfix/trivial-rewrite[2487]: warning: do not list domain domaine.com in BOTH virtual_mailbox_domains and relay_domains
May 15 22:12:46 mail postfix/lmtp[2488]: 719CE44008A: to=<helje@domaine.com>, relay=none, delay=4375, delays=4375/0.14/0/0, dsn=4.4.1, status=deferred (connect to domaine.com[private/dovecot-lmtp]: No such file or directory)
où domaine.com est mon domaine référencé pour le serveur de mail, domaine1.com est un autre domaine d'où vient le mail de l'extérieur.
Une idée ?
Hors ligne
#2 Le 22/05/2016, à 19:47
- LeoMajor
Re : [postfix-dovecot] No such file or directory
bonjour,
warning: do not list domain domaine.com in BOTH virtual_mailbox_domains and relay_domains
erreur fatale, contrairement au warning affiché
Ne pas déclarer domaine.com à la fois dans virtual_mailbox_domains et relay_domains
relay_recipients_maps surcharge relay_domains, et rend caduque relay_domains = domaine.com
Normalement, relay_recipients_maps est superflu en virtual_ .
deferred (connect to domaine.com[private/dovecot-lmtp]: No such file or directory)
socket unix indéfini
deferred est souvent un problème de transport. Postfix ne sait pas comment et où livrer untel domaine.
problème de configuration de l'agent de transport ou utilisé à contre-emploi.
pour domaine.com
soit
1/approche no virtual
mailbox_transport ou mailbox_command, ..., ou home_mailbox
ou
2/ approche virtual_
renseigner l'agent transport chocolat dans le master.cf
virtual_transport=chocolat ou "chocolat' est le nom donné dans le master.cf
-> il faut choisir 1 ou 2
_transport a le focus en priorité, vis à vis de _command, et home_mailbox est évalué tardivement.
mydestination = localhost
mydestination = si plusieurs domaines de courrier en virtual_ et ajouter relay_recipient_maps même si superflu.
Hors ligne
Pages : 1