View Full Version : when quota is zero means?
Rupert
26th February 2008, 19:19
Hi,
I installed a courier system after the following howto:
http://www.howtoforge.com/virtual-users-and-domains-postfix-courier-mysql-centos5.1
i have one user that has a quota of zero in the DB, does it generally mean that it is unlimited or should he get no mail at all?
thx
falko
27th February 2008, 13:45
He should not get any mails at all.
Rupert
27th February 2008, 13:55
ok, so how can I debug this?
Rupert
28th February 2008, 16:49
I just realized that we use maildrop for final delivery
should i get maildrop than to check the quota stuff?
this is our global maildroprc
# Ruta al /home/vmail/domains
VHOME="/home/vmail/"
# This extracts the username part from username at domain.tld
ACCOUNT=`echo "$LOGNAME" | cut -d@ -f1`
# This extracts the domain name from username at domain.tld
USERDOMAIN=`echo "$LOGNAME" | cut -d@ -f2`
# Path to the file where we will log the account creation.
VMAIL_LOGFILE="/home/vmail/maildrop-maildirmake.log"
# Path to maildirmake
MAILDIRMAKE=/usr/bin/maildirmake
# Let's check if /home/vmail/domain.tld/username exists
`test -d "$VHOME/$USERDOMAIN/$ACCOUNT"`
if( $RETURNCODE == 1 )
{
MESSAGE_DATE = `date`
# Log the creation date of this account in maildrop-maildirmake.log
`echo CREATION DATE: "$MESSAGE_DATE" >> $VMAIL_LOGFILE`
# Log the full path of the mailbox directory in maildrop-maildirmake.log
`echo EMAIL DIRECTORY: "$VHOME/$USERDOMAIN/$ACCOUNT" >> $VMAIL_LOGFILE`
# Log the username at domain.tld in maildrop-maildirmake.log
`echo USER EMAIL LOGIN: "$LOGNAME" >> $VMAIL_LOGFILE`
# Append a blanck line to maildrop-maildirmake.log
`echo " " >> $VMAIL_LOGFILE`
# Now check if the domain directory /home/vmail/dominio.tld exists.
`test -d "$VHOME/$USERDOMAIN"`
if( $RETURNCODE == 1 )
{
# Log the domain directory to maildrop-maildirmake.log
`echo CREATING DIRECTORY: "$VHOME/$USERDOMAIN" >> $VMAIL_LOGFILE`
# This creates the domain directory under /home/vmail/domains/
`mkdir -p "$VHOME/$USERDOMAIN"`
# Append a blanck line to maildrop-maildirmake.log
`echo " " >> $VMAIL_LOGFILE`
}
# Create the mailbox directory for the new account, this will be:
# /home/vmail/domains/domain.tld/username/
`$MAILDIRMAKE "$VHOME/$USERDOMAIN/$ACCOUNT"`
# Lets create the Sent directory for IMAP users
`$MAILDIRMAKE -f Sent "$VHOME/$USERDOMAIN/$ACCOUNT"`
# Suscribe the new Sent directory to the suscribed folders, only for courier-imap users.
`echo INBOX.Sent >> $VHOME/$USERDOMAIN/$ACCOUNT/courierimapsubscribed`
# Lets create the Thrash directory for IMAP users
`$MAILDIRMAKE -f Trash "$VHOME/$USERDOMAIN/$ACCOUNT"`
# Suscribe the new Trash directory to the suscribed folders, only for courier-imap users.
`echo INBOX.Trash >> $VHOME/$USERDOMAIN/$ACCOUNT/courierimapsubscribed`
# Create the curierimapuiddb directory under the user maildir
`touch $VHOME/$USERDOMAIN/$ACCOUNT/courierimapuiddb`
# Create the courierimapkeywords file under the user maildir
`mkdir -p "$VHOME/$USERDOMAIN/$ACCOUNT/courierimapkeywords"`
}
# GLOBAL VARIABLES
# HOME=/home/vmail/dominios
# LOGNAME=username at dominio.tld
# DEFAULT=dominio.tld/username/
# Log everything to this file
logfile "/home/vmail/maildrop.log"
# LOG BEGING OF FILTERING
log "==== BEGIN maildrop processing for $LOGNAME ==="
exception {
log "Including $HOME/$DEFAULT.mailfilter"
include "$HOME/$DEFAULT.mailfilter"
}
##
# move spam to spamfolder
##
SPAMFLD=$DEFAULT/.Junk/
SUBSCRIPT=$DEFAULT/courierimapsubscribed
# test idf Junk folder exists, if notr create one
# autosubscribe to the Junk folder
`test -d "$SPAMFLD"`
if( $RETURNCODE == 1 )
{
`maildirmake "$SPAMFLD"`
`echo INBOX.Junk >> $SUBSCRIPT`
}
## verschiebe die mail in den Junk Ordner, wenn Spam
if (/^X-Spam-Status: Yes,/)
{
exception {
to $SPAMFLD
}
}
thx
falko
28th February 2008, 20:11
The quota stuff should normally be handled by Postfix. Have you compared your configuration to the one from the tutorial? Maybe you made a typo somewhere.
Rupert
29th February 2008, 16:45
well i found out that postfix does not create the file maildirsize.
when i create that manually and put in the first line "5000S"
it works.
But it should get all that stuff from the DB, so how can i proceed?
these are the entries from my main.cf
#virtual_mailbox_extended = yes
virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailbox_limit_maps.cf
virtual_mailbox_limit_override = yes
virtual_maildir_limit_message = "The user you are trying to reach is over quota."
virtual_overquota_bounce = yes
virtual_mailbox_limit_inbox = yes
virtual_maildir_extended = yes
virtual_create_maildirsize = yes
virtual_maildir_suffix = Maildir/
EDIT: i took a log in the mysql_query logfile and it seems the query in mailbox_limit_maps does not get executed?
Why not`?
greetings
.r
falko
1st March 2008, 18:19
Please check all your configuration files again. Maybe you made a typo somewhere?
Rupert
3rd March 2008, 10:41
this is the output of postconf -n:
can there be an option somewhere else wrong?
All the other queries run fine
alias_maps = hash:/etc/aliases
biff = no
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
debug_peer_level = 1
html_directory = no
inet_interfaces = all
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
message_size_limit = 30720000
newaliases_path = /usr/bin/newaliases.postfix
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_can
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES
receive_override_options = no_address_mappings
sample_directory = /usr/share/doc/postfix-2.3.3/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtpd_client_restrictions = permit_sasl_authenticated,permit_mynetworks,reject
smtpd_hard_error_limit = 1
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, reject_unlisted_recipient
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.key
smtpd_use_tls = yes
transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf, proxy:mysql:/etc/postfix/mysql-virtual_mailhosts.cf
unknown_local_recipient_reject_code = 550
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf
virtual_create_maildirsize = yes
virtual_gid_maps = static:5000
virtual_mailbox_base = /home/vmail
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_limit_maps = mysql:/etc/postfix/mysql-virtual_mailbox_limit_maps.cf
virtual_mailbox_limit_override = yes
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_maildir_limit_message = "The user you are trying to reach is over quota."
virtual_overquota_bounce = yes
virtual_transport = maildrop
virtual_uid_maps = static:5000
even the maildrop has the quota extension enabled
# maildrop -v
maildrop 2.0.4 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.
falko
4th March 2008, 19:45
Are there any errors in your mail log?
Rupert
5th March 2008, 09:59
havent seen any. I run for 2 weeks on degublogig, but never saw anything about that some queries couldnt be launched :(.
falko
6th March 2008, 19:21
Does postfix check show any output?
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.