Account Links: Cart | Your Account | Logout

Skip to content

Red Hat Knowledgebase

Red Hat Knowledgebase Search:

Updated Within the Last:

New Solutions within the last day New Solutions within the last week New Solutions within the last month

Browse by topics:


Click to View a Topic
Red Hat Enterprise Linux > AS/ES/WS v. 3 > Issue <<  29 of 594 >>

Solution Tools:


Email a Solution Postcard Printer version Submit a comment on this answer Update notifications Request an answer Back

Article Reference

Article ID: 5254
Last update: 01-01-06
Issue:
How do you setup cyrus for POP3 to work with Sendmail with Red Hat Enterprise Linux 4?
Resolution:

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 status
To 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 cyrus 
Set the saslauthd password:
saslpasswd -c cyrus  
su to the cyrus user and execute:
/usr/lib/cyrus-imapd/mkimap  
Add a user with both passwords:
useradd testuser 
saslpasswd -c testuser 
Now 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 on 
You might need to reboot to allow cyrus to take ownership of the port.

Login in as cyrus to cyrus-imap:

cyradm --user cyrus localhost 
You can type help for more information. The prompt should also change:
localhost.localdomain> help 
Now make the users mailbox. Note the "user." must come before the username:
localhost.localdomain> cm user.testuser 
You can now exit:
localhost.localdomain> quit 
You 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 ready
You 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')dnl
to
dnl DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
Next, execute:
# m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf 
You will then need to restart Sendmail:
service sendmail restart 
You 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.


How well did this entry answer your question?


good wrong incomplete out of date
Red Hat Enterprise Linux > AS/ES/WS v. 3 > Issue <<   29  of  594  >>