Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

E-mail SMTP server

Status
Not open for further replies.

evilphantom

Technical User
Jan 31, 2003
51
CA
Maybe I am just tired and can't understand this but if someone could help me I would be forever grateful.

I have a domain and an MX record for it

I have configured sendmail and qpopper and all seems to be working properly sending mail to the server and retrieving it. However when a user sends an e-mail through the server unless the domain is my domain it says that there is a relaying problem.

How can I work around this so that my users can send e-mail to the outside world? I know I am NOT suppose to use relay_promiscuous mode so how do I go about getting around this issue? The DNS is on a different server I don't have to make any changes there do I?

Please Help I am very confused and tired right now

Dez


 
can you be more specific please?

You talk as if the 'server' and 'sendmail' machines are different?

What subnets are they / is it on nad where are the clients?

Where is the MX record pointing to?

Thanks
 
By default, sendmail allows anyone to send email through it. It seems as if you have set it up to only allow certain IPs/hostnames/domains to send email through it. These IPs/hostnames/domains are usually stored in [tt]/etc/maíl/access[/tt]. Make sure that the computers that should be allowed to use your server are in this file. //Daniel
 
No sorry the servers are the same. When a user wants to send an outgoing e-mail using [mail.mydomain.com] as the smtp server an error is returned saying that it cannot relay to the domain as it seems to only want to send to x@mydomain.com not to x@someotherdomain.com. So how are my users suppose to send outgoing mail if unless I include every other domain out there. To me it seems teadious to such a thing.
The mx record is pointing to mail.mydomain.com.
The clients are not on the same subnet as the server. Some are at home and others are in a different city

As for setting up the access file how would I do this with remote users. What if theri IP changes?

Dez
 
'b@otherdomain.com' on 2/1/2003 10:39 AM
550 5.7.1 <desmond@vaultstudios.com>... Relaying denied. IP name lookup failed [24.112.176.185]

'c@someotherdomain.com' on 2/1/2003 10:39 AM
550 5.7.1 <desmond@compu-101.com>... Relaying denied. IP name lookup failed [24.112.176.185]

is the error I get. I think I understand about the access file now that i need to add 'user1@mydomain.com RELAY' to it to fix the above problem right... I may have been thinking about it backwards is this right...
 
Any time you allow relaying, you take the risk of someone exploiting that by using your server to relay spam. To allow relaying, you need to edit sendmail.mc. Open it with a text editor and look for the line(s) that start with DAEMON_OPTIONS. These lines tell sendmail to only look at the loopback device for mail. Comment these out by putting &quot;dnl&quot; at the start of the line. Add this line: FEATURE(`relay_local_from')dnl. This will allow relaying of mail that has @yourdomain.com in the return address. Now you need to compile sendmail.cf. Use the following command: m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf. Check the path to these files because they are different on different distros. Now you need to make sure your domain and any domain you are hosting is in access.db. Edit /etc/mail/access and add this line: yourdomain.com RELAY. Add any other domains that your server handles mail for. Now you need to create access.db. Type the following command: makemap hash /etc/mail/access.db < /etc/mail/access. Restart sendmail and it should start working. You should research some ways to reduce spam through your server. One technique is to use pop-before-smtp but this is not enough by itself. If your server gets blackballed because of tons of spam coming from your server, it will result in other servers rejecting mail from your server.
 
Okay that helped a lot. but now I recieve an returned mail when a mail to my regular account through my ISP.

----- The following addresses had permanent fatal errors ----- me@myotherdomain.com
(reason: 553 5.3.0 <me@mydomain.com>... No such user here)

Just so its clear myotherdomain.com has its mail on server B and mydomain.com is the domain I am setting up

is there a way around this or are my users foever stuck not sending mail to local domains under my ISP?

Dez
 
Also anyone know of a good site that would explain relaying in better detail to me. I have a basic understanding of it but I'd like to educate myself some more on the subject

Thanks

Dez
 
Your ISP should have nothing to do with your mail at this point. If you are trying to send mail through your ISP using your domain name, that would require them to allow relaying of your domain through their servers and in most cases, would not be allowed. You should have 2 DNS records for your domain's mail server. First is the &quot;A&quot; record which gives the ip address of you mail server. The second, is the &quot;MX&quot; record which shows that your mail server (e.g. mail.yourdomain.com)handles the mail for yourdomain.com. You don't have to do anything on your system to create mail.yourdomain.com. This name is just used for DNS. It will work exactly the same if you had yourdomain.com handles mail for yourdomain.com. This is just to give you an idea of what is needed for you to send and receive mail through your server. Some dns services provide a form to edit these records, while others provide the record itself. A good place to start looking for more information on relaying is They also have links to where you can find more documentation on tweaking sendmail.
 
So your telling me that my MX record is setup incorrectly. when I looked this up this is wat I found:


Domain Server: ns1.myisp.ca
mydomain.com mail is handled by 10 mail.mydomain.com.
mydomain.com mail is handled by 100 mail.myisp.ca.

So is ending up at my isp's Mail server because fo the MX record? is it suppose to use my isp's mail server as the backup? or is this in error?

Thanks
Dez

 
The way you have it is correct if you are using your isp as a backup. This is not a good idea because as I mentioned above, they may not allow other domains to relay through their servers. On the other hand, if your server is running correctly, mail shouldn't have to be relayed through your isp. I would ask someone you know who has a server about letting you use their server as a backup. If you don't know anybody, you may be able to get a dns service such as to do it fo a small fee. In the mean time, you need to get your server to work correctly. Have you tried to setup relaying yet?
 
Hi,

When you now get the 553 error, could you check to see what machine is sending the error back to you - your ISP or your mail server?
 
The error is comming from my ISP's mail server. [actually I think its there spam filter] but it says it doesn't recognise the sender, 'me@mydomain.com' and gives my a user not found here msg.
 
Hi,

try using a tool like nslookup or dig on the machine you are trying to send the email from to see how te MX record appears for mydomain.com. Also try looking at the same record using the DNS server the mail server may be using if you can find out what that is.
 

What does

echo &quot;&quot; | sendmail -v Test me@myotherdomain.com

give??

Cheers Henrik Morsing
Certified AIX 4.3 Systems Administration
& p690 Technical Support
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top