Operating System - Linux
1831388 Members
3512 Online
110025 Solutions
New Discussion

Sendmail Smart Relay on Fedora 4 not working as it should

 
SOLVED
Go to solution
Geoff Wild
Honored Contributor

Sendmail Smart Relay on Fedora 4 not working as it should

One of my servers died - so I built a new one with Fedora 4. I have disabled selinux (causes too much grief - but not the topic for this discussion).

Any ways, what I had before was two servers, call them servera and serverb. Serverb is my primary web server and backup dns/mail. Servera is my primary DNS/Mail and backup web.

When servera died, I just made serverb primary for everything (all I did was use the same named.conf from servera and removed the DS macro from sendmail.cf).

Okay - that worked fine (my mini dr plan).

So, I ship out a new servera. Making it primary DNS again - no problem at all.

I didn't flip the mail yet - so I set the DS macro on servera to DSserverb.mydomain.com

Well - it doesn't work - servera still accecpt mail for mydomain.com and delivers it locally to itself. So - I wind up with 2 email boxes. Before I make serverb the "backup" mail server again - I want to know why this is happening.

Only changes I made from previous environment
- servera went from RH9 to FC4
- using dovecot imap/pop instead of courier imap/pop.
- using squirrelmail for web based email instead of sqwebmail.

Both servers are FC4.

MX records are:

50 servera.mydomain.com
5 serverb.mydomain.com

I use maildrop for Mlocal on both servers:

Mlocal, P=/usr/local/bin/maildrop, F=lsDFMAw5:/|@qSPfhn9, S=EnvFromL/HdrFromL, R=EnvToL/HdrToL,

DSserverb.mydomain.com on servera's sendmail.cf


Sendmail test from servera:

# sendmail -v -d8.99 -d38.99 gjwild@mydomain.com
;; res_nquerydomain(servera.mydomain.com, , 1, 1)
;; res_query(servera.mydomain.com, 1, 1)
;; res_nmkquery(QUERY, servera.mydomain.com, IN, A)
;; res_send()
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 52184
;; flags: rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
;; servera.mydomain.com, type = A, class = IN
;; Querying server (# 1) address = 192.168.2.60
;; new DG socket
;; got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 52184
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 4, ADDITIONAL: 1
;; servera.mydomain.com, type = A, class = IN
servera.mydomain.com. 4H IN A 192.168.2.60
mydomain.com. 4H IN NS ns1.twisted4life.com.
mydomain.com. 4H IN NS ns1.granitecanyon.com.
mydomain.com. 4H IN NS servera.mydomain.com.
mydomain.com. 4H IN NS serverb.mydomain.com.
serverb.mydomain.com. 4H IN A 192.168.2.59
openmap() dequote:dequote NULL: valid
openmap() host:host NULL: valid
getcanonname(mydomain.com), trying dns
dns_getcanonname(mydomain.com, trymx=1)
dns_getcanonname: trying mydomain.com. (A)
YES
dns_getcanonname: mydomain.com
getcanonname(mydomain.com), found
Subject: this is a test
hello?
.
getmxrr([127.0.0.1], droplocalhost=1)
gjwild@mydomain.com... Connecting to [127.0.0.1] via relay...
;; res_query(1.0.0.127.in-addr.arpa, 1, 12)
;; res_nmkquery(QUERY, 1.0.0.127.in-addr.arpa, IN, PTR)
;; res_send()
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 52185
;; flags: rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
;; 1.0.0.127.in-addr.arpa, type = PTR, class = IN
;; Querying server (# 1) address = 192.168.2.60
;; new DG socket
;; got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 52185
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0
;; 1.0.0.127.in-addr.arpa, type = PTR, class = IN
1.0.0.127.in-addr.arpa. 1D IN PTR localhost.
0.0.127.in-addr.arpa. 1D IN NS localhost.
220 servera.mydomain.com ESMTP Wildmail 9.9.9 ; Tue, 25 Apr 2006 08:25:15 -0700
>>> EHLO servera.mydomain.com
250-servera.mydomain.com Hello localhost [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-EXPN
250-VERB
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-DELIVERBY
250 HELP
>>> VERB
250 2.0.0 Verbose mode
>>> MAIL From: SIZE=31
250 2.1.0 ... Sender ok
>>> RCPT To:
>>> DATA
250 2.1.5 ... Recipient ok
354 Enter mail, end with "." on a line by itself
>>> .
050 ... Connecting to local...
050 ... Sent
250 2.0.0 k3PFPFag026200 Message accepted for delivery
gjwild@mydomain.com... Sent (k3PFPFag026200 Message accepted for delivery)
Closing connection to [127.0.0.1]
>>> QUIT
221 2.0.0 servera.mydomain.com closing connection
closemaps: closing host (NULL)
closemaps: closing dequote (NULL)


Note: running sendmail 8.13.6

Also Note: ip's and server names have been renamed to protect the innocent.

So - question is - why is it delivering local instead of to the smart relay?

10 points says it is something obvious that I have overlooked :)

Rgds...Geoff


Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
2 REPLIES 2
Ivan Ferreira
Honored Contributor
Solution

Re: Sendmail Smart Relay on Fedora 4 not working as it should

I had something similar once and was because the domain name was in /etc/mail/local-host-names, so the server think that the mail should be delivered locally.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Geoff Wild
Honored Contributor

Re: Sendmail Smart Relay on Fedora 4 not working as it should

Thanks Ivan - I knew I was overlooking something!

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.