Old 11th March 2009, 11:31
mccyberix mccyberix is offline
Join Date: Aug 2006
Posts: 74
Thanks: 0
Thanked 1 Time in 1 Post
Default Adding a PHP Function?

I try to customize ISPConfig 2.x to be able to insert Records to a MySQL DB on a remote Server which serves as an Antivirus/Antispam Mailgateway. I hope someone can put me in the right Direction. Iím running 2 Servers one as the Primary Mailserver without ISPConfig (Frontend Server). The second Server is equipped with ISPConfig.

The Frontend Server is running Postfix, Spamassassin and Greylisting in Virtual User/Domain Mode, the Server receive the Mails scan them for Viruses and Spam and forwards only the clean ones to the Backendserver

The Backend Server is running ISPConfig 2 and is the Mainpoint for adding/editing of the Domains and Useraccounts.

The Problem is when I add a new Domain/User (using ISPConfig) on the Backend Server I have to edit manually the DB on the Frontend server which stores the Virtual Domain/User Data otherwise the Mails will be rejected since the Frontend Server is the first MX Record.

My Idea is to adopt the ISPConfig Functions with a little PHP Script which will connect to the MySQL DB on the Frontend Server and adds the required Records to the DB. I have already figured out how to use the Form Designer of ISPConfig to create the needed Form. But I canít figure out how to hook up my PHP Script to the Form I have created in ISPConfig Formdesigner. I thought I can add my Script with the include() function to the File which will be called after submitting the Form but Iím only able to connect to the db_ispconfig DB and even if I create a new Table in it I get the Error that the Table not exists. Maybe can someone give me some hints how to solve this problem or just put me in the right DirectionÖ

THX in advance
Reply With Quote
Sponsored Links
Old 11th March 2009, 15:24
id10t id10t is offline
Senior Member
Join Date: Nov 2008
Posts: 242
Thanks: 2
Thanked 22 Times in 22 Posts

I'd write a script for the front end machine that will add the proper records. Then edit the ispconfig code to simply call that script via one of the php file handling functions and http(s) w/ either get or post args to provide the data to the script on the front end machine. If it will be crossing the internet, then use https or some sort of secret key/hash value like the md5 of the username appended a known to both scripts secret phrase.
Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ffmpeg Video support for ubuntu 7.10 [suphp-ispconfig] amaurib Installation/Configuration 13 16th February 2010 18:26
Freebsd 6.1 support misterm Installation/Configuration 10 9th April 2009 10:29
ISP Config hesitation when opening web pages frankb Installation/Configuration 7 15th December 2008 14:06
ispconfig php 5 errors itamarjp Installation/Configuration 8 25th April 2008 11:20
Apache2 Freezes celtic Server Operation 31 28th May 2007 18:18

All times are GMT +2. The time now is 06:53.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.