Friday, May 23, 2008

Fedora9:sendmail and evolution mail software

I set up one Fedora 9 computer and one Fedora 8 computer. The root@test.com and root@about.com can send e-mail between them.

Fedora 9:


[root@east ~]#hostname east.test.com
east.test.com
[root@east ~]#vi /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=east.test.com

[root@east ~]#vi /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 east.test.com east localhost.localdomain localhost

[root@east ~]#vi /etc/resolv.conf
nameserver 192.168.0.190
search test.com.
domain test.com
=======
named daemon

[root@east ~]#vi /etc/named.conf
options {
allow-query {
any;
localhost;
};
forwarders { 192.168.0.1 port 53;
};



listen-on port 53 { 127.0.0.1;192.168.0.190; };
listen-on-v6 port 53 { ::1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";

recursion yes;
};

logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};

zone "about.com." IN {
type master;
file "about.com.db";
};
zone "0.168.192.IN-ADDR.ARPA." IN {
type master;
file "192.168.0.db";

};
zone "test.com." IN {
type master;
file "test.com.db";
};
zone "." IN {
type hint;
file "named.ca";
};

include "/etc/named.rfc1912.zones";

[root@east ~]#vi /var/named/chroot/var/named/test.com.db
$TTL 1H
@ SOA east root.east.test.com. ( 7
3H
1H
1W
1H )
NS east
IN 1H MX 0 east
east IN 1H A 192.168.0.190


[root@east ~]#vi /var/named/chroot/var/named/about.com.db
$TTL 1H
@ SOA east.test.com. root.east.test.com. ( 2
3H
1H
1W
1H )
IN 1H MX 0 west
NS east.test.com.
west IN 1H A 192.168.0.105


[root@east ~]#chkconfig --level 35 named on
[root@east ~]#service named start
[root@east ~]#
[root@east ~]# nslookup east
Server: 192.168.0.190
Address: 192.168.0.190#53

Name: east.test.com
Address: 192.168.0.190

[root@east ~]#vi /etc/mail/local-host-names
# local-host-names - include all aliases for your machine here.
east.test.com east

-------
sendmail configuration

[root@east ~]#vi /etc/mail/sendmail.mc
dnl DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl DAEMON_OPTIONS(`Port=smtp,Addr=0.0.0.0, Name=MTA')dnl
dnl DAEMON_OPTIONS(`Port=smtp,Addr=192.168.0.20, Name=MTA')dnl



dnl LOCAL_DOMAIN(`localhost.localdomain')dnl
LOCAL_DOMAIN(`test.com')dnl
dnl #


[root@east ~]# m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf

[root@east ~]# service sendmail restart
Shutting down sm-client: [ OK ]
Shutting down sendmail: [ OK ]
Starting sendmail: [ OK ]
Starting sm-client: [ OK ]

[root@east ~]# netstat -nl grep :25 grep tcp
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN
[root@east ~]#
========
Configuring the Evolution softwae
Gnome--Applications --Office --Evolution Mail and Calendar
Identity:
Email Address: root@east.test.com
Receiving Mail:
Server Type: Standard Unix mbox spool file
Configuration:
Path:/var/spool/mail/root
Sending Mail: sendmail

If the SEND/RECEIVE button of your evolution software is dimmed, you could click on the lower right button to turn it online.

==
Fedora 8:
[root@west ~]#hostname west.about.com

/etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 west.about.com localhost.localdomain localhost

/etc/resolv.conf
; generated by /sbin/dhclient-script
domain test.com
search test.com.
#nameserver 192.168.0.1
nameserver 192.168.0.190

/etc/sysconfig/network
NETWORKING=yes
HOSTNAME=west.about.com

/etc/mail/local-host-names
# local-host-names - include all aliases for your machine here.
west.about.com

/etc/mail/sendmail.mc
dnl #
dnl DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
DAEMON_OPTIONS(`Port=smtp,Addr=0.0.0.0, Name=MTA')dnl
dnl #

dnl #
LOCAL_DOMAIN(`about.com')dnl
dnl #

[root@west ~]# m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
[root@west ~]# service sendmail restart

lastly, set up the evolution mail software with root@about.com. I use the server type: Standard Unix Mbox spool file and Path is /var/spool/mail/root

[root@west ~]# set grep MAIL
MAIL=/var/spool/mail/root
MAILCHECK=60
[root@west ~]#

Sending e-mail
Server Type: sendmail

=======

I repeated the configuration with Fedora 9 and Fedora 9. As long as you open 53/tcp and 25/tcp ports on your firewall, two computers can SEND/RECEIVE mail.