Sendmail + cyrus + sasl + ipop3d + imapd on RH9.0

Source: Internet
Author: User
Tags imap
Sendmail + cyrus + sasl + ipop3d + imapd on RH9.0 -- Linux Enterprise Application-Linux server application information. For more information, see the following. The following content is collected through some online materials, which is absolutely successful. I have tested it many times (in fact, it is only three or four times)
This article assumes that you have installed the relevant suite and set up DNS. in this example, my DNS is mail.alian.com, the ip address is 172.16.10.1, and the account is test and alian. search for related methods in the Forum. It seems that the graphic DNS method of syd168 is relatively simple. To add, you 'd better change the hosts file of the client. (Note: I do not mean that other big brother's methods are not good. Please try it out .)
1. Install and start sendmail (all installer can be skipped)
Check whether sendmail is installed:
[Root @ mis010/] # rpm-qa | grep sendmail
Sendmail-8.12.8-4
If the above line appears, it indicates that it has been installed. If not, please
# Rpm-ivh sendmail-8.12.8-4.i386.rpm
Start sendmail
#/Etc/rc. d/init. d/sendmail start
Or
# Sendmail-bd-q1h --- execute sendmail in the background and listen to 25port. When sendmail cannot deliver the mail to the destination, it first retains the mail in the mail? Xin? Ail queue. and handle the mail every hour? Xin.
Test sendmail
[Root @ mis010/] # telnet 172.16.10.1 25
Trying 172.16.10.1...
Connected to www (172.16.10.1 ).
Escape character is '^]'.
220 localhost. localdomain ESMTP Sendmail 8.12.8/8.12.8; Mon, 4 Aug 2003 08:42:11-0400
You can press ctrl +] to interrupt and then press Enter to continue.
Then press Q to exit
^]

Telnet> q
Connection closed.

2. Set sending and receiving restrictions
Modify/etc/mail/access and add the following content:
172.10 RELAY
Then
# Makemap-v hash/etc/mail/access </etc/mail/access

3. Set smtp authentication (Installation Process omitted)
# Vi/etc/mail/sendmail. mc and find the following two lines
Dnl TRUST_AUTH_MECH ('external DIGEST-MD5 login plain ') dnl
Dnl define ('confauth _ MECHANISMS ', 'external GSSAPI DIGEST-MD5 login plain ')
Delete the previous "dnl", find the following line, and modify it.
DAEMON_OPTIONS ('port = smtp, Addr = your IP address, Name = MTA ') dnl
Then we must generate a new sendmail. cf,
# Cp/etc/mail/sendmail. mc/usr/share/sendmail-cf/cf
# Cd/usr/share/sendmail-cf/cf
# Sh Build senmail. cf
# Cp sendmail. cf/etc/mail/
#/Etc/rc. d/init. d/sendmail restart
Detect SMTP authentication
[Root @ mis010/] # telnet 172.16.10.1 25
Trying 172.16.10.1...
Connected to www (172.16.10.1 ).
Escape character is '^]'.
220 localhost. localdomain ESMTP Sendmail 8.12.8/8.12.8; Mon, 4 Aug 2003 08:50:20-0400
Ehlo localhost --- enter this command
250-localhost.localdomain Hello www [172.16.10.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
December 250-SIZE
250-DSN
250-ETRN
250-AUTH gssapi login plain --- if this row appears, the setting is correct.
250-DELIVERBY
250 HELP
^] --- Ctrl +] interrupted

Telnet> q --- q quit
Connection closed.

4. Add an alias to/etc/aliases. format:

Actual Alias Name

Test1 test
Luo_alian alian
In this way, the messages sent to luo_alian will be taken away by alian.
Read the aliases file again.
# Newaliases

5. Set a user with an account name of uppercase letters to receive emails,
# Vi/etc/mail/sendmail. cf
Mlocal, P =/usr/bin/procmail, F = lsDFMAw5:/| @ qSPfhn9u,... --- add "u" here"

(To define the email space, you can install the Quota suite, and to save time when sending emails in disguise... not to mention it here.): p

6. Set POP and IMAP servers. (Installation Process omitted)
1) first, make sure that/etc/servicese has the following content:
Pop2 109/tcp pop-2 postoffice # POP version 2
Pop2 109/udp pop-2
Pop3 110/tcp pop-3 # POP version 3
Pop3 110/udp pop-3
.......
Imap 143/tcp imap2 # Interim Mail Access Proto v2
Imap 143/udp imap2
Use xinetd to start POP, IMAP,
[Root @ mis010/] # vi/etc/xinetd. d/imap
Service imap
{
Disable = no
Socket_type = stream
Wait = no
User = root
Server =/usr/sbin/imapd
Log_on_success + = HOST DURATION
Log_on_failure + = HOST
}
[Root @ mis010/] # vi/etc/xinetd. d/ipop3
Service pop3
{
Disable = no
Socket_type = stream
Wait = no
User = root
Server =/usr/sbin/ipop3d
Log_on_success + = HOST DURATION
Log_on_failure + = HOST
}
[Root @ mis010/] # vi/etc/xinetd. d/ipop2
Service pop2
{
Disable = no
Socket_type = stream
Wait = no
User = root
Server =/usr/sbin/ipop2d
Log_on_success + = HOST DURATION
Log_on_failure + = HOST
}
Let xinetd re-read the set value.
[Root @ mis010/] #/etc/rc. d/init. d/xinetd reload
Telnet is used to test POP3. the IMAP service is similar to the above test method. I tried it and tried it. As for the client, I don't have to say anything about it. I think this mail method is okay.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.