Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Thread Tools Display Modes
Old 29th August 2013, 03:56
electronico_nc electronico_nc is offline
Join Date: Oct 2012
Posts: 68
Thanks: 13
Thanked 7 Times in 7 Posts
Default email global content filters insert into MySQL

( stable installed from tar.gz)
Hi all,

I need to insert a lot of efficient rules to postfix header/body/mime checks.
I just would like to know if I can SAFELY run a script to insert them into MySQL (so there won't be anything wrong with future ISPConfig updates).

On my other (than ISPConfig) servers I have files like :
/^Subject:(.*)beast/   REJECT   X-Rated Subject Line
/^Subject:(.*)bitch/   REJECT   X-Rated Subject Line
/^Subject:(.*)bodies/   REJECT   X-Rated Subject Line
/^Subject:(.*)breast/   REJECT   X-Rated Subject Line
/^Subject:(.*)fuck/   REJECT   X-Rated Subject Line
/^Subject:(.*)galore/   REJECT   X-Rated Subject Line
/^Subject:(.*)gay/   REJECT   X-Rated Subject Line
/^Subject:(.*)porn/   REJECT   X-Rated Subject Line
So I would like to parse file and proceed to :
`/usr/bin/mysql $SQL_ARGS INSERT INTO mail_content_filter
I'm not asking anything about the above script but about the method to insert rules in ISPConfig (as I have hundreds to add).
Thanks in advance for your time.
Reply With Quote
Sponsored Links
Old 29th August 2013, 09:43
till till is offline
Super Moderator
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 37,022
Thanks: 840
Thanked 5,655 Times in 4,464 Posts

The rules will show up in the interface but get ignored. ISPConfig wont write the rules to the config files if you dont create a valid ispconfig tranaction in sys_datalog for them.

If you want to write data correctly to the ispconfig database, use the datalogInsert() function from the ispconfig mysql class to insert the data into the ispconfig database.
Till Brehm
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote


email filter content

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
MySQL Error Nolan Installation/Configuration 13 27th November 2014 06:04
Squirrelmail login failure Cracklefish Installation/Configuration 9 30th June 2010 21:38
using mysql with postfix - adding/deleting email to an mailalias zaag HOWTO-Related Questions 1 20th October 2006 17:08
Multiple MySQL Queries - with Postfix-mysql, courier-authmysql, maildrop-mysql... snowfly HOWTO-Related Questions 4 7th July 2006 05:19
email forwarding locally consumes all resources rdells General 20 1st May 2006 20:43

All times are GMT +2. The time now is 00:26.

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