Email Accounts

Discussion in 'Developers' Forum' started by alexillsley, Mar 29, 2007.

  1. alexillsley

    alexillsley New Member

    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
     
  2. falko

    falko Super Moderator Howtoforge Staff

    If you leave this out, you will get errors on some distributions (whereas others work). I remember that RedHat made problems without these lines.

    This would just affect the creation of the procmail recipes, but not the creation of the email account.
     
  3. alexillsley

    alexillsley New Member

    So if i removed those lines on my opensuse server it would not create email accounts when you create an ISP user? Without errors?
     
  4. falko

    falko Super Moderator Howtoforge Staff

    It would create email accounts, but without procmail recipes, and you might get some error messages if you use mbox.
     
  5. alexillsley

    alexillsley New Member

    What can i remove from that file to stop it creating email accounts?
     
  6. falko

    falko Super Moderator Howtoforge Staff

    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:
    function make_local_host_names() {
      return 
    true;
    }
     
  7. alexillsley

    alexillsley New Member

    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?
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    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?
     
  9. alexillsley

    alexillsley New Member

    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
     
  10. falko

    falko Super Moderator Howtoforge Staff

  11. till

    till Super Moderator Staff Member ISPConfig Developer

  12. alexillsley

    alexillsley New Member

    Thanks, ill use that if i cant get it to work myself
     

Share This Page