Script started on Tue 22 Jul 2008 10:49:04 AM EDT # rpm -qa |grep -i dovecot # rpm -qa |grep -i sasl cyrus-sasl-lib-2.1.22-16.fc10.i386 cyrus-sasl-plain-2.1.22-16.fc10.i386 cyrus-sasl-md5-2.1.22-16.fc10.i386 cyrus-sasl-2.1.22-16.fc10.i386 # rpm -qa |grep -i postfix # rpm -qa |grep -i sendmail sendmail-8.14.2-5.fc10.i386 # # OK so we use sendmail not Posfix! # rpm -qa |grep -i procmail procmail-3.22-21.fc9.i386 # # step 1: set hostname and static IP # ifconfig eth0 Link encap:Ethernet HWaddr 00:08:74:2F:12:02 inet addr:10.142.14.31 Bcast:10.142.14.255 Mask:255.255.255.0 inet6 addr: fe80::208:74ff:fe2f:1202/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:5078 errors:0 dropped:0 overruns:0 frame:0 TX packets:1519 errors:14 dropped:0 overruns:0 carrier:14 collisions:34 txqueuelen:100 RX bytes:516782 (504.6 KiB) TX bytes:344190 (336.1 KiB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:4166 errors:0 dropped:0 overruns:0 frame:0 TX packets:4166 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:218474 (213.3 KiB) TX bytes:218474 (213.3 KiB) # cat /etc/sysconfig/network NETWORKING=yes HOSTNAME=localhost.localdomain # vi /etc/sysconfig/network # cat /etc/sysconfig/network NETWORKING=yes HOSTNAME=wpserver GATEWAY=172.22.25.1 # works for DTEC-461 only # vi /etc/hosts # cat /etc/hosts # Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1 localhost.localdomain localhost localhost ::1 localhost6.localdomain6 localhost6 172.22.25.11 wpserver.gcaw.org wpserver # cd /etc/sysconfig/network-scripts/ # ls ifcfg-eth* ifcfg-eth0 # cat /etc/sysconfig/network-scripts/ifcfg-eth0 # Intel Corporation 82540EM Gigabit Ethernet Controller DEVICE=eth0 BOOTPROTO=dhcp HWADDR=00:08:74:2f:12:02 ONBOOT=yes DHCP_HOSTNAME=localhost.localdomain NM_CONTROLLED= # vi /etc/sysconfig/network-scripts/ifcfg-eth0 # cat /etc/sysconfig/network-scripts/ifcfg-eth0 # Intel Corporation 82540EM Gigabit Ethernet Controller DEVICE=eth0 BOOTPROTO=none HWADDR=00:08:74:2f:12:02 ONBOOT=yes IPADDR=172.22.25.11 NETMASK=255.255.255.0 # cat /etc/resolv.conf ; generated by /sbin/dhclient-script search hccfl.edu. nameserver 10.142.2.4 nameserver 10.142.2.5 # # turn off DHCP or changes to resolv.conf may be lost. # dhclient -r eth0 # vi /etc/resolv.conf # cat /etc/resolv.conf ; generated by WP 7/25/2008 search gcaw.org. hccfl.edu. nameserver 0.0.0.0 nameserver 10.142.2.4 nameserver 10.142.2.5 # egrep 'hosts|networks' /etc/nsswitch.conf #hosts: db files nisplus nis dns hosts: files mdns4_minimal [NOTFOUND=return] dns #networks: nisplus [NOTFOUND=return] files networks: files # cd /etc # cp named.conf named.conf.ORIG cp: cannot stat `named.conf': No such file or directory # rpm -qa | grep -i named # yum install dovecot postfix bind sendmail-cf ... output omitted ... Complete! # cp named.conf named.conf.orig # vi named.conf # cat named.conf // // named.conf // // Provided by Red Hat bind package to configure the ISC BIND named(8) DNS // server as a caching only nameserver (as a localhost DNS resolver only). // // See /usr/share/doc/bind*/sample/ for example named configuration files. // options { // listen-on port 53 { 127.0.0.1; }; // 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"; // allow-query { localhost; }; recursion yes; }; logging { channel "security" { syslog authpriv; severity info; }; channel "named" { syslog local2; severity info; print-category yes; print-severity yes; }; category security { "security"; "named"; }; category default { "named"; }; category general { "named"; }; }; /* logging { channel default_debug { file "data/named.run"; severity dynamic; }; }; */ zone "." IN { type hint; file "named.ca"; }; zone "gcaw.org" IN { type master; file "gcaw.zone"; allow-update { none; }; }; zone "25.22.172.in-addr.arpa" IN { type master; file "gcaw-rev.zone"; allow-update { none; }; }; include "/etc/named.rfc1912.zones"; # vi /etc/rsyslog.conf # grep named /etc/rsyslogd.conf local2.* /var/log/named.log # service rsyslog reload Reloading system logger...[ OK ] # cd /etc/logrotate.d # ls BackupPC cups dirmngr httpd named ppp psacct rpm setroubleshoot snmpd syslog wpa_supplicant yum # cat named /var/log/named.log { missingok create 0644 named named postrotate /sbin/service named reload 2> /dev/null > /dev/null || true endscript } # cd /var/named # ls data dynamic gcaw-rev.zone gcaw.zone named.ca named.empty named.localhost named.loopback slaves # cp ~wpollock/Download/gcaw* . # chmod a+rX * # ls -l total 36 drwxrwxr-x 2 named named 4096 2008-07-11 06:23 data drwxrwxr-x 2 named named 4096 2008-07-11 06:23 dynamic -rw-r--r-- 1 root root 759 2008-07-22 15:32 gcaw-rev.zone -rw-r--r-- 1 root root 945 2008-07-22 15:32 gcaw.zone -rw-r--r-- 1 root named 1892 2008-02-18 07:29 named.ca -rw-r--r-- 1 root named 129 2007-06-21 06:09 named.empty -rw-r--r-- 1 root named 152 2007-06-21 06:09 named.localhost -rw-r--r-- 1 root named 145 2007-06-21 06:09 named.loopback drwxrwxr-x 2 named named 4096 2008-07-11 06:23 slaves # cat gcaw.zone ; Name to address DNS file for primary nameserver: gcaw.org ; Generated by Wayne Pollock, 2008-07-15 $TTL 86400 $ORIGIN gcaw.org. @ IN SOA wpserver.gcaw.org. hostmaster.wpserver.gcaw.org. ( 2008071500 ; serial 360000 ; refresh, seconds 7200 ; retry, seconds 3600000 ; expire, seconds 360000 ) ; minimum, seconds ; Nameserver(s): IN NS wpserver.gcaw.org. ; Mail record, so "user@xyz.com" is redirected to "user@mail.xyz.com": IN MX 10 wpserver.gcaw.org. ; SPF security records: IN TXT "v=spf1 a mx ptr -all" ; Records for this host (the primary nameserver): wpserver IN A 172.22.25.11 bowlby IN A 172.22.25.12 carpenoctem IN A 172.22.25.13 ; Aliases (these names are used by default by many services): www IN CNAME wpserver mail IN CNAME wpserver webmail IN CNAME wpserver ftp IN CNAME wpserver # cat gcaw-rev.zone ; Address to name DNS file for primary nameserver: ; Generated by Wayne Pollock, 2008-07-15 ; ; Orgin appended to names (such as "2") not ending in a dot: ; 25.22.172.in-addr.arpa $ORIGIN 25.22.172.in-addr.arpa. $TTL 86400 @ IN SOA wpserver.gcaw.org. hostmaster.wpserver.gcaw.org. ( 2008071500 ; Serial 28800 ; Refresh 14400 ; Retry 3600000 ; Expire 86400 ) ; Minimum IN NS wpserver.gcaw.org. 11 IN PTR wpserver.gcaw.org. 12 IN PTR bowlby.gcaw.org. 13 IN PTR carpenoctem.gcaw.org. # named-checkzone gcaw.org gcaw.zone zone gcaw.org/IN: loaded serial 2008071500 OK # named-checkzone 25.22.172.in-addr.arpa gcaw-rev.zone zone 25.22.172.in-addr.arpa/IN: loaded serial 2008071500 OK # cd /etc # named-checkconf -z zone gcaw.org/IN: loaded serial 2008071500 zone 25.22.172.in-addr.arpa/IN: loaded serial 2008071500 zone localhost.localdomain/IN: loaded serial 0 zone localhost/IN: loaded serial 0 zone 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa/IN: NS '1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa' has no address records (A or AAAA) zone 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa/IN: loaded serial 0 zone 1.0.0.127.in-addr.arpa/IN: NS '1.0.0.127.in-addr.arpa' has no address records (A or AAAA) zone 1.0.0.127.in-addr.arpa/IN: loaded serial 0 zone 0.in-addr.arpa/IN: NS '0.in-addr.arpa' has no address records (A or AAAA) zone 0.in-addr.arpa/IN: loaded serial 0 # echo $? 0 # chkconfig --list named named 0:off 1:off 2:off 3:off 4:off 5:off 6:off # chkconfig named on # chkconfig --list named named 0:off 1:off 2:on 3:on 4:on 5:on 6:off # service named start Starting named: [ OK ] # tail /var/named.log ... output lost, but showed error message: named working directory not writtable # ps -ef |grep [n]amed # get the process ID named ... 2009 ... # ls -l /proc/2009/cwd lrwxrwxrwx 1 named named 0 2008-07-24 21:21 /proc/2009/cwd -> /var/named # ls -ld /var/named drwxr-x--- 6 root named 4.0K 2008-05-23 04:31 /var/named/ # chmod g+w /var/named # service named restart Stopping named: [ OK ] Starting named: [ OK ] # hostname wpserver # hostname wpserver # hostname --fqdn wpserver.gcaw.org # ifconfig eth0 Link encap:Ethernet HWaddr 00:08:74:2F:12:02 inet addr:10.142.14.31 Bcast:10.142.14.255 Mask:255.255.255.0 inet6 addr: fe80::208:74ff:fe2f:1202/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:21742 errors:0 dropped:0 overruns:0 frame:0 TX packets:6409 errors:33 dropped:0 overruns:0 carrier:33 collisions:1594 txqueuelen:100 RX bytes:12504619 (11.9 MiB) TX bytes:970298 (947.5 KiB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:4200 errors:0 dropped:0 overruns:0 frame:0 TX packets:4200 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:221096 (215.9 KiB) TX bytes:221096 (215.9 KiB) # service network restart Stopping network: [ OK ] Starting network: [ OK ] # ifconfig eth0 Link encap:Ethernet HWaddr 00:08:74:2F:12:02 inet addr:172.22.25.11 Bcast:172.22.255.255 Mask:255.255.0.0 inet6 addr: fe80::208:74ff:fe2f:1202/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:21869 errors:0 dropped:0 overruns:0 frame:0 TX packets:6533 errors:35 dropped:0 overruns:0 carrier:35 collisions:1597 txqueuelen:100 RX bytes:12529010 (11.9 MiB) TX bytes:1008850 (985.2 KiB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:4208 errors:0 dropped:0 overruns:0 frame:0 TX packets:4208 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:222152 (216.9 KiB) TX bytes:222152 (216.9 KiB) # host wpserver wpserver.gcaw.org has address 172.22.25.11 # nslookup wpserver Server: 127.0.0.1 Address: 127.0.0.1#53 Name: wpserver.gcaw.org Address: 172.22.25.11 # nslookup bowlby Server: 127.0.0.1 Address: 127.0.0.1#53 Name: bowlby.gcaw.org Address: 172.22.25.12 # nslookup 172.22.25.13 Server: 127.0.0.1 Address: 127.0.0.1#53 13.25.22.172.in-addr.arpa name = carpenoctem.gcaw.org. # tail -11 /var/log/named.log Jul 22 16:36:12 localhost named[6859]: zone 0.in-addr.arpa/IN: NS '0.in-addr.arpa' has no address records (A or AAAA) Jul 22 16:36:12 localhost named[6859]: zone 0.in-addr.arpa/IN: loaded serial 0 Jul 22 16:36:12 localhost named[6859]: zone 1.0.0.127.in-addr.arpa/IN: NS '1.0.0.127.in-addr.arpa' has no address records (A or AAAA) Jul 22 16:36:12 localhost named[6859]: zone 1.0.0.127.in-addr.arpa/IN: loaded serial 0 Jul 22 16:36:12 localhost named[6859]: zone 25.22.172.in-addr.arpa/IN: loaded serial 2008071502 Jul 22 16:36:12 localhost named[6859]: zone 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa/IN: NS '1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa' has no address records (A or AAAA) Jul 22 16:36:12 localhost named[6859]: zone 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa/IN: loaded serial 0 Jul 22 16:36:12 localhost named[6859]: zone gcaw.org/IN: loaded serial 2008071502 Jul 22 16:36:12 localhost named[6859]: zone localhost.localdomain/IN: loaded serial 0 Jul 22 16:36:12 localhost named[6859]: zone localhost/IN: loaded serial 0 Jul 22 16:36:12 localhost named[6859]: running # # Time to configure the MTA and MDA: # alternatives --config mta There are 2 programs which provide 'mta'. Selection Command ----------------------------------------------- *+ 1 /usr/sbin/sendmail.sendmail 2 /usr/sbin/sendmail.postfix Enter to keep the current selection[+], or type selection number: ^C # sendmail -bt -d0.13
^C # cd /etc/mail # vi local-host-names # cat local-host-names # local-host-names - include all aliases for your machine here. localhost localhost.localdomain wpserver wpserver.gcaw.org # cd /etc # vi aliases # newaliases /etc/aliases: 77 aliases, longest 10 bytes, 777 bytes total # cat aliases # # Aliases in this file will NOT be expanded in the header from # Mail, but WILL be visible over networks or from /bin/mail. # # >>>>>>>>>> The program "newaliases" must be run after # >> NOTE >> this file is updated for any changes to # >>>>>>>>>> show through to sendmail. # # Basic system aliases -- these MUST be present. mailer-daemon: postmaster postmaster: root # General redirections for pseudo accounts. bin: root daemon: root adm: root lp: root sync: root shutdown: root halt: root mail: root news: root uucp: root operator: root games: root gopher: root ftp: root nobody: root radiusd: root nut: root dbus: root vcsa: root canna: root wnn: root rpm: root nscd: root pcap: root apache: root webalizer: root dovecot: root fax: root quagga: root radvd: root pvm: root amanda: root privoxy: root ident: root named: root xfs: root gdm: root mailnull: root postgres: root sshd: root smmsp: root postfix: root netdump: root ldap: root squid: root ntp: root mysql: root desktop: root rpcuser: root rpc: root nfsnobody: root ingres: root system: root toor: root manager: root dumper: root abuse: root newsadm: news newsadmin: news usenet: news ftpadm: ftp ftpadmin: ftp ftp-adm: ftp ftp-admin: ftp www: webmaster webmaster: root noc: root security: root hostmaster: root info: postmaster marketing: postmaster sales: postmaster support: postmaster # trap decode to catch security attacks decode: root # Person who should get root's mail #root: marc root: wpollock # cd /etc/mail # ls -l total 300 -rw-r--r-- 1 root root 1048 2008-07-10 11:37 Makefile -rw-r--r-- 1 root root 469 2008-07-10 11:37 access -rw-r----- 1 root root 12288 2008-07-14 18:44 access.db -rw-r--r-- 1 root root 233 2008-07-10 11:37 domaintable -rw-r----- 1 root root 12288 2008-07-14 18:44 domaintable.db -r--r--r-- 1 root root 5584 2008-07-10 11:37 helpfile -rw-r--r-- 1 root root 124 2008-07-22 16:47 local-host-names -rw-r--r-- 1 root root 997 2008-07-10 11:37 mailertable -rw-r----- 1 root root 12288 2008-07-14 18:44 mailertable.db -rw-r--r-- 1 root root 58625 2008-07-09 18:19 sendmail.cf -rw-r--r-- 1 root root 58604 2008-07-10 11:37 sendmail.cf.rpmnew -rw-r--r-- 1 root root 7205 2008-07-10 11:37 sendmail.mc -rw-r--r-- 1 root root 41697 2008-07-09 18:19 submit.cf -r--r--r-- 1 root root 41686 2008-07-10 11:37 submit.cf.rpmnew -rw-r--r-- 1 root root 941 2008-07-10 11:37 submit.mc -rw-r--r-- 1 root root 127 2008-07-10 11:37 trusted-users -rw-r--r-- 1 root root 1847 2008-07-10 11:37 virtusertable -rw-r----- 1 root root 12288 2008-07-14 18:44 virtusertable.db # mv sendmail.cf.rpmnew sendmail.cf mv: overwrite `sendmail.cf'? y # mv submit.cf.rpmnew submit.cf mv: overwrite `submit.cf'? y # ls -l total 192 -rw-r--r-- 1 root root 1048 2008-07-10 11:37 Makefile -rw-r--r-- 1 root root 469 2008-07-10 11:37 access -rw-r----- 1 root root 12288 2008-07-14 18:44 access.db -rw-r--r-- 1 root root 233 2008-07-10 11:37 domaintable -rw-r----- 1 root root 12288 2008-07-14 18:44 domaintable.db -r--r--r-- 1 root root 5584 2008-07-10 11:37 helpfile -rw-r--r-- 1 root root 124 2008-07-22 16:47 local-host-names -rw-r--r-- 1 root root 997 2008-07-10 11:37 mailertable -rw-r----- 1 root root 12288 2008-07-14 18:44 mailertable.db -rw-r--r-- 1 root root 58604 2008-07-10 11:37 sendmail.cf -rw-r--r-- 1 root root 7205 2008-07-10 11:37 sendmail.mc -r--r--r-- 1 root root 41686 2008-07-10 11:37 submit.cf -rw-r--r-- 1 root root 941 2008-07-10 11:37 submit.mc -rw-r--r-- 1 root root 127 2008-07-10 11:37 trusted-users -rw-r--r-- 1 root root 1847 2008-07-10 11:37 virtusertable -rw-r----- 1 root root 12288 2008-07-14 18:44 virtusertable.db # vi sendmail.mc submit.mc 2 files to edit # ls -l total 200 total 264 -rw-r--r-- 1 root root 1048 2008-07-10 11:37 Makefile -rw-r--r-- 1 root root 469 2008-07-10 11:37 access -rw-r----- 1 root root 12288 2008-07-14 18:44 access.db -rw-r--r-- 1 root root 233 2008-07-10 11:37 domaintable -rw-r----- 1 root root 12288 2008-07-14 18:44 domaintable.db -r--r--r-- 1 root root 5584 2008-07-10 11:37 helpfile -rw-r--r-- 1 root root 124 2008-07-22 16:47 local-host-names -rw-r--r-- 1 root root 997 2008-07-10 11:37 mailertable -rw-r----- 1 root root 12288 2008-07-14 18:44 mailertable.db -rw-r--r-- 1 root root 58573 2008-07-22 16:58 sendmail.cf -rw-r--r-- 1 root root 58604 2008-07-10 11:37 sendmail.cf.bak -rw-r--r-- 1 root root 7252 2008-07-22 16:54 sendmail.mc -rw-r--r-- 1 root root 7205 2008-07-22 16:50 sendmail.mc-ORIG -r--r--r-- 1 root root 41686 2008-07-10 11:37 submit.cf -rw-r--r-- 1 root root 941 2008-07-10 11:37 submit.mc -rw-r--r-- 1 root root 127 2008-07-10 11:37 trusted-users -rw-r--r-- 1 root root 1847 2008-07-10 11:37 virtusertable -rw-r----- 1 root root 12288 2008-07-14 18:44 virtusertable.db # diff sendmail.mc-ORIG sendmail.mc 116c116,117 < DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl --- > dnl # DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl > DAEMON_OPTIONS(`Port=smtp, Name=MTA')dnl # make # service sendmail reload Reloading sendmail: [ OK ] reloading sm-client: [ OK ] # mail wpollock@wpserver.gcaw.org Subject: test hi bye . EOT # Hey! You have new mail! # mail Heirloom Mail version 12.3 7/15/07. Type ? for help. "/var/spool/mail/wpollock": 4 messages 4 new >N 1 logwatch@localhost.l Thu Jul 17 16:45 225/7453 "Logwatch for localhost.localdomain (Linux)" N 2 logwatch@localhost.l Mon Jul 21 15:49 42/1580 "Logwatch for localhost.localdomain (Linux)" N 3 logwatch@localhost.l Tue Jul 22 09:07 276/9346 "Logwatch for localhost.localdomain (Linux)" N 4 root Tue Jul 22 16:59 21/786 "test" & 4 Message 4: From root@wpserver.gcaw.org Tue Jul 22 16:59:25 2008 Return-Path: From: root Date: Tue, 22 Jul 2008 16:59:25 -0400 To: wpollock@wpserver.gcaw.org Subject: test User-Agent: Heirloom mailx 12.3 7/15/07 Content-Type: text/plain; charset=us-ascii Status: R hi bye & d & q Held 3 messages in /var/spool/mail/wpollock # exit Script done on Tue 22 Jul 2008 05:13:14 PM EDT