Solved

Sendmail ........

Posted on 2000-04-07
9
938 Views
Last Modified: 2013-12-16
I have an email server running SuSE Linux.

Yesterday due to change in management of our company our domain changed to mopani.com.zm from nkana.com.zm. Using administrative tool YaST I updated the domain name.

Our internet Service has changed our domain name and started re-routing mails sent to e.g Metal@nkana.com.zm to Metal@mopani.com.zm.

My problems:

Now I cant send mails from within mail email agent PINE. It comes with an error
[Mail not sent. Sending error: 554 rewrite: map dequote not found]

I can send mails successfully using Outlook Express email client.

Mails addressed to Metal@mopani.com.zm the new domain are failing to get through to me.I asked my internet service provider check at his site he insisted that it my sendmail which is not okay. According to him it should include the old domain and new domain names.


With the background given above can the Linux experts help me see where I have gone wrong??????? Is it sendmail or anything else???????



0
Comment
Question by:Metal
  • 5
  • 3
9 Comments
 
LVL 40

Expert Comment

by:jlevie
ID: 2694052
A check on the DNS records says that the MX record for the old and new domains points to mindola.mopani.com.zm, which should be the FQDN of your mailserver.

When I connect to your mailserver it identifies itself as mindola.mopani.com.zm which is correct. I've taken the liberty of sending a test message to Postmaster@mopani.com.zm. It bounced with the error "554 rewrite: map mailertable not found". Of course I don't know if you originally used a mailer table or not, but that error could occur also if the "Cw" definition in /etc/sendmail.cf (or the host/domain definitions in the sendmail.cw) doesn't identify your machine as handling email for your new domain. If you only used the "Cw" directive it probably still has the old domain name.

0
 
LVL 1

Expert Comment

by:Sokka
ID: 2695896
What is IP address of the changed domain registered? If the Ip address is same then change the following things :-

/etc/hosts
/etc/sysconfig/network
/etc/sysconfig/network-script/ifcfg-eth0

to the new IP address

or if Ip is same then

surely sendmail.cw must have the entry

or

If Everyting fails then go to
/etc/mail/virtusertable

and add entry as newdomain a tab space olddomain
makemap hash /etc/mail/virtusertable</etc/mail/virtusertable

Post here the status
bye
0
 

Author Comment

by:Metal
ID: 2697612
Clarify please.

jlevie..

I have /etc/sendmail.cf on this server and added Cw definition as

Cw locahost

and listed the domains:  

Dj$mopani.com.zm    - new domain
Dj$nkana.com.zm     - old domain

achievement made

i'm now able to send mails from my server to hotmail.com or external mail server.

Mailertable

I have not used mailertable before and in fact it is all commented out. I still have the problem pointing to "554 rewrite: map mailertable not found"

What must be my next step?

Sokka

My IP address is the same. Sendmail.cw must be the same as sendmail.cf not so? Which entry should I add if not what I have done above.

if verything fails then go to /etc/virtusertable. I have added an entry according to the format given mapping is made from olddomain to newdomain

but did not understand where entry makemap hash /etc/mail/virtusertable</etc/mail/virtusertable must be added.


0
 

Author Comment

by:Metal
ID: 2697679
Clarify please.

jlevie..

I have /etc/sendmail.cf on this server and added Cw definition as

Cw locahost

and listed the domains:  

Dj$mopani.com.zm    - new domain
Dj$nkana.com.zm     - old domain

achievement made

i'm now able to send mails from my server to hotmail.com or external mail server.

Mailertable

I have not used mailertable before and in fact it is all commented out. I still have the problem pointing to "554 rewrite: map mailertable not found"

What must be my next step?

Sokka

My IP address is the same. Sendmail.cw must be the same as sendmail.cf not so? Which entry should I add if not what I have done above.

if verything fails then go to /etc/virtusertable. I have added an entry according to the format given mapping is made from olddomain to newdomain

but did not understand where entry makemap hash /etc/mail/virtusertable</etc/mail/virtusertable must be added.


0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 40

Expert Comment

by:jlevie
ID: 2697777
You probably don't need the Dj definitions, and certainly don't want both (only the last is used). To be safe you can leave the Dj$mopani.com.zm in.
Or you can comment both out and test to see that sendmail has properly determined it's domain name (which it should do if your hosts file is correct and only lists mindola.mopani.com.zm for the system IP). To test it, simply "telnet mindola.mopani.com.zm 25" and look at the system identification in the SMTP greeting.

You do need the Cw to look like:

Cw mopani.com.zm nkana.com.zm localhost

Or you can leave the Cw definition alone and put the domain names in sendmail.cw, one per line. Theoretically, you should only need the old domain in sendmail.cw, but the way the dns records are I suspect you'll need both (and it won't hurt for the official domain name to be there). What the Cw definition does is to tell sendmail what hosts/domains it is supposed to accept mail for. It normally would be able to figure out from the DNS that it should accept email for mopain.com.zm, but with both domains pointing to the same place I suspect that it's confused.

 I think you'll also need to use the virtual user table to direct everything addressed to the old domain to be delivered to the new. I don't have any sendmail doc's with me right now to be able to check the syntax of that line, but I think it will be:

@nkana.com.zm      %1@mopani.com.zm

The virtualuser table is ordinarily a dbm hash map, defined in the sendmail.cf something like:

Kvirtuser hash -o /etc/mail/virtual

In my case the map is in /etc/mail and the file name will be virtual.db. I make that from a file (/etc/mail/virtual on my server) by doing:

makemap hash /etc/mail/virtual.db </etc/mail/virtual
0
 

Author Comment

by:Metal
ID: 2697937
jlevie,

Thanks for answer so far, I am almost home.

However, should virtual/virtusertable exist in advance? What about virtusertable.db? I reckon it is created by the command you listed.



I have tried to issue the command but i  following error:

mindola:~ # makemap hash /etc/mail/virtusertable.db </etc/mail/virtusertable
makemap: /etc/mail/virtusertable.db: line 4: syntax error (leading space)

mindola:~ # makemap hash /etc/mail/virtusertable </etc/mail/virtusertable
makemap: /etc/mail/virtusertable.db: line 4: syntax error (leading space)

mindola:~ # makemap hash /etc/mail/virtusertable </etc/mail/virtusertable
makemap: /etc/mail/virtusertable.db: line 4: syntax error (leading space)


Kvirtuser hash -o /etc/mail/virtual

In my case the map is in /etc/mail and the file name will be virtual.db. I make that from a file (/etc/mail/virtual on my server) by doing:

makemap hash /etc/mail/virtual.db </etc/mail/virtual



0
 
LVL 40

Accepted Solution

by:
jlevie earned 50 total points
ID: 2698075
I don't think it likes your /etc/mail/virtualusertable file. The format is key<tab>value. There can't be any leading spaces before the key or any blank lines that contain spaces (that's what I think is wrong from the error). Why don't you paste the file into a comment so I can see it.
0
 

Author Comment

by:Metal
ID: 2706590
Sokka's answer is incomplete in the sense that I needed more info as requested to fully carry it out but I have not received it.
0
 

Author Comment

by:Metal
ID: 2706833
Thanks,
jlevie's comments worked out to be the right solution to my problem,
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

Currently, there is not an RPM package available under the RHEL/Fedora/CentOS distributions that gives you a quick and easy way to allow PHP to interface with Oracle. As a result, I have included a set of instructions on how to do this with minimal …
If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
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.

746 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now