Solved

Sendmail ........

Posted on 2000-04-07
9
955 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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
 
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Daily system administration tasks often require administrators to connect remote systems. But allowing these remote systems to accept passwords makes these systems vulnerable to the risk of brute-force password guessing attacks. Furthermore there ar…
This is the error message I got (CODE) Error caused by incompatible libmp3lame 3.98-2 with ffmpeg I've googled this error message and found out sometimes it attaches this note "can be treated with downgrade libmp3lame to version 3.97 or 3.98" …
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
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.

726 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