Pages : 1
#1 Le 20/05/2008, à 12:29
- CaptainLoc
[Résolu] Postfix et Quota
Bonjour à tous,
Je suis vraiment embêté et j'ai cherché pendant des heures sur le forum sans trouver mon bonheur.
J'ai suivi des milliers (plus ou moins ) de tutos sur l'installation d'un serveur Mail complet.
J'ai installé via apt
postfix
libsasl2-2
sasl2-bin
libsasl2-modules
procmail
postfix-mysql
courier-base
courier-authdaemon
courier-authlib-mysql
courier-imap
courier-pop
Tout est configuré comme il faut. Le Imap, Pop, Smtp fonctionne bien.
Sauf que .... mes quotas ne fonctionne pas. J'ai donc installé maildrop car j'ai vu qu'il y avait pas mal de tuto, mais rien ne marche. Meme quand le quota est dépassé, je peux toujours recevoir et envoyer des mails.
postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = yes
biff = no
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
content_filter = amavis:[127.0.0.1]:10024
disable_vrfy_command = yes
html_directory = /usr/share/doc/postfix/html
inet_interfaces = all
inet_protocols = all
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
mydestination = nsit-dist, localhost.localdomain, localhost
mydomain = xxxxx.fr
myhostname = xxxxx.fr
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = /etc/mailname
readme_directory = /usr/share/doc/postfix
receive_override_options = no_address_mappings
recipient_delimiter = +
relayhost =
smtp_tls_note_starttls_offer = yes
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtp_use_tls = yes
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_client_restrictions = reject_unknown_client,
smtpd_helo_required = yes
smtpd_recipient_restrictions = reject_unauth_destination, reject_unknown_recipient_domain, reject_non_fqdn_recipient
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
smtpd_sasl_local_domain =
smtpd_sasl_security_options = noanonymous
smtpd_sender_restrictions = reject_unknown_sender_domain, warn_if_reject reject_unverified_sender
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_auth_only = no
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_tls_session_cache_timeout = 3600s
smtpd_use_tls = yes
tls_random_source = dev:/dev/urandom
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 = /var/spool/vmail/
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_transport = maildrop #rajouté pour le support de Maildrop
virtual_uid_maps = static:5000 #rajouté pour le support de Maildrop
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").
#
# 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
#submission inet n - - - - smtpd
# -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 smtpd_tls_wrappermode=yes
# -o smtpd_sasl_auth_enable=yes
# -o smtpd_client_restrictions=permit_sasl_authenticated,reject
# -o milter_macro_daemon_name=ORIGINATING
#628 inet n - - - - qmqpd
pickup fifo n - - 60 1 pickup
cleanup unix n - - - 0 cleanup
qmgr fifo n - n 300 1 qmgr
#qmgr fifo 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
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay unix - - - - - smtp
-o smtp_fallback_relay=
# -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}
#
# 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}
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
-o smtpd_bind_address=127.0.0.1
/etc/courier/authmysqlrc :
MYSQL_SERVER localhost
MYSQL_USERNAME postfix
MYSQL_PASSWORD pass
MYSQL_DATABASE postfix
MYSQL_USER_TABLE mailbox
MYSQL_CRYPT_PWFIELD password
# MYSQL_CLEAR_PWFIELD clear
MYSQL_UID_FIELD 5000
MYSQL_GID_FIELD 5000
MYSQL_LOGIN_FIELD email
MYSQL_HOME_FIELD "/var/spool/vmail/"
MYSQL_MAILDIR_FIELD CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/')
#Ligne à commenter
# MYSQL_NAME_FIELD name
MYSQL_QUOTA_FIELD quota
authtest user@mail.fr
Authentication succeeded.
Authenticated: user@domain (uid 5000, gid 5000)
Home Directory: /var/spool/vmail/
Maildir: domain/user
Quota: 500000S
Encrypted Password: $1$f0c070e0$Firy/0SZq53CCH6iPziCF1 (toto en clair :) !!)
Cleartext Password: (none)
Options: (none)
maildrop -V 7 -d user@domain
maildrop: authlib: groupid=5000
maildrop: authlib: userid=5000
maildrop: authlib: logname=user@domain, home=/var/spool/vmail/, mail=domain/user/
maildrop: Changing to /var/spool/vmail/
J'espère que cela vous suffit !
Autre petite info: j'ai installé Roundcube comme webmail. Et je souhaiterais que les quotas puissent apparaitre dans l'interface. Pour l'instant il m'affiche Illimité
Merci de votre aide !
Dernière modification par CaptainLoc (Le 21/05/2008, à 14:04)
Hors ligne
#2 Le 20/05/2008, à 12:42
- toniotonio
Re : [Résolu] Postfix et Quota
fais voir un ls -la d'un maildir
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 20/05/2008, à 14:32
- CaptainLoc
Re : [Résolu] Postfix et Quota
ls -la
total 52
drwx------ 11 vmail vmail 4096 2008-05-20 11:18 .
drwxrwxrwx 6 vmail vmail 4096 2008-05-20 10:25 ..
drwx------ 2 vmail vmail 4096 2008-05-20 10:34 courierimapkeywords
-rw-r--r-- 1 vmail vmail 53 2008-05-19 16:09 courierimapsubscribed
-rw-r--r-- 1 vmail vmail 183 2008-05-20 10:34 courierimapuiddb
drwx------ 2 vmail vmail 4096 2008-05-20 10:34 cur
drwx------ 6 vmail vmail 4096 2008-05-19 16:09 .Drafts
drwx------ 6 vmail vmail 4096 2008-05-19 16:09 .Junk
drwx------ 2 vmail vmail 4096 2008-05-20 11:10 new
drwx------ 6 vmail vmail 4096 2008-05-19 16:09 .Sent
drwx------ 2 vmail vmail 4096 2008-05-20 11:16 tmp
drwx------ 6 vmail vmail 4096 2008-05-19 16:09 .Trash
Hors ligne
#4 Le 20/05/2008, à 16:25
- toniotonio
Re : [Résolu] Postfix et Quota
maildrop -v
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 20/05/2008, à 17:48
- CaptainLoc
Re : [Résolu] Postfix et Quota
maildrop -v
maildrop 2.0.3 Copyright 1998-2005 Double Precision, Inc.
GDBM extensions enabled.
Courier Authentication Library extension enabled.
Maildir quota extension enabled.
This program is distributed under the terms of the GNU General Public
License. See COPYING for additional information.
Hors ligne
#6 Le 20/05/2008, à 23:34
- toniotonio
Re : [Résolu] Postfix et Quota
assure toi que tu es qu'un seul binaire de maildrop, et que le /usr/bin/maildrop est bien le bon :
/usr/bin/maildrop -v
/usr/bin/maildrop -V 7 -d user@domain
remplace la ligne maildrop du master.Cf par :
maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/bin/maildrop -w 90 -d ${user}@${nexthop} ${extension} ${recipient} ${user} ${nexthop} ${sender}
ajoute au main.cf:
maildrop_destination_recipient_limit = 1
puis postfix reload
reteste la livraison d'un mail et poste les logs
et verifie si un fichier .maildirsize est crée dans le maildir
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 21/05/2008, à 14:03
- CaptainLoc
Re : [Résolu] Postfix et Quota
Merci beaucoup ça fonctionne !
Une fois après avoir réactivé Maildrop, j'avais la même erreur que sur le topic suivant : http://forum.ubuntu-fr.org/viewtopic.php?id=163492
J'ai donc suivi la réponse de l'autre topic, donné les droits sur /var/run/courier/authdaemon et maintenant ça fonctionne!
Merci beaucoup.
Hors ligne
Pages : 1