Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > Developers' Forum

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 29th March 2007, 00:02
alexillsley alexillsley is offline
Senior Member
 
Join Date: Dec 2006
Posts: 396
Thanks: 27
Thanked 4 Times in 4 Posts
Default 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
Reply With Quote
Sponsored Links
  #2  
Old 29th March 2007, 14:43
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,739 Times in 2,574 Posts
Default

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.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 29th March 2007, 16:52
alexillsley alexillsley is offline
Senior Member
 
Join Date: Dec 2006
Posts: 396
Thanks: 27
Thanked 4 Times in 4 Posts
Question

So if i removed those lines on my opensuse server it would not create email accounts when you create an ISP user? Without errors?
Reply With Quote
  #4  
Old 30th March 2007, 15:26
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,739 Times in 2,574 Posts
Default

It would create email accounts, but without procmail recipes, and you might get some error messages if you use mbox.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 30th March 2007, 16:26
alexillsley alexillsley is offline
Senior Member
 
Join Date: Dec 2006
Posts: 396
Thanks: 27
Thanked 4 Times in 4 Posts
Question

What can i remove from that file to stop it creating email accounts?
Reply With Quote
  #6  
Old 31st March 2007, 14:37
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,739 Times in 2,574 Posts
Default

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
Code:
return true;
e.g.

PHP Code:
function make_local_host_names() {
  return 
true;

__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
The Following User Says Thank You to falko For This Useful Post:
alexillsley (1st April 2007)
  #7  
Old 31st March 2007, 15:41
alexillsley alexillsley is offline
Senior Member
 
Join Date: Dec 2006
Posts: 396
Thanks: 27
Thanked 4 Times in 4 Posts
Default

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?
Reply With Quote
  #8  
Old 1st April 2007, 12:21
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,704
Thanks: 819
Thanked 5,321 Times in 4,174 Posts
Default

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?
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
The Following User Says Thank You to till For This Useful Post:
alexillsley (1st April 2007)
  #9  
Old 1st April 2007, 12:56
alexillsley alexillsley is offline
Senior Member
 
Join Date: Dec 2006
Posts: 396
Thanks: 27
Thanked 4 Times in 4 Posts
Question

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
Reply With Quote
  #10  
Old 1st April 2007, 19:44
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,739 Times in 2,574 Posts
 
Default

Quote:
Originally Posted by alexillsley
How do you connect to SVN?
Download this file instead: http://prdownloads.sourceforge.net/i...ar.gz?download
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
The Following User Says Thank You to falko For This Useful Post:
alexillsley (2nd April 2007)
Reply

Bookmarks

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
email accounts created with user name jlorenzo Installation/Configuration 7 30th August 2006 08:58
Non /etc/passwd email accounts ezgoen General 1 3rd July 2006 09:52
email forwarding locally consumes all resources rdells General 20 1st May 2006 19:43


All times are GMT +2. The time now is 04:11.


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