Установка Simplemail (аналог postfixadmin)

Здесь размещаем ссылки на некоммерческие ресурсы, посвященные серверу Postfix.
Писать в этот форум могут только зарегистрированные пользователи.

Модераторы: prefer, alexandrnew, ALex_hha, Roman, Axel

Ответить
ProFTP
С Postfix знаком...
С Postfix знаком...
Сообщения: 61
Зарегистрирован: 02 авг 2008, 03:06

Установка Simplemail (аналог postfixadmin)

Сообщение ProFTP » 14 янв 2009, 06:01

оцените документацию

Simple Mail Admin (management virtual domains)

(analogue postfixadmin)

Управление виртуальными доменами postfix/exim/etc

advantages:
1) for the page conclusion of information
2) possibility addition a few domains to the users
3) Ravines in real time (search to on by him /var/log/maillog)
4) extended mode of management users
5) HTML a code goes separately from scripts
6) objective the oriented programming, more flexible possibility of integration and use

failings:
1) it is not vacation (it will be)
2) It is not Fetchmail
...........

Download:

ftp://ftp.lissyara.su/users/ProFTP/simp ... 1.0.tar.gz
ftp://ftp.lissyara.su/users/ProFTP/simp ... in-1.0.zip
ftp://ftp.lissyara.su/users/ProFTP/simp ... min-1.0.7z

Код: Выделить всё

   Postfix / exim / etc,
   Apache 1.3.27 / etc,
   Perl (tested 5.8.8),
   MySQL, SQLite, etc (tested MySQL 5.0.67)
     
    Modules from perl:

   use HTML::Template;
   use Data::Validate::Domain;
   use Data::Validate::Email;
   use DBI;
   use DBD::MySQL;
   IO::Socket;
   use File::Pid;
   etc
   

   FreeBSD:
   cd /usr/ports/databases/p5-DBD-mysql50/ && make && make install clean
      (or /usr/ports/databases/p5-DBD-mysql51/)
         (or *)
         
   cd /usr/ports/www/p5-HTML-Template && make && make install clean
   
   cd /usr/ports/dns/p5-Data-Validate-Domain && make && make install clean
   
   cd /usr/ports/mail/p5-Data-Validate-Email && make && make install clean

   cd /usr/ports/devel/p5-File-Pid && make && make install clean
   
    etc         
                 


   It is needed to influence postfix/exim for work with virtual domains, 
   tuning practically identical as in postfixadmin

   http://high5.net/howto/
   http://sys-adm.org.ua/mail/mail-howto-p1.php
   http://www.lissyara.su/?id=1015
   http://google.com   

  Patch md5crypt cyrus-sasl:
  cyrus-sasl-2.1.22_md5patch_dist.rar: http://unixforum.org.ua


  Simple tuning apache:
  
  AddHandler cgi-script .cgi .pl
  DirectoryIndex index.pl
  <Directory /usr/local/www/simplemail>
    Options Indexes FollowSymLinks ExecCGI
  </Directory>
   &#40;configuration can will differ&#41;

  1. Extract files

   tar -zxvf simplemail-0.1.tgz
  
  2. We look and place rights for access if not correctly proposed

  $ cd /usr/local/www/simplemail
  $ chmod 640 *.pl *.ht*
  $ cd /usr/local/www/simplemail/scripts/
  $ chmod 640 *.pl .ht*
  $ cd /usr/local/www/simplemail/lib/
  $ chmod 640 *.pl .ht* *.pm
  $ cd /usr/local/www/simplemail/templates/
  $ chmod 640 *.css *.html
  $ cd /usr/local/www/simplemail/templates/images
  $ chmod 640 *.gif *.png

  $ cd /usr/local/www/simplemail
  
  $ chmod 750 index.pl
  $ chown www&#58;www index.pl
  
  &#40;or Suexes user which works&#41;

  $ cd /usr/local/www/simplemail/scripts

  $ chmod 700 maillog.pl 
  $ chown root&#58;wheel maillog.pl

  3. Creation of base and user 

   through phpmysql or in &#58;

  $ mysql -u root -p
 
  > use mysql
  > CREATE DATABASE IF NOT EXISTS mail_db;
  > GRANT ALL PRIVILEGES on mail_db.* to mail@localhost IDENTIFIED BY 'pass_mail_mysql';
  

  4. Configuration and placing of ways
    
  
  &#40;if way not /usr/local/www/simplemail/lib/config.pl
   it is needed to specify
  $ ee maillog.pl
  require "/home/...../simplemail/lib/config.pl";
   &#41;
  
   look /lib/config.pl for configuring
   enter information of MySQL, etc
     
  5. Install table, users
  
  # chmod 750 install.pl

  $./install.pl passwd_admin

  argument of passwd_admin the real password which will be used Admin,

  farther we pass on http&#58;//mydomain.tld/,
   
  if will not begin to work look that not so
  
   NOTE&#58; in the table of users necessarily there must be two lines with Guest and Admin,
  they must be created after the script of install.pl
  
  6. Crontab 
 
    */2 *   *   *   *  root  /usr/local/www/simplemail/scripts/maillog.pl
   
   &#40;If you start first time and if a log file &#40;/var/log/maillog&#41; is very large, 
   it is recommended to start with began with the cantilever of maillog.pl then to add in crontab&#41;
  
  7. Delete install.pl

     $ rm install.pl
     
  8. If will not begin to work ask, all other questions,
   development of existent and additional possibilities, etc&#58;
  
  http&#58;//unixforum.org.ua  
  http&#58;//unixforum.org.ua/index.php?topic=17604.0

