homepage Welcome to WebmasterWorld Guest from 54.204.77.26
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / Perl Server Side CGI Scripting
Forum Library, Charter, Moderators: coopster & jatar k & phranque

Perl Server Side CGI Scripting Forum

    
Sendmail, Perl and DNS - mail resolution issues...
cant get scripts to send "local" mail to a remote email host...
seoboy




msg:441408
 1:59 am on Aug 17, 2002 (gmt 0)

ok, not sure exactly where to post this so if anyone has a suggestion for a better location i'm all ears.

i was up all night trying to figure this out. after 2 days i'm turning to the community... here's the scenario.

netbsd
sendmail
perl 5.x
virtual "private" server (shared sendmail config, but local sendmail.cf)

previously, email was hosted on the same box powering the webserver. when i ran form mail scripts for customer contacts (for example) the script would use sendmail to send off the customer's inquiry to the appropriate email address at my company. but effectively what was happening was sendmail was sending to itself. the mail was sent to the local domain (hostname for the server).

i've recently decided to host email on a remote box via a remote email hosting service. this means that i'd like sendmail to check the DNS MX record, locate the remote email host, and shoot the emails off to the other server. i've made the changes i think i need to make in the sendmail config (removed all domain names from the sendmail.cf). however, messages are STILL getting delivered to the local mailboxes. meanwhile, emails from REMOTE parties are going to the new email server.

customer support tells me that i do NOT need to restart sendmail (i cant anyway - its shared). he says the virtual configuration means it checks my sendmail.cf at every launch, so changes are immediate; according to all his suggestions, i'm doing everything "right".

DNS changes were made 24 hours ago, and the TTL for these records was set at 1 hour anyway, so the update should have been relatively quick. i do not appear to be receiving ANY remote mail to the "old" email server - local sendmail is the only one still delivering there. this suggests its not a DNS thing, but some sort of local "default" thing.

WHAT should i do to disable this local default? i'm stumped, and i've been digging and digging but cant find any straightforward answers to my scenario.

thanks in advance for any help!

seoboy

 

jatar_k




msg:441409
 3:40 am on Aug 18, 2002 (gmt 0)

I would be very surprised if none of the resident geniuses can't even harbour a guess at this one.

netcommr




msg:441410
 8:46 am on Aug 18, 2002 (gmt 0)

Are you running V8?

You must restart sendmail always! A single sendmail process stays memory resident for all incoming mail (sendmail daemon). This process does not check for changes in your cf file but uses the copy stored in ram during startup. -- This may not the problem, just remember to always restart.
What could be the problem is cached records... restart dns and sendmail always.

Is your DNS on the domain host machine?? If not, then the new TTL settings are not a factor, the old TTL time is the issue. Did you check to make sure the secondary DNS is updated properly and no errors in the zone files?? This sounds like sendmail is not accepting the MX and just sending to the host address (A record). If you have an MX conflict or an address which does not fully qualify (fqdn) then this can happen in *nix machines. Did you run a NSLOOKUP from the local machine to see what comes back on your DNS settings? (your host can do this if you don't have telnet)
>nslookup
>set type=mx

Is the domain set for your MX host defined as a CNAME or an A record... A record is best as sendmail can ignore cnames.

This can also be a config setting in the cf file also...too many to list but scan through it.

------------------------------------------

Though I bet by the time you read this the dns has propagated and your mail delivers ...

seoboy




msg:441411
 3:55 pm on Aug 21, 2002 (gmt 0)

netcommr, thanks for your suggestions. as you mention, there really are a seemingly infinite number of things that could be involved.

i've narrowed it down to this so far: the virtmaps for mail routing on the subhosts seem to be overridding the MX settings (taking precedence) and keeping the mail local. i removed all virtmaps and mail to these remote subhost addresses at least seems to be working fine now. i havent confirmed that mail to local root domain addresses is working yet (but it isnt critical to my infrastructure). if thats the case, i'll probably try removing all local user accounts and seeing where that gets me... sorta a broad stroke solution, but i think it will probably work.

thanks to everyone who looked at this and gave it some thought.

seoboy

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Perl Server Side CGI Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved