
29th March 2007, 00:02
|
|
Senior Member
|
|
Join Date: Dec 2006
Posts: 396
Thanks: 27
Thanked 3 Times in 3 Posts
|
|
Email Accounts
Would doing the following stop ispconfig from creating email accounts when creating isp users:
Remove the following sections from config.inc.php in user_insert() function:
Code:
// User-Mail-Datei anlegen, sonst evtl. Fehler bei Autoresponder
if(!$mod->system->server_conf["use_maildir"]){
if(!is_file("/var/spool/mail/".$user_username)){
$mod->log->phpcaselog(touch("/var/spool/mail/".$user_username), "create /var/spool/mail/".$user_username, $this->FILE, __LINE__);
$mod->log->caselog("chown $user_username:mail /var/spool/mail/$user_username &> /dev/null", $this->FILE, __LINE__);
$mod->log->caselog("chmod 600 /var/spool/mail/$user_username", $this->FILE, __LINE__);
}
}
Code:
// Mailquota, Autoresponder etc. einrichten
$mod->procmail->make_forward($doc_id);
$mod->procmail->make_procmailrc($doc_id);
$mod->procmail->make_recipes($doc_id);
Would this work?
Thanks,
Alex
|

29th March 2007, 14:43
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,592 Times in 2,443 Posts
|
|
Quote:
|
Originally Posted by alexillsley
Would doing the following stop ispconfig from creating email accounts when creating isp users:
Remove the following sections from config.inc.php in user_insert() function:
Code:
// User-Mail-Datei anlegen, sonst evtl. Fehler bei Autoresponder
if(!$mod->system->server_conf["use_maildir"]){
if(!is_file("/var/spool/mail/".$user_username)){
$mod->log->phpcaselog(touch("/var/spool/mail/".$user_username), "create /var/spool/mail/".$user_username, $this->FILE, __LINE__);
$mod->log->caselog("chown $user_username:mail /var/spool/mail/$user_username &> /dev/null", $this->FILE, __LINE__);
$mod->log->caselog("chmod 600 /var/spool/mail/$user_username", $this->FILE, __LINE__);
}
}
|
If you leave this out, you will get errors on some distributions (whereas others work). I remember that RedHat made problems without these lines.
Quote:
|
Originally Posted by alexillsley
Code:
// Mailquota, Autoresponder etc. einrichten
$mod->procmail->make_forward($doc_id);
$mod->procmail->make_procmailrc($doc_id);
$mod->procmail->make_recipes($doc_id);
|
This would just affect the creation of the procmail recipes, but not the creation of the email account.
|

29th March 2007, 16:52
|
|
Senior Member
|
|
Join Date: Dec 2006
Posts: 396
Thanks: 27
Thanked 3 Times in 3 Posts
|
|
So if i removed those lines on my opensuse server it would not create email accounts when you create an ISP user? Without errors?
|

30th March 2007, 15:26
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,592 Times in 2,443 Posts
|
|
It would create email accounts, but without procmail recipes, and you might get some error messages if you use mbox.
|

30th March 2007, 16:26
|
|
Senior Member
|
|
Join Date: Dec 2006
Posts: 396
Thanks: 27
Thanked 3 Times in 3 Posts
|
|
What can i remove from that file to stop it creating email accounts?
|

31st March 2007, 14:37
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,592 Times in 2,443 Posts
|
|
Edit /root/ispconfig/scripts/lib/classes/ispconfig_postfix.lib.php or ispconfig_sendmail.lib.php (depending on your MTA) and replace the contents of each function with
e.g.
PHP Code:
function make_local_host_names() {
return true;
}
|
|
The Following User Says Thank You to falko For This Useful Post:
|
|

31st March 2007, 15:41
|
|
Senior Member
|
|
Join Date: Dec 2006
Posts: 396
Thanks: 27
Thanked 3 Times in 3 Posts
|
|
Hi,
I want disable email accounts for certain users, i had a look through that file and saw the function make_virtualuserstable() It did a mysql query for users. If i was to make another collum in the sql e.g use_mail and modify the SQL query to only get users with the a 1 in the use_mail collum would this work?
|

1st April 2007, 12:21
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,896
Thanks: 693
Thanked 4,192 Times in 3,208 Posts
|
|
Yes ,this might work. But why dont you use just the SVN version where disabling for FTP service and the selection of email domains is already included if you just want to disable email for some users?
|
|
The Following User Says Thank You to till For This Useful Post:
|
|

1st April 2007, 12:56
|
|
Senior Member
|
|
Join Date: Dec 2006
Posts: 396
Thanks: 27
Thanked 3 Times in 3 Posts
|
|
Can you show me a screen shot of what the create user page looks like off SVN?
If i used the one off SVN would i be able to replace only a few files as i have modfied ISPConfig quite a bit?
How do you connect to SVN?
Also where is the file that processes the data posted from ISPConfig user form?
Thanks,
Alex
|

1st April 2007, 19:44
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,592 Times in 2,443 Posts
|
|
Quote:
|
Originally Posted by alexillsley
How do you connect to SVN?
|
Download this file instead: http://prdownloads.sourceforge.net/i...ar.gz?download
|
|
The Following User Says Thank You to falko For This Useful Post:
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +2. The time now is 18:08.
|
|
Recent comments
8 hours 56 min ago
18 hours 24 min ago
19 hours 14 min ago
22 hours 47 min ago
1 day 3 hours ago
1 day 3 hours ago
1 day 5 hours ago
1 day 15 hours ago
1 day 20 hours ago
1 day 22 hours ago