Web Hosting Talk







View Full Version : sendmail question


solent
05-16-2003, 03:07 AM
ok let me explain my case and then my problem.

i have a sendmail server and a pop3 server installed on the same machine.

My sendmail server is responsible for mydomain.com but with no internet access so basically all email to mydomain.com are going to the secondary mx server which has access to the net. then this secondary mx server is forwarding all mails address to mydomain.com to my sendmail server. but i cannot get them.

i get a Mail delivery error with this message.

----------------------------------------------
----- Transcript of session follows ----- <solent@mydomain.com>... Deferred: Connection refused by 172.27.25.25.
Warning: message still undelivered after 4 hours
Will keep trying until message is 2 days old
-----------------------------------------------

what do i need to configure correctly in my sendmail server so that it will be able to receive this mails without rejecting them??

thanks

Winkie
05-16-2003, 07:33 AM
Connection refused by 172.27.25.25

This is your problem, your mail server cannot connect to the target server, that IP won't resolve backwards or ping here, so i'm going to assume it's an internal IP (use a proper restricted class C or above please). Check your mail relay server is functioning correctly.

solent
05-16-2003, 07:37 AM
no i am using a public internet ip class c network.

i just put the private ip over there casuse i dont want to give out my ip address.

that aint my problem.

Winkie
05-16-2003, 07:41 AM
Right, which machine are you getting the error on? Your internet connected relay or your final destination machine?

solent
05-16-2003, 07:43 AM
i get the mail error message back from the internet sendmail machine. which means that the internet mail server is actually accepting e-mails for my domain and is actually trying to relaying/forward them to my MTA server.

right?

so the mail error posted above was generated and send to back to me from the internet mail server.

thanks winkie for replying.

so do you have any suggestions to make?

Winkie
05-16-2003, 08:06 AM
Riiiight, ok, so the 172. IP you posted there would actually be your IP connected to the internet?

solent
05-16-2003, 08:07 AM
yes the 172 is actually a

212.xx.xx.xxx/29 network.

Winkie
05-16-2003, 08:08 AM
Right ok, your local mail server, is it behind a firewall or NAT of any kind?

solent
05-16-2003, 08:12 AM
yes my local mailserver is behind a firewall and all smtp traffic is blocked.

my domain mx records are as follows.

mx 10 212.31.97.197
mx 20 mail-relay.domain.com

so when someone send an email address to my domain which is g-spot.com.cy then the email trys to go to mx 10. sinces mx 10 is blocked and cannot receive emails then it goes to the mx 20 right?

so mx 20 then forwards this mail with mailertable for g-spot.com.cy => 212.31.97.197

and then is my error message. for some reason i get the error message that i have posted above.

and i am asking which command do i need to put in my mx 10 to accept email for my g-spot.com.cy domain forwarded from mail-relay.domain.com ???


thanks

Winkie
05-16-2003, 08:22 AM
Ok, let me try and get this straight.

You have a DNS server set up somewhere with those records.
The internet path to that IP address (212.31.97.197) has a firewall restricting traffic on port 25
The other machine (mail-relay.domain.com) is unblocked and will accept mail

How is the mail relay server supposed to connect to that IP address? I've got a feeling that connection is being blocked.

solent
05-16-2003, 08:24 AM
you got it.

no connections between the 2 mail servers are ok. because then i would have get another message and that would be the time out message as the mail-relay.domain.com server wouldnt even manage to establish a connection at port 25 with my mail server.

relaying problem again i would have got the relaying error.

Winkie
05-16-2003, 08:42 AM
even manage to establish a connection at port 25 with my mail server.
It's not, "Connection refused", that means whatever is on that address has sent a packet back (FIN?) stating that that port is closed and not accepting connections

if you have ssh, telnet, console or terminal access in any way to the relay box, try "telnet 212.31.97.197 25" or "telnet 212.31.97.197:25" .. see what you get. If you get a prompt, type 'HELO' and enter.

Winkie
05-16-2003, 08:46 AM
After googling breifly, this might help you:

http://www.tek-tips.com/gviewthread.cfm/lev2/3/lev3/15/pid/14/qid/496683

It appears the init script for the new sendmail RPMs is bugged, that would cause sendmail to not be running, and to also provide that message.

solent
05-16-2003, 09:00 AM
Originally posted by Winkie
After googling breifly, this might help you:

http://www.tek-tips.com/gviewthread.cfm/lev2/3/lev3/15/pid/14/qid/496683

It appears the init script for the new sendmail RPMs is bugged, that would cause sendmail to not be running, and to also provide that message.


that aint my problem because my php application is able to send mails. and i am able to send and receive mails from local accounts. for example if i send an email from the linux box using root to a local users in the linux box then it works.

the problem is when someone sends an email froma an outside ip address somewhere my sendmail is rejecting those emails.

Winkie
05-16-2003, 09:34 AM
In that case i'd definately check that there's no firewall in the way or similar, that's hte only problem I can think of.

Naes
05-19-2003, 06:05 PM
Originally posted by solent
yes my local mailserver is behind a firewall and all smtp traffic is blocked.

my domain mx records are as follows.

mx 10 212.31.97.197
mx 20 mail-relay.domain.com

so when someone send an email address to my domain which is g-spot.com.cy then the email trys to go to mx 10. sinces mx 10 is blocked and cannot receive emails then it goes to the mx 20 right?

so mx 20 then forwards this mail with mailertable for g-spot.com.cy => 212.31.97.197

and then is my error message. for some reason i get the error message that i have posted above.

and i am asking which command do i need to put in my mx 10 to accept email for my g-spot.com.cy domain forwarded from mail-relay.domain.com ???


thanks

You pretty much answered your own question. You have port 25 blocked at the perimiter for the g-spot.com.cy server. You are correct that when the MX record for g-spot.com.cy gets blocked external mail servers will try the priority 20 record. This server will then try to connect to g-spot.com.cy at port 25. Which is still blocked. You need to open your firewall to ONLY accept port 25 connections (at the perimiter) from the server you have set at priority 20.

Mailing to / from local users on the same box doesn't matter as the mail never leaves the local machine. Sendmail will understand that when you mail luser@localbox it delivers locally. From what you have posted here the problem lies in that you are blocking all external port 25 connections to your server. You need to open your firewall to take connections on port 25 from the server you have set to priority 20.

microsol
05-20-2003, 05:27 AM
Originally posted by solent
that aint my problem because my php application is able to send mails. and i am able to send and receive mails from local accounts. for example if i send an email from the linux box using root to a local users in the linux box then it works.

the problem is when someone sends an email froma an outside ip address somewhere my sendmail is rejecting those emails.

Sendmail does not have to be running to send email FROM the local box. ;)
If sendmail is not receiving emails from the outsite (Port 25) then your firewall blocks it or sendmail is not running, easy as that.