Erinevus lehekülje "Cyrus kasutamine Gentooga" redaktsioonide vahel
59. rida: | 59. rida: | ||
installime vajaliku tarkvara | installime vajaliku tarkvara | ||
+ | emerge cyrus | ||
emerge pam_mysql | emerge pam_mysql | ||
− | |||
− | |||
emerge cyrus-imap-admin | emerge cyrus-imap-admin | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
rc-update add cyrus default | rc-update add cyrus default | ||
rc-update add postfix default | rc-update add postfix default | ||
+ | rc-update add saslauthd default | ||
+ | |||
installime openmailadmini | installime openmailadmini | ||
156. rida: | 148. rida: | ||
lmtp_overquota_perm_failure: no | lmtp_overquota_perm_failure: no | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
278. rida: | 260. rida: | ||
1 LOGIN cyrus parool | 1 LOGIN cyrus parool | ||
1 OK User logged in | 1 OK User logged in | ||
+ | |||
+ | |||
+ | ===Openmailadmin=== | ||
+ | |||
+ | paigaldame php ja apache | ||
+ | |||
+ | emerge php | ||
+ | emerge dev-php/PEAR-Log | ||
+ | emerge dev-php/adodb |
Redaktsioon: 15. september 2007, kell 14:00
Cyrus IMAP is named after Cyrus the Great (559 - 530 BC), founder of the Persian kingdom, and King of the World. Cyrus the great is remembered for his tolerance of the various minorities and generally benevolant leadership.
cyrus kasutab üsna maildir laadset formaati kuid lisanud sellele andmebaasi muutes nii kõike tunduvalt kiiremaks. Seetõttu on cyrus üsna hea valik väga suurte emaili süsteemide tarbeks. Netis väidetakse ,et ka meie kodumaine hot.ee http://www.hot.ee (The Hotmail of Estonia) kasutab cyrust ning sellel hetkel 300,000 users.
Cyruse poolt toetatud protokollid on
IMAP IMAPS POP3 POP3S KPOP LMTP
Server Features Multiple simultaneous operations on a single mailbox (concurrency) Per mailbox access control lists Storage quotas Private mailbox database
No /var/spool/mail No mail stored in user home directories
Shared mail folders
Any mail folder may be shared
Bulletin board folders Server side e-mail filtering SSL and TLS Multiple load balanced mail partitions IMAP server aggregation Exporting UseNet groups as IMAP folders
Paths /var/spool/imap /var/lib/imap /usr/libexec/cyrus This is the default mail partition, where the content of mailboxes are stored here unles you instruct the server otherwise. The configuration and operational data for the server exists here; including quota information, duplicate delivery database, mail box list, and TLS session attributes. Most of the Cyrus IMAP related binaries and scripts live here; including cyradm, deliver, reconstruct, etc...
installime vajaliku tarkvara
emerge cyrus emerge pam_mysql emerge cyrus-imap-admin
rc-update add cyrus default rc-update add postfix default rc-update add saslauthd default
installime openmailadmini
wget http://static.ossdl.de/openmailadmin/downloads/openmailadmin-0.10.1.tbz2 tar -xf openmailadmin-0.10.1.tbz2
Serveri siseseks administraatoriks on kasutaja Cyrus muudame cyruse parooli ja testime selle toimimist
saslpasswd2 -c cyrus cyradm -user cyrus -host 127.0.0.1
Kõik cyruse poolt starditavad teenused on kirjeldatud cyruse conf'is cyrus.conf.
Erinevate teenuste käivitamine sulgemine toimib siit.
Näitekonfis stardime imap, imaps, pop3 ja pop3s ning sieve teenused.
/etc/cyrus.conf
# Standard standalone server configuration. START { recover cmd="ctl_cyrusdb -r" } # UNIX sockets start with a slash and are put into /var/imap/socket. SERVICES { # Add or remove based on preferences. imap cmd="imapd" listen="imap2" prefork=5 pop3 cmd="pop3d" listen="pop3" prefork=25 maxchild=-1 pop3s cmd="pop3d -s" listen="pop3s" prefork=25 maxchild=-1 imaps cmd="imapd -s -U 30" listen="imaps" prefork=0 maxchild=100 sieve cmd="timsieved" listen="193.40.0.15:sieve" prefork=0 sievelocal cmd="timsieved" listen="127.0.0.1:sieve" prefork=0 lmtpunix cmd="lmtpd" listen="/var/imap/socket/lmtp" prefork=0 } EVENTS { checkpoint cmd="ctl_cyrusdb -c" period=30 delprune cmd="ctl_deliver -E 3" period=1440 tlsprune cmd="tls_prune" period=1440 }
Kõigi teenuste täpsemaks häälestamiseks on fail
/etc/imapd.conf
Sellest toimib kaustade paikamääramine. Sertifikaatide seadistamine. Imap, pop3, sieve täpsem häälestus jpm.
configdirectory: /var/imap partition-default: /mail/spool/imap tls_ca_path: /etc/imap tls_cert_file: /etc/imap/mail.crt tls_key_file: /etc/imap/mail.key postmaster: postmaster sievedir: /mail/sieve sieve_maxscriptsize: 64 sieve_maxscripts: 5 sendmail: /usr/sbin/sendmail admins: cyrus allowanonymouslogin: no allowplaintext: yes autocreatequota: 10000 reject8bit: no quotawarn: 90 timeout: 30 poptimeout: 10 allowapop: no popminpoll: 0 sasl_pwcheck_method: saslauthd sasl_mech_list: PLAIN lmtp_overquota_perm_failure: no
teeme postfixi konfi
main.cf
myhostname = domeen.ee mailbox_transport = cyrus virtual_alias_domains = mysql:/etc/postfix/mydestination.mysql virtual_alias_maps = mysql:/etc/postfix/virtual.mysql sender_canonical_maps = mysql:/etc/postfix/canonical.mysql
mydestination.mysql
hosts = localhost user = database password = parool dbname = mailedu table = domains select_field = domain where_field = domain
virtual.mysql
hosts = localhost user = baas password = parool dbname = mailedu table = virtual select_field = dest where_field = address additional_conditions = and active = '1'
canonical.mysql
hosts = host user = baas password = parool dbname = mailedu table = user select_field = canonical where_field = mbox additional_conditions = and active = '1' limit 1
testime toimimist
emerge net-misc/netkit-telnetd telnet 127.0.0.1 143
teeme imap pam konfiguratsiooni
nano /etc/pam.d/imap
#auth required pam_nologin.so #auth include system-auth #account include system-auth #session include system-auth auth sufficient pam_mysql.so user=mailedu passwd=parool host=localhost db=baas table=user usercolumn=mbox passwdcolumn=password crypt=1 sqlLog=0 account required pam_mysql.so user=mailedu passwd=parool host=localhost db=baas table=user usercolumn=mbox passwdcolumn=password crypt=1 sqlLog=0
ln /etc/pam.d/imap /etc/pam.d/pop ln /etc/pam.d/imap /etc/pam.d/sieve ln /etc/pam.d/imap /etc/pam.d/smtp ln /etc/pam.d/imap /etc/pam.d/nntp
mkdir /var/lib/amavis
cyruse halduse käsurida
Kõik cyruse sisesed tööd toimuvad cyradm utiliidi vahendusel
Nimekiri cyruse käskudest
cm Create mailbox dam Delete ACL on mailbox dm Delete mailbox exit Quit cyradm lam List ACLs on mailbox lm List mail boxes lq List quota information lqm List quota on mailbox lqr List quota on root renm Rename mailbox sam Set ACL on mailbox sq Set quota
Cyruses kasutajale mailboxi luues tuleb pidada meeles ,et see tuleb luua kujul user.kasutajanimi
näiteks user.mart
telnet 192.168.1.10 143 Trying 192.168.1.10... Connected to 192.168.1.10. Escape character is '^]'. * OK gentoo20070412 Cyrus IMAP4 v2.2.12-Gentoo server ready 1 LOGIN cyrus parool 1 OK User logged in
Openmailadmin
paigaldame php ja apache
emerge php emerge dev-php/PEAR-Log emerge dev-php/adodb