Re: PHP Email



Jim Carlock wrote:
Max wrote:
Our mail server accepts emails from the webserver. Our emails are
going through default MX records, which point to our ISP server, which
does relay emails to our mail server. Simply put, I want to bypass the
MX record (which points to the ISP server's SPAM filter, which works
for us for all other mail, we have no control over)

"Jerry Stuckle" <jstucklex@xxxxxxxxxxxxx> wrote:
: In that case you'd have to look at your Unix/Linux configuration. PHP
: knows nothing about MX records.

MX is pure DNS. It points to a mail server which usually opens port
25 up for SMTP and port 110 for POP3. PHP tends to run under an
Apache server which in turn opens port 80, unless one configures
weird/different things with port numbers.

Note, every IP address includes a port number, and a full connect
cannot be established without supplying the 5th element of the IP
address (the port number).

11.11.11.11:80 is a different IP address than 11.11.11.11:25.

When an SMTP server wants to relay mail to your mail server, it
issues an MX (DNS) query. PHP runs underneath Apache, but
I thought I read something somewhere that PHP can make and
accept connections on other ports. Perhaps, I'm getting it mixed
up with some Perl things I've read?


Sure, PHP can make and accept connections on other ports. It has nothing to do with running under Apache. But PHP knows nothing about MX records.

In fact, it knows nothing about A records, either. All it knows it it can connect to a server by name, TCP/IP performs the DNS lookup transparently.

Anyways, that tends to be the way I think of it all. Please correct
me if anything I've stated is wrong.

http://us2.php.net/manual/en/ref.sockets.php
http://us2.php.net/manual/en/function.socket-bind.php
http://us2.php.net/manual/en/function.fsockopen.php

It almost appears that PHP can become a fully functional SMTP
server and/or POP3/IMAP server.


It could be. But there's no implementation - and I suspect there never will be. A SMTP server is quite complex. A POP3/IMAP server is less so, but still complicated. Both would be quite slow in any interpreted language.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@xxxxxxxxxxxxx
==================
.



Relevant Pages

  • RE: Security Certificate Issue
    ... If the mail server names is not the same as the CN on the ... Interface to run an email settings check. ... SMTP port to 465. ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)
  • Re: Cant change password for outbound mail!
    ... I have 1) reconfigured Exchange to use port 2525, ... forwarded 2525 to our server, and 3) our firewall on the server allows ... ISP will not allow us to relay mail through their mail server ...
    (microsoft.public.windows.server.sbs)
  • Re: Fining source of email messages relaying through Exchange Serv
    ... Originally I was getting NDR messages for emails with spam subjects sent to ... my admin mailbox once port 25 was blocked by my ISP. ... I have since paused the SMTP server and discovered that the messages are ... I stopped forwarding port 25 traffice to my mail server and I ...
    (microsoft.public.exchange.admin)
  • Re: Port 25 blocking problem
    ... You might want to post this to a server group or one for networking. ... Outlook is not a part of this problem. ... I had them telnet to the mail server on port 25 and no one ... Everyone can telnet to port 110. ...
    (microsoft.public.outlook)
  • Re: recieving but no sending
    ... You can't go changing port numbers or settings for a mail server unless ... The best way to find out about things like Gmail is to Google it. ... Gmail uses port 465 for SMTP, which is not blocked like port 25 is. ...
    (microsoft.public.windows.vista.mail)