Category Archives: mail



Postfix antispam
хорошая статья: “режем спам, дополнительные методы” Денис Назаров
N2(27) 2005 Системный администратор

todo: evaluate the Horde Project
It’s just amazing web-mail solution at a first glance at least.
I wonder if it could be some kind of alternative to Microsoft Outlook, as it also contains calendar, contact manager and some other stuff as well.
I really should try to install it.



# имя Windows-домена
ldapmap_search_base = dc=office, dc=company, dc=ru
# IP-адрес PDC
ldapmap_server_host =
# LDAP-порт
ldapmap_server_port = 3268
ldap_timeout = 60
ldapmap_query_filter = (&(proxyAddresses=smtp:%s)(|(objectClass=user)(objectClass=group)(objectClass=contact)))
ldapmap_result_filter = %s
ldapmap_result_attribute = canonicalName
ldapmap_special_result_attribute =
ldapmap_scope = sub
ldapmap_bind = yes
ldapmap_bind_dn =
ldapmap_bind_pw = LdaPassworD
ldapmap_cache = no
ldapmap_dereference = 0
ldapmap_domain =
ldapmap_debuglevel = 0
virtual_mailbox_maps = ldap:ldapmap
virtual_mailbox_domains =

cyrus management

su -l cyrus -c “/usr/lib/cyrus-imapd/ipurge -f -b 0 user.tmp” // cleaning mailbox
su -l cyrus -c ‘/usr/lib/cyrus-imapd/reconstruct -r user.tmp’ // mailbox recovery

cyradm –user cyrus –auth login localhost
…> dm user.tmp
deletemailbox: Permission denied
…> sam user.tmp cyrus c // here we set permission on mailbox user.tmp to user cyrus

su -l cyrus -c ‘/usr/cyrus/bin/ctl_cyrusdb -rx’ // db recovery attempt
su -l cyrus -c ‘/usr/cyrus/bin/ctl_cyrusdb -r’ // db recreation
su -l cyrus -c ‘/usr/cyrus/bin/ctl_mboxlist -d’ > /usr/cyrus/bin/dump // creating dump
su -l cyrus -c ‘/usr/cyrus/bin/ctl_mboxlist -u < /usr/cyrus/bin/dump’ // db recovery from dump
su -l cyrus -c ‘/usr/cyrus/bin/reconstruct -r user’ // reindexing

> to make a dump of all mailboxes to the text file:
su – cyrus -c “ctl_mboxlist -d” > /var/lib/imap/mailboxlist.txt
> to restore it:
su – cyrus -c “ctl_mboxlist -u” < /var/lib/imap/mailboxlist.txt
to make a regular backups /var/spool/imap/ and /var/lib/imap/, without stopping cyrus,
in this case there’s a danger of some data inconsistency and maybe some e-mails lost.
In case of disaster just copy mail directly from the backup to the mail store directory (/var/spool/imap/user/%username%),
And run:
/usr/lib/cyrus/bin/reconstruct -rf user/username
all quotas (in /var/lib/imap/quota/%firstletter of username%/)will not be reconstructed, so it should be done manually.
all subscription and seen info (in /var/lib/imap/user/%firstletter of username%/) will not be reconstructed, but it can be restored from the regular backup.