Re: SMTP over SSH via PHP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Rodolfo J. Paiz wrote:

At 09:19 3/18/2004, you wrote:

Can anyone provide a cookbook idea to create a socket/tunnel where by I can use SSH to talk to the SMTP server on the Linux staging box?


Isn't this what the "stunnel" package helps you do? I think it's there to SSL-encrypt other data streams like SMTP, and I'm sure it could be made to communicate via the SSH port. Check the docs for it.



Not exactly what I need.


Here's an idea of the configuration.


DMZ | LAN | win2k.host | linux.host:25 | +--------------+ [webserver] PHP > SMTP-| | o mail server | | +--------------+


I'm only allowed to SSH over the DMZ to the LAN


What I'm after is:

	DMZ            |         LAN
                       |
      win2k.host       |      linux.host:25
                   sshsshssh  +--------------+
    [webserver] PHP-> SMTP--->o  mail server |
                   sshsshssh  +--------------+
                       |



Remember, my webservers are running W2K with cygwin.

I need my php script to possibly call a simple SSH tunnelling script.

I'm hacking something I found at http://www.slac.com/~mpilone/projects/kde/kmailssh/

This looks like the ticket, only I'll be:

-L 25:$SSH_MAIL_SERVER:25 in the ssh command. But I need this to be called by PHP I think. The problem as I see it is the PHP script calls the PHP mail() function which in turn uses properties defined in the php.ini file, such as SMTP = your.smtp.host.here

Can I define a script there? That would be the ideal.

Any further ideas are greatly appreciated! Thanks!

Tim




-- redhat-list mailing list unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux