Pegasus Mail & Mercury

Welcome to the Community for Pegasus Mail and
The Mercury Mail Transport System, the Internet's longest-serving PC e-mail system!
Welcome to Pegasus Mail & Mercury Sign in | Join | Help
in
Home Blogs Forums Downloads Pegasus Mail Overview Mercury Overview Wiki

New To Mercury, Cant Seem To Send Mail

Last post 12-09-2009, 5:29 by SpikedCola. 21 replies.
Page 1 of 2 (22 items)   1 2 Next >
Sort Posts: Previous Next
  •  12-05-2009, 5:09

    New To Mercury, Cant Seem To Send Mail

    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:

    ; For Win32 only.

    SMTP = skoba.no-ip.org

    smtp_port = 25


    ; For Win32 only.

    ;sendmail_from = admin@skoba.no-ip.org

     

     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? 

  •  12-05-2009, 8:15

    Re: New To Mercury, Cant Seem To Send Mail

    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

    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

     

    In Configuration -> MercuryS SMTP Server -> Announce myself as, I put "skoba.no-ip.org"

    Good
    and for IP interface to use, I put "127.0.0.1".
    That means that MercS can only be contacted by the machine it is running on, and only on the loopback ip..
    Also, on the next tab, I unchecked 'do not permit SMTP relaying' for now.
    Good.
    In "Mercury Core Module" settings, I have internet name set to "skoba.no-ip.org"
    Good.
    and username of postmaster set to "J Skoba"
    This must be the username of an existing local user
    . The rest of the settings are at their default.
    XAMPP defaults do not usually result in a usable system.

    These are a few lines from my php.ini file:

    ; For Win32 only.

    SMTP = skoba.no-ip.org

    smtp_port = 25


    ; For Win32 only.

    ;sendmail_from = admin@skoba.no-ip.org

     

     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? 

    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.


  •  12-05-2009, 17:35

    Re: New To Mercury, Cant Seem To Send Mail

    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:

    skoba    skoba

    skoba    skoba.no-ip.org

    skoba    [99.225.198.44] 

    But I still receive the same error. 

  •  12-05-2009, 20:15

    • Jörg is not online. Last active: 02-07-2011, 13:57 Jörg
    • Top 500 Contributor
    • Joined on 07-25-2009
    • Kiel
    • Member
    • Points 275

    AW: Re: New To Mercury, Cant Seem To Send Mail

    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 ?


    Greetings from Kiel

    Jörg
  •  12-05-2009, 21:26

    Re: New To Mercury, Cant Seem To Send Mail

    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.

    Yes, but only from outside your router, and you set MercS to listen only on 127.0.0.1 not 192.168.1.106

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

    What response do you get to "telnet 127.0.0.1 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.
    You should probably leave that blank so MercS listens on ALL interfaces

    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:

    skoba    skoba

    skoba    skoba.no-ip.org

    skoba    [99.225.198.44] 

    But I still receive the same error. 

  •  12-06-2009, 17:42

    Re: New To Mercury, Cant Seem To Send Mail

    I left IP Interface To Use blank, as you suggested. 

    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 

    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:

    <?

    $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.";

    }

    ?>

     

     

    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:

    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

     

    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. 

  •  12-06-2009, 17:51

    • Rolf Lindby is not online. Last active: 2017-03-28, 3:34 Rolf Lindby
    • Top 10 Contributor
    • Joined on 05-08-2007
    • Stockholm, Sweden
    • SuperStar
    • Points 25,330
    • BetaTeam Moderator SystemAdministrator

    Re: New To Mercury, Cant Seem To Send Mail

    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 

  •  12-06-2009, 18:04

    Re: New To Mercury, Cant Seem To Send Mail

    Heya Rolf, I found the reason that was happening, please check my edit. Thanks!
  •  12-06-2009, 20:32

    Re: New To Mercury, Cant Seem To Send Mail

    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?

    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.

  •  12-07-2009, 4:59

    Re: New To Mercury, Cant Seem To Send Mail

    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) 

  •  12-07-2009, 7:38

    Re: New To Mercury, Cant Seem To Send Mail

    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.

  •  12-07-2009, 20:20

    Re: New To Mercury, Cant Seem To Send Mail

    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?

  •  12-07-2009, 23:00

    Re: New To Mercury, Cant Seem To Send Mail

    AFAIK you can set gmail to relay whatever address you want, check out the gmail help.

    I would need a static IP, so that the domain Im sending to doesnt block me?

    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.

  •  12-07-2009, 23:58

    Re: New To Mercury, Cant Seem To Send Mail

    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:

    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.

     

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

  •  12-08-2009, 1:10

    Re: New To Mercury, Cant Seem To Send Mail

    SpikedCola:

    If you get a chance would you be able to look for that help article?

    No Smile I don't use it and have no need (or time) to find out

    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:

    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.

     

    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.


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

    Yes that would be a problem for using MercE.
Page 1 of 2 (22 items)   1 2 Next >
View as RSS news feed in XML

Contact | Advertise | Host provider: PraktIT | Terms of Use | Privacy Statement
Copyright © 2007-2011 David Harris / Peter Strömblad. | Pegasus Mail Home Page