Hello Friends,
I m having problem with sendmail and DNS. I m trying to setup local mail server, the MX record resolve from lcoal DNS server.
here it is...
one mail server ------> DNS server ---------> second mail server "sendmail
"sendmail as MTA" as MTA"
details:
1) one mailsever:
hostname: mail.llc.com
ipaddress:192.168.0.2
MTA: sendmail
POP: on
IMAP: on
2) second mailserver:
hostname:mail.xyz.com
ipaddress:192.168.0.1
MTA:sendmail
POP: on
IMAP: on
3) DNS server:
hostname: ns.example.com
ipaddress: 192.168.0.3
MX records for mailsever in FWD zone file: MX 5 mail.llc.com, MX 5 mail.xyz.com
[root@ns root]# dig ns.example.com MX | grep "MX" [on DNS server]
; <<>> DiG 9.2.2 <<>> ns.example.com MX
;ns.example.com. IN MX
ns.example.com. 86400 IN MX 5 mail.llc.com.
[root@ns root]#
I have setup my mail server[mail.llc.com]
1) dns client entry with the following line.
in /etc/resolve.conf file
search ns.example.com
nameserver 192.168.0.3
2) i have setup mail server with sendmail as a MTA. made chancing in sendmail.mc file with following options:
define(`confDOMAIN_NAME', `ns.example.com')dnl
LOCAL_DOMAIN(`mail.llc.com')dnl
MASQUERADE_AS(`ns.example.com')dnl
dnl #DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl ---- > commented with "#" localhost
3) i have set the m4, with:
m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
4) also given REALY entry in /etc/mail/access
localhost.localdomain RELAY
#localhost RELAY
#127.0.0.1 RELAY
192.168.0.2 RELAY [mail.llc.com]
5) also made changes in /etc/hosts
127.0.0.1 server localhost.localdomain localhost
192.168.0.2 mail mail.llc.com mail
6) Also, imap,pop service is ruuning on ns.example.com PC and sendmail running as MTA.
My questons:
when i try to send a mail with command:
root@mail root]# echo "Hello root at ns.example.com" | mail -v -s "Hello"
root@ns.example.com
root@ns.example.com... Connecting to [127.0.0.1] via relay...
220 ns.example.com ESMTP Sendmail 8.12.10/8.12.10; Fri, 1 Jul 2005 21:49:12 +0530
>>> EHLO mail.llc.com
250-ns.example.com Hello server [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-AUTH GSSAPI DIGEST-MD5 CRAM-MD5
250-DELIVERBY
250 HELP
>>> MAIL From:<root@mail.llc.com> SIZE=68 AUTH=root@mail.llc.com
250 2.1.0 <root@mail.llc.com>... Sender ok
>>> RCPT To:<root@ns.example.com>
>>> DATA
250 2.1.5 <root@ns.example.com>... Recipient ok
354 Enter mail, end with "." on a line by itself
>>> .
250 2.0.0 j61GJC9X005057 Message accepted for delivery
root@ns.example.com... Sent (j61GJC9X005057 Message accepted for delivery)
Closing connection to [127.0.0.1]
>>> QUIT
221 2.0.0 ns.example.com closing connection
[root@mail root]# mailq
/var/spool/mqueue is empty
Total requests: 0
[root@mail root]#
it look like it sending a mail to
root@ns.example.com, but actually mail send to
root@mail.llc.com account. [the local mail server]
so can any one tell me how do i send mail from
root@mail.llc.com to ns.example.com.
one more, on ns.example.com[nameserver] my sendmail[MTA] is running and i can login with POP service.
here it is....
[root@mail root]# telnet 192.168.0.3 110
Trying 192.168.0.3...
Connected to ns.example.com (192.168.0.3).
Escape character is '^]'.
+OK POP3 ns v2003.83rh server ready
user linux
+OK User name accepted, password please
pass ****
+OK Mailbox open, 0 messages
quit
+OK Sayonara
Connection closed by foreign host.
[root@mail root]#
my questions is.
1) how can setup intranet mail server with sendmail,postfix? mean how can setup one "local DNS" and 2 pc's with sendmail [MTA], so i can send email to each sendmail server using lcoal DNS.
thank you,
Please help me..
Ravi