=============================================
=============================================



Код: Выделить всё

use CGI&#58;&#58;Carp qw&#40;fatalsToBrowser&#41;;

%&#123;$se&#125; = &#40;

    # DB
    'db_name' => 'db',

    # user from db
    'db_user' => '',
    'db_pass' => '',
    'db_type' => 'mysql',
    'db_host' => 'localhost',

    # Way to the templates, by default primary way,
    # if you will change a way to to by templates, write a complete way
    # or     'dirt' => 'template/',

    'dirt' => '../template/',

    # url
    # 'url' => 'http&#58;//domain.ltd',

    # Maildir
    'maildir' => '/var/spool/mail/',

    #maillog file
    'maillog' => '/var/log/maillog',

    # User from which works transport of mta
    'transport_user' => 'virtual',

    # How many to destroy lines on a page
    'line_from_page' => '30',    # 1, or 1000++

# Time of life of cookies for an administrator and user.
# For an administrator with the purpose of safety of cookies not active, you can change
#        +30s                              30 seconds from now
#        +10m                              ten minutes from now
#        +1h                               one hour from now
#        -1d                               yesterday &#40;i.e. "ASAP!"&#41;
#        now                               immediately
#        +3M                               in three months
#        +10y                              in ten years time
#        Thursday, 25-Apr-1999 00&#58;40&#58;33 GMT  at the indicated time & date

    'time_cookie_admin' => '',        # +14d - 14 day, '' - Disable
    'time_cookie_users' => '+14d',    # +14d - 14 day, '' - Disable

    # To include viewing of statistics of dens
    'active_logsm' => '1',            # 1 - Enable, 0 - Disable

# A number of dens is in a table, old records on expiration of time will be remote
    'time_which_active_logsm' => '604800',    # sec &#40;7 day&#41;

    # to look over the ravines of postal server
    'active_logmta' => '1',                   # 1 - Enable, 0 - Disable

    #Number of lines in a table, which are written down with file ravine.
    #For the loaded servers can plenty of lines.
    'time_which_active_logmta' => '23000',    # max line online

    #type of storage of passwords.
    # '0' - clean text
    # 'md5crypt'  - md5crypt
    'type_passwd' => 'md5crypt',              # 'md5crypt' or '0'

    # The maximal is long password &#40;6-9 is recommended&#41;
    'max_long_passwd' => '3',                 # '2', '10' ...

    #maximal number of the entered not correct passwords
    'max_error_login' => '5',

    # time in the flow of which is blocked input of password
    'max_error_login_time' => '1800',         # max time bad passwd 30min

    #cashing of templates, for a fast-acting
    'blind_cache' => '1',                     # 1 - Enable, 0 - Disable

    # smtp_server
    'smtp_server' => 'localhost',             # &#40;recommended 'localhost'&#41;

    # mailbox which official reports leave from &#40;Can absent ''&#41;
    'mail_from' => '',   # '' - no email from, exemple&#58; 'no_repley@mydomain.com'

    'text_new_mailbox' => 'Welcome to your new account'
&#41;;

#unless &#40;defined&#40;$se->&#123;'url'&#125;&#41;&#41; &#123; $se->&#123;'url'&#125; ='http&#58;//'.$ENV&#123;'SERVER_NAME'&#125;.'/index.pl';&#125;

1;
демо:
http://unixforum.org.ua/index.php?topic=17604.0


Изображение

Изображение

Изображение

Изображение

ProFTP
С Postfix знаком...
С Postfix знаком...
Сообщения: 61
Зарегистрирован: 02 авг 2008, 03:06

Сообщение ProFTP » 15 янв 2009, 06:11

добавил исходники

Ответить