United States (change)
Shortcuts: Downloads Fedora Red Hat Network
Account Links: Cart Your Account Logout
All of the command provided are required to run locally. We recommend that you back-up any files that you will edit, before editing them. For example, us the cp (copy) command to save an instance of the file before you edit:
cp /etc/mail/sendmail.mc /etc/mail/sendmail.mc.bak
To begin, first run:
service saslauthd status service cyrus-imapd status service sendmail statusTo setup cyrus, leave /etc/imapd.conf as default from the RPM package. For /etc/cyrus.conf leave as default except for the following:
# UNIX sockets start with a slash and are put into /var/lib/imap/sockets
SERVICES {
# add or remove based on preferences
imap cmd="imapd" listen="imap" prefork=5
# imaps cmd="imapd -s" listen="imaps" prefork=1
pop3 cmd="pop3d" listen="pop3" prefork=3
# pop3s cmd="pop3d -s" listen="pop3s" prefork=1
# sieve cmd="timsieved" listen="sieve" prefork=0
# these are only necessary if receiving/exporting usenet via NNTP
# nntp cmd="nntpd" listen="nntp" prefork=3
# nntps cmd="nntpd -s" listen="nntps" prefork=1
# at least one LMTP is required for delivery
# lmtp cmd="lmtpd" listen="lmtp" prefork=0
lmtpunix cmd="lmtpd" listen="/var/lib/imap/socket/lmtp" prefork=1
# this is only necessary if using notifications
# notify cmd="notifyd" listen="/var/lib/imap/socket/notify" proto="udp" prefork=1
}
Note: You will need imap even if you are not planning on running an imap server.
Next, set the password for cyrus:
passwd cyrusSet the saslauthd password:
saslpasswd -c cyrussu to the cyrus user and execute:
/usr/lib/cyrus-imapd/mkimapAdd a user with both passwords:
useradd testuser saslpasswd -c testuserNow restart or start the services and turn them on to start at boot time:
service saslauthd restart service cyrus-imapd restart service sendmail restart service xinetd restart chkconfig saslauthd on chkconfig cyrus-imapd on chkconfig sendmail onYou might need to reboot to allow cyrus to take ownership of the port.
Login in as cyrus to cyrus-imap:
cyradm --user cyrus localhostYou can type help for more information. The prompt should also change:
localhost.localdomain> helpNow make the users mailbox. Note the "user." must come before the username:
localhost.localdomain> cm user.testuserYou can now exit:
localhost.localdomain> quitYou can now test the user:
telnet localhost 110 the login: user testuser pass test You should see: +OK Name is a valid mailbox +OK Mailbox locked and readyYou now have cyrus working correctly. The mail box should show up:
/var/spool/imap/t/user/You will now need to set Sendmail up to receive mail and send it to cyrus. Edit the configuration file /etc/mail/sendmail.mc and add this line to the bottom:
dnl MAILER(smtp)dnl dnl MAILER(procmail)dnl define(`confLOCAL_MAILER', `cyrus') MAILER(`cyrus')If you want Sendmail to be able to receive mail from other places then itself, change this line from:
DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnlto
dnl DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnlNext, execute:
# m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cfYou will then need to restart Sendmail:
service sendmail restartYou can test, by doing:
# mail testuser@localhost Subject: test test . #make sure you put the “.” at the end of the email.The mail should show up in: /var/spool/imap/t/user/testuser/ and you should be able to check it with any local POP3 client.