OT: maildrop - quota, mailfilter
Lubomir Majersky
lumax at in.acompp.sk
Thu Jul 24 17:58:55 CEST 2008
Zdravim,
zasekol som sa pri kombinacii quota, mailfilter.
1. *Bez kvot*
authmysqlrc (vlastnik -> courier, prava -> 600)
***********
...
MYSQL_UID_FIELD '65500'
MYSQL_GID_FIELD '65500'
MYSQL_LOGIN_FIELD username
MYSQL_HOME_FIELD '/home/vmail'
MYSQL_NAME_FIELD name
MYSQL_MAILDIR_FIELD maildir
...
***************************************************************
.mailfilter (vlastnik -> vmail, prava -> 600)
***********
LOGNAME=tolower($LOGNAME)
### Kontrola existencie uzivatelskeho filtra
`/bin/test -r /home/vmail/.mailfilters/$LOGNAME`
if ( $RETURNCODE == 0 )
{
# Uzivatelsky filter existuje a dalej sa e-mail riadi podla jeho
pravidiel
logfile "/home/vmail/maillogs/$LOGNAME.log"
log "***** Aplikujem uzivatelske pravidla z
$HOME/.mailfilters/$LOGNAME *****"
include "/home/vmail/.mailfilters/$LOGNAME"
}
else
{
# Uzivatelsky filter neexistuje, takze sa e-mail doruci do schranky
logfile "/home/vmail/maillogs/$LOGNAME.log"
log "***** Bez dalsich uzivatelskych pravidiel *****"
to "$HOME/$DEFAULT"
}
***************************************************************
Dorucia sa maily do kazdej schranky ci existuje, alebo neexituje subor s
uzivatelskymi filtrami v "/home/vmail/.mailfilters/".
2. *S kvotami*
authmysqlrc (vlastnik -> courier, prava -> 600)
***********
...
MYSQL_UID_FIELD '65500'
MYSQL_GID_FIELD '65500'
MYSQL_LOGIN_FIELD username
MYSQL_HOME_FIELD '/home/vmail'
MYSQL_NAME_FIELD name
MYSQL_MAILDIR_FIELD CONCAT("/home/vmail/",maildir)
MYSQL_QUOTA_FIELD concat(quota,'S')
...
***************************************************************
.mailfilter (vlastnik -> vmail, prava -> 600)
***********
vid bod 1
main.cf
*******
...
virtual_transport = maildrop
...
maildrop_destination_recipient_limit = 1
virtual_gid_maps = static:65500
virtual_uid_maps = static:65500
virtual_minimum_uid = 65500
virtual_transport = maildrop
### Direktivy pre kvoty
virtual_create_maildirsize = yes
#####Direktiva nizsie - nasiel som zmienku o nej vo forach, ale nikde v
relevantnej dokumentacii
#####virtual_mailbox_extended = yes *Vie sa niekto vyjadrit aj k tomu?*
virtual_maildir_extended = yes
virtual_mailbox_limit_maps =
mysql:/usr/local/etc/postfix/hosting/mysql_virt_mailbox_limit.cf
virtual_mailbox_limit_override = yes
#####Direktiva nizsie ma opodstatnenie, ak je virtual_transport = virtual
#####virtual_maildir_limit_message = Prepacte, schranka...
virtual_overquota_bounce = yes
...
***************************************************************
E-maily sa dorucia len do tych schranok, pre ktore existuje uzivatelsky
filter v "/home/vmail/.mailfilters/". Ak uzivatelsky filter neexistuje,
objavi sa v logu hlaska: "status=deferred (temporary failure. Command
output: /usr/local/bin/maildrop: Unable to open mailbox.)"
Samozrejme, viem to poriesit tak, ze pre kazdu novovytvorenu schranku
vytvorim aj subor s uzivatelskymi filtrami, ale mne sa to nepaci uz len
z toho dovodu, ze neviem, kde mam chybu, ze neviem, preco nie je ten
e-mail doruceny, ak neexistuje uzivatelsky filter...
Nechcel som tu davat cele konfiguraky, ak bude nieco potreba, domailujem ;)
Nakopne niekto?
Dik
--
LuMaX
More information about the Users-l
mailing list