Hey there. My server has been running XAMPP for awhile, which includes Mercury. I recently decided to set up an SMTP server, and I seem to have gotten myself stuck.
My server is at IP 192.168.1.106 which maps to http://skoba.no-ip.org
In Configuration -> MercuryS SMTP Server -> Announce myself as, I put "skoba.no-ip.org" and for IP interface to use, I put "127.0.0.1". Also, on the next tab, I unchecked 'do not permit SMTP relaying' for now. In "Mercury Core Module" settings, I have internet name set to "skoba.no-ip.org" and username of postmaster set to "J Skoba". The rest of the settings are at their default.
These are a few lines from my php.ini file:
[quote]
; For Win32 only.
SMTP = skoba.no-ip.org
smtp_port = 25
; For Win32 only.
;sendmail_from = admin@skoba.no-ip.org[/quote]
When I use the mail function in a php file, I get "Failed to connect to mailserver at "skoba.no-ip.org" port 25, verify your "SMTP" and "smtp_port" setting in php.ini"
What am I doing wrong?
[quote user="SpikedCola"]
Hey there. My server has been running XAMPP for awhile, which includes Mercury. I recently decided to set up an SMTP server, and I seem to have gotten myself stuck.
My server is at IP 192.168.1.106 which maps to http://skoba.no-ip.org[/quote]192.168.1.106 is the private ip of your server.
http://skoba.no-ip.org resolves to your public ip, currently 99.225.198.44[quote]
In Configuration -> MercuryS SMTP Server -> Announce myself as, I put "skoba.no-ip.org"[/quote]Good[quote] and for IP interface to use, I put "127.0.0.1".[/quote] That means that MercS can only be contacted by the machine it is running on, and only on the loopback ip..[quote] Also, on the next tab, I unchecked 'do not permit SMTP relaying' for now.[/quote]Good.[quote] In "Mercury Core Module" settings, I have internet name set to "skoba.no-ip.org" [/quote]Good.[quote]and username of postmaster set to "J Skoba"[/quote]This must be the username of an existing local user[quote]. The rest of the settings are at their default.[/quote]XAMPP defaults do not usually result in a usable system.[quote]
These are a few lines from my php.ini file:
[quote]
; For Win32 only.
SMTP = skoba.no-ip.org
smtp_port = 25
; For Win32 only.
;sendmail_from = admin@skoba.no-ip.org[/quote]
When I use the mail function in a php file, I get "Failed to connect to mailserver at "skoba.no-ip.org" port 25, verify your "SMTP" and "smtp_port" setting in php.ini"
What am I doing wrong?
[/quote]You are telling your php mailer to connect to an SMTP server at skoba.no-ip.org which is 99.225.198.44 which is not reachable from behind your router. You should set it to SMTP=127.0.0.1.Also read the help section on setting your "Local Domains" correctly, to answer your next question.
What do you mean, its not reachable behind my router? Port 25 is forwarded to 192.168.1.106, so any connections made to skoba.no-ip.org on port 25 should be forwarded to the server.
I changed SMTP in php.ini to "127.0.0.1" like you suggested, but I receive the same error of "Failed to connect to mailserver at "127.0.0.1" port 25". Ive tried changing "IP interface to use" to skoba.no-ip.org and to my public IP but I still get the same error.
Also, I read the help file on Local Domains (after downloading some update that allowed me to open an older help file) and added three entries, as per the examples:
[quote]skoba skoba
skoba skoba.no-ip.org
skoba [99.225.198.44] [/quote]
But I still receive the same error.
Have you checked the entrys on xampp\apache\logs\error.log ?
Do you use it with windows ?
if you use windows, do you use the normal Mail-function of php, or the sendmail-function ?
[quote user="SpikedCola"]
What do you mean, its not reachable behind my router? Port 25 is forwarded to 192.168.1.106, so any connections made to skoba.no-ip.org on port 25 should be forwarded to the server.[/quote]Yes, but only from outside your router, and you set MercS to listen only on 127.0.0.1 not 192.168.1.106[quote]
I changed SMTP in php.ini to "127.0.0.1" like you suggested, but I receive the same error of "Failed to connect to mailserver at "127.0.0.1" port 25". [/quote]What response do you get to "telnet 127.0.0.1 25" ? [quote] Ive tried changing "IP interface to use" to skoba.no-ip.org and to my public IP but I still get the same error. [/quote]You should probably leave that blank so MercS listens on ALL interfaces [quote]
Also, I read the help file on Local Domains (after downloading some update that allowed me to open an older help file) and added three entries, as per the examples:
[quote]skoba skoba
skoba skoba.no-ip.org
skoba [99.225.198.44] [/quote]
But I still receive the same error.
[/quote]I left IP Interface To Use blank, as you suggested.
[quote]C:\Users\J Skoba>telnet 127.0.0.1 25
Connecting To 127.0.0.1...Could not open connection to the host, on port 25: Con
nect failed [/quote]
To the previous person, I checked the log, but there is nothing in there relating to smtp or anything else that Im having trouble with. Also, here is the code Im using:
[quote]<?
$name=$_POST['name'];
$email=$_POST['email'];
$comments=$_POST['comments'];
$to="xxxxxxxxxx@hotmail.com";
$message="$name just filled in your comments form. They said:\n$comments\n\nTheir e-mail address was: $email";
if(mail($to,"Comments From Your Site",$message,"From: $email\n")) {
echo "Thanks for your comments.";
} else {
echo "There was a problem sending the mail. Please check that you filled in the form correctly.";
}
?>[/quote]
EDIT Found the problem! The Current Status for both the SMTP server and client were showing as offline, so I went to "enter offline mode" then "leave offline mode" and both now show idle. The script now doesnt error anymore, but I get an error that says "Temporary error 249 (temporary MX resolution error) resolving 'hotmail.com'." I left 'name servers' blank as it said it could check the ones windows was set to use, but I get the above error. If I change it to "64.71.255.198", the DNS server my WAN interface is assigned, I get a different set of errors:
[quote]Resolved MX for 'hotmail.com' to 65.55.37.72
Connecting to 65.55.37.72
Connection error.
Attempting to connect to alternate, 65.55.37.88
Connection error on alternate
And it goes on to try a couple alternates[/quote]
From closing and starting again, Ive noticed that both the smtp client and smtp server always start in 'offline' mode. How do I get them to always be running?
EDIT 2: I also tried switching to the Mercury SMTP relaying client instead, but Mercury crashed whenever I sent it a mail with my script.
The Telnet test shows that something is blocking access to port 25 on your system. This could be the Windows firewall or some other software with firewall capabilities, perhaps an antivirus program.
/Rolf
[quote]From closing and starting again, Ive noticed that both the smtp client
and smtp server always start in 'offline' mode. How do I get them to
always be running?[/quote]
That is a known bug when using MercX (which you don't need), disable it and that prob will go away.
You have fixed your lookup issue by entering the ip of your DNS server.
For sending issue, if you are on a dynamic ip you should use MercC and configure it to use your ISP relay host with any authentication required.
Disabling MercX fixed the problem, thanks!
As for sending, is there any other way to do it, than using my ISP? I wont have access to that info for a few days (until my roommate gets home)
You just need an SMTP server to relay through, I believe gmail can be used with a bit of setting up, although I haven't done it there are posts about it on this forum.
Or you could use MercE if you are not sending to domains that block dynamic ip's.
By domains that block dynamic IPs, Im assuming you mean the error I had with hotmail earlier? Because when I switch to The SMTP End-to-End Client, I can resolve the MX's for hotmail but I get a connection error on every one.
EDIT: After some Googling, I found this page: http://wiki.slicehost.com/doku.php?id=lightweight_mail_relay_to_google_apps_or_gmail_smtp_server which gave me all the gmail settings I would need to enter. I recovered the password and dusted off my old gmail account, and it works! Since this seems to do what I want, I think I will stick with it. Thank you all so much for your help!
EDIT 2: I dont suppose that with relaying, there is any way to mask the account on the relay server, and "fake" the email, if you will? Im trying to set up my own web server along with an smtp server, and I wanted to have the email show a custom "admin@whoever.com". My assumption is that no, it cant be changed, because its sending the message to a server who is re-sending it; its not simply passing through. If I wanted to have whatever I want for the email, I would need a static IP, so that the domain Im sending to doesnt block me?
AFAIK you can set gmail to relay whatever address you want, check out the gmail help.
[quote]I would need a static IP, so that the domain Im sending to doesnt block me?[/quote]
Having a static ip is no guarantee that some servers won't block you, there are some pretty severe rulesets on some servers.
Have a good read of the Merc help on SMTP relaying controls and make sure you set these so you are not an open relay. If your server starts spewing spam, you will be on lots of blacklists in a very short time and some are difficult to get off.
If you get a chance would you be able to look for that help article? I looked and only found information on how to add accounts you already own to gmail's interface, and how when relaying, it automatically adds the account it was relayed through as the reply-to email to prevent spam.
In reference to the static IP, is hotmail blocking me because I have a dynamic IP, or for some other reason? This is the error I get:
[quote]T 20091207 174529 4b1d84e1 Begin processing job MO001F64 from deathbyfire69@hotmail.com
W 20091207 174552 4b1d84e1 Error connecting to primary server '65.55.37.120'.
W 20091207 174614 4b1d84e1 Error connecting to alternate server '65.55.37.72'.
W 20091207 174636 4b1d84e1 Error connecting to alternate server '65.55.92.136'.
W 20091207 174658 4b1d84e1 Error connecting to alternate server '65.55.37.120'.
E 20091207 174658 4b1d84e1 Processing of job MO001F64 incomplete or failed.[/quote]
Also, Ive read that Rogers blocks outgoing port 25 traffic, which could also explain my problems (when I relayed through Gmail, it wasnt on port 25).
[quote user="SpikedCola"]
If you get a chance would you be able to look for that help article?[/quote]No [:)] I don't use it and have no need (or time) to find out[quote]
In reference to the static IP, is hotmail blocking me because I have a dynamic IP, or for some other reason? This is the error I get:
[quote]T 20091207 174529 4b1d84e1 Begin processing job MO001F64 from deathbyfire69@hotmail.com
W 20091207 174552 4b1d84e1 Error connecting to primary server '65.55.37.120'.
W 20091207 174614 4b1d84e1 Error connecting to alternate server '65.55.37.72'.
W 20091207 174636 4b1d84e1 Error connecting to alternate server '65.55.92.136'.
W 20091207 174658 4b1d84e1 Error connecting to alternate server '65.55.37.120'.
E 20091207 174658 4b1d84e1 Processing of job MO001F64 incomplete or failed.[/quote]
[/quote]Turn on session logging for MercE for a complete transcript of the SMTP session (turn it off again after).
Also you could try telnet as a test.[quote]
Also, Ive read that Rogers blocks outgoing port 25 traffic, which could also explain my problems (when I relayed through Gmail, it wasnt on port 25).
[/quote]Yes that would be a problem for using MercE.After talking to tech support, I found out that they do indeed block outbound port 25 traffic as a spam prevention method. After fiddling around with the POP3 server, I have got it working and set up my own admin@whoever.com email, and had it authorized by my Rogers email relay server, so now I can send and receive from the alias Id like! Really happy to see it working.
I do have one further question; I am trying to use Windows Live Mail to access the mailbox of the admin account on my mail server (Im using WLM because it supports my free hotmail account). I can fetch mail just fine, but if I try to send outgoing mail, it gives me an error, saying "the server does not support an ssl connection.
Server Error: 250
Server Response: 250 HELP
Server: 192.168.1.106 (I used my local IP to make sure it wasnt a port forwarding issue)
Protocol: SMTP
Port: 25
Secure(SSL): Yes"
I opened the configuration for MercuryS and on the SSL tab, created a certificate, and enabled SSL. However, I still receive the same error, even after restarting Mercury. Is there more to enabling SSL?
EDIT I looked up the error code and found out that Microsoft uses TLS, which I assume isnt supported, and causes this error. I found the checkbox to disable SSL on the outgoing server, and everything is working now! Thanks again to all those that helped!
I use SSL (STARTTLS) with (wireless) Thunderbird clients without issue. The problems seem to be with MS clients mostly, although the old 'direct SSL' method has been enabled in MercP & I to allow these to work as per this thread.
It's probably a bit pointless if you are on a private / wired LAN as the mail is transmitted between downstream servers in plain text anyway. [:|]
[quote user="dilberts_left_nut"]It's probably a bit pointless if you are on a private / wired LAN as the mail is transmitted between downstream servers in plain text anyway. [:|] [/quote]
Some sites use it not to protect the message, but just to protect their passwords, which for both these protocols are sent in plain text.
Your previous draft for topic is pending
If you continue, your previous draft will be discarded.