Category Archives: internet

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

frox (+squid)

При установке мне не удалось настроить антивирусную проверку.
После проверки антивирусом, передаётся файл нулевого размера. (
Также не удалось использовать для антивирусной проверки havp стоящий перед squid – от него получаем 403.  Поэтому в squid.conf добавил, чтоб кэшировал:

acl Scan_FTP proto FTP
always_direct allow Scan_FTP

#Listen 127.0.0.1
#frox работать на этом адресе у меня не захотел, но это похоже просто такая фитча.=

——————— frox.conf ———————–
#указываем внутренний адрес
Listen 192.168.?.?

WorkingDir /var/spool/frox
DontChroot Yes

LogLevel 15
LogFile /var/log/squid/frox/frox.log

APConv yes

AllowNonASCII yes

CacheModule http
HTTPProxy 127.0.0.1:3128
MinCacheSize 5
CacheAll yes

ACL Allow * – * 21
———————————–

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.