Category Archives: mail

postfix

Postfix+Kaspersky
http://av5.com/journals-magazines-online/1/50/512
http://3nity.ru/viewtopic.php?f=20&t=4073&start=0

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

todo: evaluate the Horde Project

http://www.horde.org/
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.

postfix+ldap

LDAP-client:
/usr/ports/net/openldap23-client/

#———————–
# имя Windows-домена
ldapmap_search_base = dc=office, dc=company, dc=ru
# IP-адрес PDC
ldapmap_server_host = 192.168.16.1
# 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 = ldapquery@office.company.ru
ldapmap_bind_pw = LdaPassworD
ldapmap_cache = no
ldapmap_dereference = 0
ldapmap_domain = office.company.ru
ldapmap_debuglevel = 0
virtual_mailbox_maps = ldap:ldapmap
virtual_mailbox_domains = company.ru
#————

http://www.samag.ru/art/07.2005/07.2005_09.html

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

1)
> 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
2)
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.
3)
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
4)
all quotas (in /var/lib/imap/quota/%firstletter of username%/)will not be reconstructed, so it should be done manually.
5)
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.