PHP Email

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jerry Stuckle

    #16
    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@attg lobal.netwrote:
    : 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.
    >



    >
    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@attgl obal.net
    =============== ===

    Comment

    • Max

      #17
      Re: PHP Email

      Thank you for your posts. I appreciate your feeback.

      I agree that PHP can connect to any port and SMTP port 25 is not an
      issue.
      What I want to accomplish is - instead of sending emails using
      standard route (MX pointer): 111.111.111.111 -121.121.121.121 ->
      222.222.222.222

      I want to bypass that so that mail sent by PHP mail() function will be
      forwarded directly: 111.111.111.111 -222.222.222.222

      I will allow relay on 222.222.222.222 for 111.111.111.111 .

      I think it is possible to do on Windows machine by adding a record in
      lmhosts file.

      Can I do it on Linux, by rewriting php.ini or is it Qmail config?

      Comment

      • Jerry Stuckle

        #18
        Re: PHP Email

        Max wrote:
        Thank you for your posts. I appreciate your feeback.
        >
        I agree that PHP can connect to any port and SMTP port 25 is not an
        issue.
        What I want to accomplish is - instead of sending emails using
        standard route (MX pointer): 111.111.111.111 -121.121.121.121 ->
        222.222.222.222
        >
        I want to bypass that so that mail sent by PHP mail() function will be
        forwarded directly: 111.111.111.111 -222.222.222.222
        >
        I will allow relay on 222.222.222.222 for 111.111.111.111 .
        >
        I think it is possible to do on Windows machine by adding a record in
        lmhosts file.
        >
        Can I do it on Linux, by rewriting php.ini or is it Qmail config?
        >
        No, you can't do it by changing the PHP.INI file. On Linux you have to
        connect to a smtp server on that machine. And once PHP dumps the mail
        off to the MTA, there is nothing more it can do with it.

        You need to follow up in a newsgroup related to your MTA and/or Linux
        configuration. There isn't anything you can do with it in MySQL.

        But those would all be bypasses. You should get your ISP to modify it's
        MTA configuration to allow mail to be sent from your webserver also.

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

        Comment

        Working...