Solved

Configure mail to not be delivered locally

Posted on 2010-09-22
5
847 Views
Last Modified: 2012-05-10
My domain email is being handled on a web server with Godaddy.

I have a problem. When site emails the admin the server thinks it is suppose to receive the email and cant find where to put it.

How can I tell my server that the mail for a given domain is handled externally?

Sep 22 16:15:28 vm-1476 postfix/error[32312]: 5CFF44F06AC: to=<todd@DOMAIN.com>, relay=none, delay=0.06, delays=0.03/0.01/0/0.02, dsn=5.0.0, status=bounced (User unknown in virtual alias table)

-TNX
0
Comment
Question by:jbrashear72
  • 3
  • 2
5 Comments
 
LVL 26

Expert Comment

by:jar3817
ID: 33740234
Change the local domain.

In /etc/mail/sendmail.mc make sure LOCAL_DOMAIN() is set to something random like "somethingelse.yourdomain.com" rather than just "yourdomain.com"

Also check the /etc/mail/local-host-names file to make sure that domain isn't there. If you're running split DNS or for some reason your server doesn't resolve the MX record right for that domain, you can override it using the /etc/mail/mailertable file:

domain.com             esmtp:[mailserver.domain.com]

Then remake the sendmail config and all maps and restart it:

# m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
# cd /etc/mail && make && /etc/rc.d/init.d/sendmail restart
0
 
LVL 3

Author Comment

by:jbrashear72
ID: 33740305
Does that work if this is postfix?

Also I changed the LOCAL_DOMAIN() to LOCAL_DOMAIN(www.flatcomputing.com)

and added
flatcomputing.com             esmtp:[smtp.secureserver.net]
to the mailertable

When I tried to run:
# m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf

I got:
[root@vm-1476 mail]# m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
/etc/mail/sendmail.mc:10: m4: cannot open `/usr/share/sendmail-cf/m4/cf.m4': No such file or directory
[root@vm-1476 mail]#

Any ideas?
0
 
LVL 26

Expert Comment

by:jar3817
ID: 33740368
You need the sendmail-cf rpm installed.

Also, this is all for sendmail, not postfix. Which are you running?
0
 
LVL 3

Accepted Solution

by:
jbrashear72 earned 0 total points
ID: 33740415
It looks like Postfix
in the Maillog all entries are from Postfix.

But I believe I have fixed it. I found in the virtualmin setting that it was set to accept mail for the domain. I turned that off and it started working.
0
 
LVL 3

Author Closing Comment

by:jbrashear72
ID: 34523685
It worked it self out.
0

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Why VNC doesn't work in Redhat? 11 61
How to find Linux Server's last patch date 9 45
New Exchange Setup, Best Practice 9 69
windows 7 starter missing password 21 76
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
To show how to generate a certificate request in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.:  First we need to log into the Exchange Admin Center. Navigate to the Servers >> Certificates…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question