Nie jesteś zalogowany.
Jeśli nie posiadasz konta, zarejestruj je już teraz! Pozwoli Ci ono w pełni korzystać z naszego serwisu. Spamerom dziękujemy!

Ogłoszenie

Prosimy o pomoc dla małej Julki — przekaż 1% podatku na Fundacji Dzieciom zdazyć z Pomocą.
Więcej informacji na dug.net.pl/pomagamy/.

#1  2013-05-23 22:56:58

  Alkifron - Użytkownik

Alkifron
Użytkownik
Zarejestrowany: 2012-04-22

Dovecot quota

Witam.

Nie rozumiem  jak działa obsługa quoty przez dovecot'a.
Przykładowa konfiguracja  z dokumentacji dovecota jest np. pod adresem:
http://wiki.dovecot.org/HowTo/DovecotLDAPostfixAdminMySQL?action=show&redirect=DovecotLDAPostfixAdminMySQL
Wszędzie jest wiele przykładów, ale nie znalazłem informacji jak działa ten mechanizm.

Powiedzmy że w bazie są użytkownicy, quota i domeny, skrzynki są w formacie Maildir na dysku.
Za każdym  razem jak przychodzi i wychodzi wiadomość dovectot musi robić update w bazie.
A jak zadziała ten mechanizm jak np. skopiuje wiadomości z jednej skrzynki do drugiej z palca?

Offline

 

#2  2013-05-23 23:31:12

  Jacekalex - Podobno człowiek...;)

Jacekalex
Podobno człowiek...;)
Skąd: /dev/urandom
Zarejestrowany: 2008-01-07

Re: Dovecot quota

Tutaj Quota działa:

Kod:

auth_debug = no
auth_debug_passwords = no
auth_username_chars = abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890.-_@
auth_mechanisms = plain login cram-md5 digest-md5
disable_plaintext_auth = yes
auth_default_realm = domena.tld
default_internal_user = vpopmail
default_login_user = vpopmail
auth_verbose = no
verbose_ssl = no
base_dir = /var/run/dovecot/
postmaster_address = postmaster@domena.tld

info_log_path = /var/log/dovecot/dovecot.log
listen = *
log_path = /var/log/dovecot/dovecot-mail.log
login_log_format_elements = pl
mail_debug = no
mail_location = maildir:/home/domains/%d/%n/.maildir
mail_privileged_group = vpopmail
mail_uid = 89
mail_gid = 89
 
first_valid_uid = 89
last_valid_uid = 89
 
first_valid_gid = 89
last_valid_gid = 89
passdb {
  args = /etc/dovecot/dovecot-sqlx.conf
  driver = sql
  }
userdb {
  args = /etc/dovecot/dovecot-sqlx.conf
  driver = sql
 }
 
plugin {
  quota_warning = storage=95%% /usr/local/bin/quota-warning.sh 95
  quota_warning2 = storage=80%% /usr/local/bin/quota-warning.sh 80
  quota = maildir:User quota
   
  quota_rule2 = Trash:storage=+10%%
  quota_rule3 = Spam:storage=+20%%
  
  sieve = ~/sieve/filtry.sieve
  sieve_dir = ~/sieve
  sieve_global_dir = /etc/dovecot/sieve
  sieve_extensions = +spamtest +spamtestplus +relational +comparator-i;ascii-numeric
  sieve_before = /etc/dovecot/sieve
  sieve_after = /etc/dovecot/aftersieve
  autocreate = Sent
  autocreate2 = Drafts
  autocreate3 = Archive
  autocreate4 = Junk
  autocreate5 = Trash
  autocreate6 = Spam
  autosubscribe = Sent
  autosubscribe2 = Drafts
  autosubscribe3 = Archive
  autosubscribe4 = Junk
  autosubscribe5 = Trash
  autosubscribe6 = Spam
}
protocols = imap lmtp sieve
service auth {
  unix_listener auth-master {
   mode = 0666
   group = vpopmail
    }
   unix_listener auth-userdb {
   mode = 0666
   group = vpopmail
  }
 unix_listener auth-client {
          path = /var/spool/postfix/private/auth
          mode = 0660
           user = postfix
           group = postfix
         }
       }
 
service auth-worker {
   user = vpopmail 
}
service imap-login {
  chroot = login
  client_limit = 32
  process_limit = 32
  process_min_avail = 2
  service_count = 1
}
service managesieve-login {
  chroot = login
  client_limit = 64
  process_limit = 64
  process_min_avail = 2
  service_count = 1
}
service pop3-login {
  chroot = login
  client_limit = 32
  process_limit = 6
  inet_listener pop3 {
  }
  process_limit = 32
  process_min_avail = 2
  service_count = 1
}
ssl_cert = </etc/ssl/dovecot/dovecot.pem
ssl_key = </etc/ssl/dovecot/dovecot.key
protocol imap {
  imap_max_line_length = 16k
  mail_plugins = quota autocreate imap_quota
    imap_logout_format = bytes=%i/%o
 imap_idle_notify_interval = 10 mins
  imap_id_log = imapd
}
service lmtp {
   unix_listener /var/spool/postfix/private/dovecot-lmtp {
   group = postfix
   mode = 0660
   user = postfix
 }
}
protocol pop3 {
  pop3_uidl_format = %08Xu%08Xv
  pop3_logout_format = top=%t/%p, retr=%r/%b, del=%d/%m, size=%s
  mail_plugins = quota
}
protocol lda {
    postmaster_address = postmaster@domena.tld
    hostname = domena.tld
    quota_full_tempfail = yes
    sendmail_path = /usr/sbin/sendmail
    rejection_subject = Rejected: %s
    rejection_reason = Your message to <%t> was automatically rejected:%n%r
    lda_original_recipient_header =
    mail_plugins = sieve quota autocreate  acl 
    auth_socket_path = /var/run/dovecot/auth-userdb
    info_log_path = /var/log/dovecot/lda-dovecot.log
    log_path = /var/log/dovecot/lda-dovecot.log
    lda_mailbox_autocreate = yes
    lda_mailbox_autosubscribe = yes
}
protocol lmtp {
    postmaster_address = postmaster@domena.tld
    hostname = domena.tld
    quota_full_tempfail = yes
    sendmail_path = /usr/sbin/sendmail
    rejection_subject = Rejected: %s
    rejection_reason = Your message to <%t> was automatically rejected:%n%r
    mail_plugins = sieve quota autocreate  acl 
    auth_socket_path = /var/run/dovecot/auth-userdb
    info_log_path = /var/log/dovecot/lmtp-dovecot.log
    log_path = /var/log/dovecot/lmtp-dovecot.log
    lda_mailbox_autocreate = yes
    lda_mailbox_autosubscribe = yes
}

Przy czym z Qmailem i Vpopmailem, cala quota opiera się o plik

Kod:

/partycja/domena.tld/user/.maildir/maildirsize

w szkrzynce imap, wypełnia ją vpopmail, dovecot honoruje.

Z Postfixem to działa, ale skrzynki były zakładane przez Vpopmaila.
Postfix u mnie doręcza pocztę poprzez dovecot-LMTP

W końcu sposób działania skrzynki iMAP jest opisany w RFC.

Ostatnio edytowany przez Jacekalex (2013-05-23 23:36:51)


W demokracji każdy naród ma taką władzę, na jaką zasługuje ;)
Si vis pacem  para bellum  ;)       |       Pozdrawiam :)

Offline

 

Stopka forum

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson
To nie jest tylko forum, to nasza mała ojczyzna ;-)

[ Generated in 0.006 seconds, 9 queries executed ]

Informacje debugowania

Time (s) Query
0.00010 SET CHARSET latin2
0.00004 SET NAMES latin2
0.00101 SELECT u.*, g.*, o.logged FROM punbb_users AS u INNER JOIN punbb_groups AS g ON u.group_id=g.g_id LEFT JOIN punbb_online AS o ON o.ident='18.191.178.16' WHERE u.id=1
0.00063 REPLACE INTO punbb_online (user_id, ident, logged) VALUES(1, '18.191.178.16', 1732961622)
0.00045 SELECT * FROM punbb_online WHERE logged<1732961322
0.00057 SELECT t.subject, t.closed, t.num_replies, t.sticky, f.id AS forum_id, f.forum_name, f.moderators, fp.post_replies, 0 FROM punbb_topics AS t INNER JOIN punbb_forums AS f ON f.id=t.forum_id LEFT JOIN punbb_forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id=3) WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.id=23581 AND t.moved_to IS NULL
0.00008 SELECT search_for, replace_with FROM punbb_censoring
0.00148 SELECT u.email, u.title, u.url, u.location, u.use_avatar, u.signature, u.email_setting, u.num_posts, u.registered, u.admin_note, p.id, p.poster AS username, p.poster_id, p.poster_ip, p.poster_email, p.message, p.hide_smilies, p.posted, p.edited, p.edited_by, g.g_id, g.g_user_title, o.user_id AS is_online FROM punbb_posts AS p INNER JOIN punbb_users AS u ON u.id=p.poster_id INNER JOIN punbb_groups AS g ON g.g_id=u.group_id LEFT JOIN punbb_online AS o ON (o.user_id=u.id AND o.user_id!=1 AND o.idle=0) WHERE p.topic_id=23581 ORDER BY p.id LIMIT 0,25
0.00075 UPDATE punbb_topics SET num_views=num_views+1 WHERE id=23581
Total query time: 0.00511 s