Почтовый сервер в связке Postfix, Dovecot — различия между версиями
Root (обсуждение | вклад) |
Root (обсуждение | вклад) |
||
Строка 206: | Строка 206: | ||
− | // Site Admin | + | // Site Admin<br/> |
$CONF['admin_email'] = 'postmaster@megapuper.ru'; | $CONF['admin_email'] = 'postmaster@megapuper.ru'; | ||
− | // Mail Server | + | // Mail Server<br/> |
− | $CONF['smtp_server'] = '127.0.0.1'; | + | $CONF['smtp_server'] = '127.0.0.1';<br/> |
$CONF['smtp_port'] = '25'; | $CONF['smtp_port'] = '25'; | ||
− | // Encrypt | + | // Encrypt<br/> |
$CONF['encrypt'] = 'cleartext'; | $CONF['encrypt'] = 'cleartext'; | ||
− | // Password validation | + | // Password validation<br/> |
− | // New/changed passwords will be validated using all regular expressions in the array. | + | // New/changed passwords will be validated using all regular expressions in the array.<br/> |
− | // If a password doesn't match one of the regular expressions, the corresponding | + | // If a password doesn't match one of the regular expressions, the corresponding<br/> |
− | // error message from $PALANG (see languages/) will be displayed. | + | // error message from $PALANG (see languages/) will be displayed.<br/> |
− | // If you need custom error messages, you can add them using $CONF['language_hook']. | + | // If you need custom error messages, you can add them using $CONF['language_hook'].<br/> |
− | // If a $PALANG text contains a %s, you can add its value after the $PALANG key | + | // If a $PALANG text contains a %s, you can add its value after the $PALANG key<br/> |
− | // (separated with a space). | + | // (separated with a space).<br/> |
$CONF['password_validation'] = array( | $CONF['password_validation'] = array( | ||
# '/regular expression/' => '$PALANG key (optional: + parameter)', | # '/regular expression/' => '$PALANG key (optional: + parameter)', | ||
Строка 234: | Строка 234: | ||
− | // Generate Password | + | // Generate Password<br/> |
$CONF['generate_password'] = 'NO'; | $CONF['generate_password'] = 'NO'; | ||
− | // Show Password | + | // Show Password<br/> |
$CONF['show_password'] = 'NO'; | $CONF['show_password'] = 'NO'; | ||
− | // Page Size | + | // Page Size<br/> |
− | // Set the number of entries that you would like to see | + | // Set the number of entries that you would like to see<br/> |
− | // in one page. | + | // in one page.<br/> |
$CONF['page_size'] = '50'; | $CONF['page_size'] = '50'; | ||
− | // Default Aliases | + | // Default Aliases<br/> |
//$CONF['default_aliases'] = array ( | //$CONF['default_aliases'] = array ( | ||
// 'abuse' => 'abuse@change-this-to-your.domain.tld', | // 'abuse' => 'abuse@change-this-to-your.domain.tld', | ||
Строка 257: | Строка 257: | ||
− | // Mailboxes | + | // Mailboxes<br/> |
− | // YES: /usr/local/virtual/domain.tld/username@domain.tld | + | // YES: /usr/local/virtual/domain.tld/username@domain.tld<br/> |
− | // NO: /usr/local/virtual/username@domain.tld | + | // NO: /usr/local/virtual/username@domain.tld<br/> |
− | $CONF['domain_path'] = 'YES'; | + | $CONF['domain_path'] = 'YES';<br/> |
− | // If you don't want to have the domain in your mailbox set this to 'NO'. | + | // If you don't want to have the domain in your mailbox set this to 'NO'.<br/> |
− | // YES: /usr/local/virtual/domain.tld/username@domain.tld | + | // YES: /usr/local/virtual/domain.tld/username@domain.tld<br/> |
− | // NO: /usr/local/virtual/domain.tld/username | + | // NO: /usr/local/virtual/domain.tld/username<br/> |
− | // Note: If $CONF['domain_path'] is set to NO, this setting will be forced to YES. | + | // Note: If $CONF['domain_path'] is set to NO, this setting will be forced to YES.<br/> |
− | $CONF['domain_in_mailbox'] = 'NO'; | + | $CONF['domain_in_mailbox'] = 'NO';<br/> |
− | // If you want to define your own function to generate a maildir path set this to the name of the function. | + | // If you want to define your own function to generate a maildir path set this to the name of the function.<br/> |
− | // - this configuration directive will override both domain_path and domain_in_mailbox | + | // - this configuration directive will override both domain_path and domain_in_mailbox<br/> |
− | // - the maildir_name_hook() function example is present below, commented out | + | // - the maildir_name_hook() function example is present below, commented out<br/> |
− | // - if the function does not exist the program will default to the above domain_path and domain_in_mailbox settings | + | // - if the function does not exist the program will default to the above domain_path and domain_in_mailbox settings<br/> |
$CONF['maildir_name_hook'] = 'NO'; | $CONF['maildir_name_hook'] = 'NO'; | ||
− | $CONF['admin_struct_hook'] = ''; | + | $CONF['admin_struct_hook'] = '';<br/> |
− | $CONF['domain_struct_hook'] = ''; | + | $CONF['domain_struct_hook'] = '';<br/> |
− | $CONF['alias_struct_hook'] = ''; | + | $CONF['alias_struct_hook'] = '';<br/> |
− | $CONF['mailbox_struct_hook'] = ''; | + | $CONF['mailbox_struct_hook'] = '';<br/> |
− | $CONF['alias_domain_struct_hook'] = ''; | + | $CONF['alias_domain_struct_hook'] = '';<br/> |
− | // Default Domain Values | + | // Default Domain Values<br/> |
− | // Specify your default values below. Quota in MB. | + | // Specify your default values below. Quota in MB.<br/> |
− | $CONF['aliases'] = '0'; | + | $CONF['aliases'] = '0';<br/> |
− | $CONF['mailboxes'] = '0'; | + | $CONF['mailboxes'] = '0';<br/> |
− | $CONF['maxquota'] = '1024'; | + | $CONF['maxquota'] = '1024';<br/> |
$CONF['domain_quota_default'] = '2048'; | $CONF['domain_quota_default'] = '2048'; | ||
− | // Quota | + | // Quota<br/> |
− | // When you want to enforce quota for your mailbox users set this to 'YES'. | + | // When you want to enforce quota for your mailbox users set this to 'YES'.<br/> |
− | $CONF['quota'] = 'YES'; | + | $CONF['quota'] = 'YES';<br/> |
− | // If you want to enforce domain-level quotas set this to 'YES'. | + | // If you want to enforce domain-level quotas set this to 'YES'.<br/> |
− | $CONF['domain_quota'] = 'YES'; | + | $CONF['domain_quota'] = 'YES';<br/> |
− | // You can either use '1024000' or '1048576' | + | // You can either use '1024000' or '1048576'<br/> |
− | $CONF['quota_multiplier'] = '1048576'; | + | $CONF['quota_multiplier'] = '1048576';<br/> |
− | // Transport | + | // Transport<br/> |
− | // If you want to define additional transport options for a domain set this to 'YES'. | + | // If you want to define additional transport options for a domain set this to 'YES'.<br/> |
− | $CONF['transport'] = 'YES'; | + | $CONF['transport'] = 'YES';<br/> |
− | // Transport options | + | // Transport options<br/> |
− | // If you want to define additional transport options put them in array below. | + | // If you want to define additional transport options put them in array below.<br/> |
$CONF['transport_options'] = array ( | $CONF['transport_options'] = array ( | ||
'virtual', // for virtual accounts | 'virtual', // for virtual accounts | ||
Строка 306: | Строка 306: | ||
'relay' // for backup mx | 'relay' // for backup mx | ||
); | ); | ||
− | // Transport default | + | // Transport default<br/> |
− | // You should define default transport. It must be in array above. | + | // You should define default transport. It must be in array above.<br/> |
$CONF['transport_default'] = 'virtual'; | $CONF['transport_default'] = 'virtual'; | ||
− | // Virtual Vacation Stuff | + | // Virtual Vacation Stuff<br/> |
− | // If you want to use virtual vacation for you mailbox users set this to 'YES'. | + | // If you want to use virtual vacation for you mailbox users set this to 'YES'.<br/> |
− | // NOTE: Make sure that you install the vacation module. (See VIRTUAL-VACATION/) | + | // NOTE: Make sure that you install the vacation module. (See VIRTUAL-VACATION/)<br/> |
$CONF['vacation'] = 'NO'; | $CONF['vacation'] = 'NO'; | ||
− | // This is the autoreply domain that you will need to set in your Postfix | + | // This is the autoreply domain that you will need to set in your Postfix<br/> |
− | // transport maps to handle virtual vacations. It does not need to be a | + | // transport maps to handle virtual vacations. It does not need to be a<br/> |
− | // real domain (i.e. you don't need to setup DNS for it). | + | // real domain (i.e. you don't need to setup DNS for it).<br/> |
− | // This domain must exclusively be used for vacation. Do NOT use it for "normal" mail addresses. | + | // This domain must exclusively be used for vacation. Do NOT use it for "normal" mail addresses.<br/> |
$CONF['vacation_domain'] = ''; | $CONF['vacation_domain'] = ''; | ||
− | // Vacation Control | + | // Vacation Control<br/> |
− | // If you want users to take control of vacation set this to 'YES'. | + | // If you want users to take control of vacation set this to 'YES'.<br/> |
$CONF['vacation_control'] ='NO'; | $CONF['vacation_control'] ='NO'; | ||
− | // Vacation Control for admins | + | // Vacation Control for admins<br/> |
− | // Set to 'YES' if your domain admins should be able to edit user vacation. | + | // Set to 'YES' if your domain admins should be able to edit user vacation.<br/> |
$CONF['vacation_control_admin'] = 'YES'; | $CONF['vacation_control_admin'] = 'YES'; | ||
− | // ReplyType options | + | // ReplyType options<br/> |
− | // If you want to define additional reply options put them in array below. | + | // If you want to define additional reply options put them in array below.<br/> |
− | // The array has the format seconds between replies => $PALANG text | + | // The array has the format seconds between replies => $PALANG text<br/> |
− | // Special values for seconds are: | + | // Special values for seconds are:<br/> |
− | // 0 => only reply to the first mail while on vacation | + | // 0 => only reply to the first mail while on vacation<br/> |
− | // 1 => reply on every mail | + | // 1 => reply on every mail<br/> |
$CONF['vacation_choice_of_reply'] = array ( | $CONF['vacation_choice_of_reply'] = array ( | ||
0 => 'reply_once', // Sends only Once the message during Out of Office | 0 => 'reply_once', // Sends only Once the message during Out of Office | ||
Строка 349: | Строка 349: | ||
− | // Users Control for Domain Admin | + | // Users Control for Domain Admin<br/> |
− | // Set to "Yes" if your domain admins schould be able to edit field userscontrole in table domain | + | // Set to "Yes" if your domain admins schould be able to edit field userscontrole in table domain<br/> |
− | // Userscontrol is edited in admin_create-domain.tpl and admin_edit-domain.tpl | + | // Userscontrol is edited in admin_create-domain.tpl and admin_edit-domain.tpl<br/> |
− | // Userscontrol is default set to on when creating a domain | + | // Userscontrol is default set to on when creating a domain<br/> |
$CONF['users_domain_controle'] = 'YES'; | $CONF['users_domain_controle'] = 'YES'; | ||
− | // Alias Control | + | // Alias Control<br/> |
− | // Alias control for superadmins | + | // Alias control for superadmins<br/> |
$CONF['alias_control'] = 'YES'; | $CONF['alias_control'] = 'YES'; | ||
− | // Alias Control for domain admins | + | // Alias Control for domain admins<br/> |
$CONF['alias_control_admin'] = 'YES'; | $CONF['alias_control_admin'] = 'YES'; | ||
− | // Special Alias Control | + | // Special Alias Control<br/> |
− | // Set to 'NO' if your domain admins shouldn't be able to edit the default aliases | + | // Set to 'NO' if your domain admins shouldn't be able to edit the default aliases<br/> |
− | // as defined in $CONF['default_aliases'] | + | // as defined in $CONF['default_aliases']<br/> |
$CONF['special_alias_control'] = 'NO'; | $CONF['special_alias_control'] = 'NO'; | ||
− | // Alias Goto Field Limit | + | // Alias Goto Field Limit<br/> |
− | // Set the max number of entries that you would like to see | + | // Set the max number of entries that you would like to see<br/> |
− | // in one 'goto' field in overview, the rest will be hidden and "[and X more...]" will be added. | + | // in one 'goto' field in overview, the rest will be hidden and "[and X more...]" will be added.<br/> |
− | // '0' means no limits. | + | // '0' means no limits.<br/> |
$CONF['alias_goto_limit'] = '0'; | $CONF['alias_goto_limit'] = '0'; | ||
− | // Alias Domains | + | // Alias Domains<br/> |
− | // Alias domains allow to "mirror" aliases and mailboxes to another domain. This makes | + | // Alias domains allow to "mirror" aliases and mailboxes to another domain. This makes<br/> |
− | // configuration easier if you need the same set of aliases on multiple domains, but | + | // configuration easier if you need the same set of aliases on multiple domains, but<br/> |
− | // also requires postfix to do more database queries. | + | // also requires postfix to do more database queries.<br/> |
− | // Note: If you update from 2.2.x or earlier, you will have to update your postfix configuration. | + | // Note: If you update from 2.2.x or earlier, you will have to update your postfix configuration.<br/> |
− | // Set to 'NO' to disable alias domains. | + | // Set to 'NO' to disable alias domains.<br/> |
$CONF['alias_domain'] = 'YES'; | $CONF['alias_domain'] = 'YES'; | ||
− | // Backup | + | // Backup<br/> |
− | // If you don't want backup tab set this to 'NO'; | + | // If you don't want backup tab set this to 'NO';<br/> |
//$CONF['backup'] = 'YES'; | //$CONF['backup'] = 'YES'; | ||
− | // Send Mail | + | // Send Mail<br/> |
− | // If you don't want sendmail tab set this to 'NO'; | + | // If you don't want sendmail tab set this to 'NO';<br/> |
$CONF['sendmail'] = 'YES'; | $CONF['sendmail'] = 'YES'; | ||
− | // Logging | + | // Logging<br/> |
− | // If you don't want logging set this to 'NO'; | + | // If you don't want logging set this to 'NO';<br/> |
$CONF['logging'] = 'YES'; | $CONF['logging'] = 'YES'; | ||
− | // Fetchmail | + | // Fetchmail<br/> |
− | // If you don't want fetchmail tab set this to 'NO'; | + | // If you don't want fetchmail tab set this to 'NO';<br/> |
//$CONF['fetchmail'] = 'YES'; | //$CONF['fetchmail'] = 'YES'; | ||
− | // fetchmail_extra_options allows users to specify any fetchmail options and any MDA | + | // fetchmail_extra_options allows users to specify any fetchmail options and any MDA<br/> |
− | // (it will even accept 'rm -rf /' as MDA!) | + | // (it will even accept 'rm -rf /' as MDA!)<br/> |
− | // This should be set to NO, except if you *really* trust *all* your users. | + | // This should be set to NO, except if you *really* trust *all* your users.<br/> |
$CONF['fetchmail_extra_options'] = 'YES'; | $CONF['fetchmail_extra_options'] = 'YES'; | ||
− | // Header | + | // Header<br/> |
− | $CONF['show_header_text'] = 'YES'; | + | $CONF['show_header_text'] = 'YES';<br/> |
$CONF['header_text'] = ':: Postfix Admin ::'; | $CONF['header_text'] = ':: Postfix Admin ::'; | ||
− | // Footer | + | // Footer<br/> |
− | $CONF['show_footer_text'] = 'YES'; | + | $CONF['show_footer_text'] = 'YES';<br/> |
− | $CONF['footer_text'] = 'Return to postfix.megapuper.ru'; | + | $CONF['footer_text'] = 'Return to postfix.megapuper.ru';<br/> |
$CONF['footer_link'] = 'http://postfix.megapuper.ru/'; | $CONF['footer_link'] = 'http://postfix.megapuper.ru/'; | ||
− | // MOTD ("Motto of the day") | + | // MOTD ("Motto of the day")<br/> |
− | // You can display a MOTD below the menu on all pages. | + | // You can display a MOTD below the menu on all pages.<br/> |
− | // This can be configured seperately for users, domain admins and superadmins | + | // This can be configured seperately for users, domain admins and superadmins<br/> |
− | $CONF['motd_user'] = ''; | + | $CONF['motd_user'] = '';<br/> |
− | $CONF['motd_admin'] = ''; | + | $CONF['motd_admin'] = '';<br/> |
$CONF['motd_superadmin'] = ''; | $CONF['motd_superadmin'] = ''; | ||
− | // Welcome Message | + | // Welcome Message<br/> |
− | // This message is send to every newly created mailbox. | + | // This message is send to every newly created mailbox.<br/> |
− | // Change the text between EOM. | + | // Change the text between EOM.<br/> |
− | $CONF['welcome_text'] = <<<EOM | + | $CONF['welcome_text'] = <<<EOM<br/> |
Hi, | Hi, | ||
− | Welcome to your new account. | + | Welcome to your new account.<br/> |
EOM; | EOM; | ||
− | // When creating mailboxes or aliases, check that the domain-part of the | + | // When creating mailboxes or aliases, check that the domain-part of the<br/> |
− | // address is legal by performing a name server look-up. | + | // address is legal by performing a name server look-up.<br/> |
$CONF['emailcheck_resolve_domain']='NO'; | $CONF['emailcheck_resolve_domain']='NO'; | ||
− | // Optional: | + | // Optional:<br/> |
− | //set to YES to enable this feature | + | //set to YES to enable this feature<br/> |
− | $CONF['show_status']='YES'; | + | $CONF['show_status']='YES';<br/> |
− | //display a guide to what these colors mean | + | //display a guide to what these colors mean<br/> |
− | $CONF['show_status_key']='YES'; | + | $CONF['show_status_key']='YES';<br/> |
− | // 'show_status_text' will be displayed with the background colors | + | // 'show_status_text' will be displayed with the background colors<br/> |
− | // associated with each status, you can customize it here | + | // associated with each status, you can customize it here<br/> |
− | $CONF['show_status_text']=' '; | + | $CONF['show_status_text']=' ';<br/> |
− | // show_undeliverable is useful if most accounts are delivered to this | + | // show_undeliverable is useful if most accounts are delivered to this<br/> |
− | // postfix system. If many aliases and mailboxes are forwarded | + | // postfix system. If many aliases and mailboxes are forwarded<br/> |
− | // elsewhere, you will probably want to disable this. | + | // elsewhere, you will probably want to disable this.<br/> |
− | $CONF['show_undeliverable']='YES'; | + | $CONF['show_undeliverable']='YES';<br/> |
− | $CONF['show_undeliverable_color']='tomato'; | + | $CONF['show_undeliverable_color']='tomato';<br/> |
− | // mails to these domains will never be flagged as undeliverable | + | // mails to these domains will never be flagged as undeliverable<br/> |
− | $CONF['show_undeliverable_exceptions']=array("unixmail.domain.ext","exchangeserver.domain.ext"); | + | $CONF['show_undeliverable_exceptions']=array("unixmail.domain.ext","exchangeserver.domain.ext");<br/> |
− | $CONF['show_popimap']='YES'; | + | $CONF['show_popimap']='YES';<br/> |
− | $CONF['show_popimap_color']='darkgrey'; | + | $CONF['show_popimap_color']='darkgrey';<br/> |
− | // you can assign special colors to some domains. To do this, | + | // you can assign special colors to some domains. To do this,<br/> |
− | // - add the domain to show_custom_domains | + | // - add the domain to show_custom_domains<br/> |
− | // - add the corresponding color to show_custom_colors | + | // - add the corresponding color to show_custom_colors<br/> |
− | $CONF['show_custom_domains']=array("megapuper.ru","localhost"); | + | $CONF['show_custom_domains']=array("megapuper.ru","localhost");<br/> |
− | $CONF['show_custom_colors']=array("lightgreen","lightblue"); | + | $CONF['show_custom_colors']=array("lightgreen","lightblue");<br/> |
− | // If you use a recipient_delimiter in your postfix config, you can also honor it when aliases are checked. | + | // If you use a recipient_delimiter in your postfix config, you can also honor it when aliases are checked.<br/> |
− | // Example: $CONF['recipient_delimiter'] = "+"; | + | // Example: $CONF['recipient_delimiter'] = "+";<br/> |
− | // Set to "" to disable this check. | + | // Set to "" to disable this check.<br/> |
$CONF['recipient_delimiter'] = "+"; | $CONF['recipient_delimiter'] = "+"; | ||
− | // Optional: | + | // Optional:<br/> |
− | // Script to run after creation of mailboxes. | + | // Script to run after creation of mailboxes.<br/> |
$CONF['mailbox_postcreation_script'] = '/usr/local/www/postfix/scripts/addmail.sh'; | $CONF['mailbox_postcreation_script'] = '/usr/local/www/postfix/scripts/addmail.sh'; | ||
− | // Optional: | + | // Optional:<br/> |
− | // Script to run after alteration of mailboxes. | + | // Script to run after alteration of mailboxes.<br/> |
$CONF['mailbox_postedit_script'] = '/usr/local/www/postfix/scripts/editmail.sh'; | $CONF['mailbox_postedit_script'] = '/usr/local/www/postfix/scripts/editmail.sh'; | ||
− | // Optional: | + | // Optional:<br/> |
− | // Script to run after deletion of mailboxes. | + | // Script to run after deletion of mailboxes.<br/> |
$CONF['mailbox_postdeletion_script'] = '/usr/local/www/postfix/scripts/delmail.sh'; | $CONF['mailbox_postdeletion_script'] = '/usr/local/www/postfix/scripts/delmail.sh'; | ||
− | // Optional: | + | // Optional:<br/> |
− | // Script to run after creation of domains. | + | // Script to run after creation of domains.<br/> |
$CONF['domain_postcreation_script'] = ''; | $CONF['domain_postcreation_script'] = ''; | ||
− | // Optional: | + | // Optional:<br/> |
− | // Script to run after deletion of domains. | + | // Script to run after deletion of domains.<br/> |
$CONF['domain_postdeletion_script'] = ''; | $CONF['domain_postdeletion_script'] = ''; | ||
− | // Optional: | + | // Optional:<br/> |
− | // Sub-folders which should automatically be created for new users. | + | // Sub-folders which should automatically be created for new users.<br/> |
− | // The sub-folders will also be subscribed to automatically. | + | // The sub-folders will also be subscribed to automatically.<br/> |
− | $CONF['create_mailbox_subdirs'] = array('Archive', 'Drafts', 'Sent', 'Trash'); | + | $CONF['create_mailbox_subdirs'] = array('Archive', 'Drafts', 'Sent', 'Trash');<br/> |
$CONF['create_mailbox_subdirs_host']='127.0.0.1'; | $CONF['create_mailbox_subdirs_host']='127.0.0.1'; | ||
// | // | ||
− | // Specify '' for Dovecot and 'INBOX.' for Courier. | + | // Specify '' for Dovecot and 'INBOX.' for Courier.<br/> |
$CONF['create_mailbox_subdirs_prefix']=''; | $CONF['create_mailbox_subdirs_prefix']=''; | ||
− | // Optional: | + | // Optional:<br/> |
− | // Show used quotas from Dovecot dictionary backend in virtual | + | // Show used quotas from Dovecot dictionary backend in virtual<br/> |
− | // mailbox listing. | + | // mailbox listing.<br/> |
$CONF['used_quotas'] = 'YES'; | $CONF['used_quotas'] = 'YES'; | ||
− | // if you use dovecot >= 1.2, set this to yes. | + | // if you use dovecot >= 1.2, set this to yes.<br/> |
− | // Note about dovecot config: table "quota" is for 1.0 & 1.1, table "quota2" is for dovecot 1.2 and newer | + | // Note about dovecot config: table "quota" is for 1.0 & 1.1, table "quota2" is for dovecot 1.2 and newer<br/> |
$CONF['new_quota_table'] = 'YES'; | $CONF['new_quota_table'] = 'YES'; | ||
− | // Normally, the TCP port number does not have to be specified. | + | // Normally, the TCP port number does not have to be specified.<br/> |
− | $CONF['create_mailbox_subdirs_hostport']=143; | + | $CONF['create_mailbox_subdirs_hostport']=143;<br/> |
− | // If you have trouble connecting to the IMAP-server, then specify | + | // If you have trouble connecting to the IMAP-server, then specify<br/> |
− | // a value for $CONF['create_mailbox_subdirs_hostoptions']. These | + | // a value for $CONF['create_mailbox_subdirs_hostoptions']. These<br/> |
− | // are some examples to experiment with: | + | // are some examples to experiment with:<br/> |
$CONF['create_mailbox_subdirs_hostoptions'] = array('novalidate-cert','norsh'); | $CONF['create_mailbox_subdirs_hostoptions'] = array('novalidate-cert','norsh'); | ||
− | // Theme Config | + | // Theme Config<br/> |
− | // Specify your own logo and CSS file | + | // Specify your own logo and CSS file<br/> |
− | $CONF['theme_logo'] = 'images/logo-default.png'; | + | $CONF['theme_logo'] = 'images/logo-default.png';<br/> |
− | $CONF['theme_css'] = 'css/default.css'; | + | $CONF['theme_css'] = 'css/default.css';<br/> |
− | // If you want to customize some styles without editing the $CONF['theme_css'] file, | + | // If you want to customize some styles without editing the $CONF['theme_css'] file,<br/> |
− | // you can add a custom CSS file. It will be included after $CONF['theme_css']. | + | // you can add a custom CSS file. It will be included after $CONF['theme_css'].<br/> |
$CONF['theme_custom_css'] = ''; | $CONF['theme_custom_css'] = ''; | ||
− | // XMLRPC Interface. | + | // XMLRPC Interface.<br/> |
− | // This should be only of use if you wish to use e.g the | + | // This should be only of use if you wish to use e.g the<br/> |
− | // Postfixadmin-Squirrelmail package | + | // Postfixadmin-Squirrelmail package<br/> |
− | // change to boolean true to enable xmlrpc | + | // change to boolean true to enable xmlrpc<br/> |
$CONF['xmlrpc_enabled'] = false; | $CONF['xmlrpc_enabled'] = false; | ||
− | // If you want to keep most settings at default values and/or want to ensure | + | // If you want to keep most settings at default values and/or want to ensure<br/> |
− | // that future updates work without problems, you can use a separate config | + | // that future updates work without problems, you can use a separate config<br/> |
− | // file (config.local.php) instead of editing this file and override some | + | // file (config.local.php) instead of editing this file and override some<br/> |
− | // settings there. | + | // settings there.<br/> |
if (file_exists(dirname(__FILE__) . '/config.local.php')) { | if (file_exists(dirname(__FILE__) . '/config.local.php')) { | ||
include(dirname(__FILE__) . '/config.local.php'); | include(dirname(__FILE__) . '/config.local.php'); | ||
} | } | ||
− | |||
− | |||
// END OF CONFIG FILE | // END OF CONFIG FILE | ||
− | |||
− | |||
</spoiler> | </spoiler> | ||
Версия 18:46, 22 апреля 2015
При установке будем ориентироваться на этот мануал: http://dummyluck.com/page/pochtovyi_server_nastroika_opisanie
Настройку будем производить для сервера с одним доменом. Система FreeBSD 10.1
1. Подготовка.
прописываем хостнейм /etc/rc.conf
hostname="mail.megapuper.ru"
делаем изменения в хостах /etc/hosts
127.0.0.1 localhost 109.172.52.114 megapuper.ru 109.172.52.114 mail.megapuper.ru
создаём пользователя и группу vmail
# pw groupadd vmail -g 5000 # pw useradd vmail -g vmail -s /sbin/nologin -u 5000
сразу отключаем sendmail
/etc/rc.conf
sendmail_enable="NO" sendmail_submit_enable="NO" sendmail_outbound_enable="NO" sendmail_msp_queue_enable="NO"
/etc/periodic.conf
daily_clean_hoststat_enable="NO" daily_status_mail_rejects_enable="NO" daily_status_include_submit_mailq="NO" daily_submit_queuerun="NO"
2. Ставим Nginx, MySQL, PHP, PHP-extension. Этот web-сервер будет использоваться для postfixadmin.
Здесь коротко, ибо уже тыщу раз ставилось)
Nginx cтавим из пакетов
# pkg install nginx
основной конфиг /usr/local/etc/nginx/nginx.conf
user www; worker_processes 2; pid /var/run/nginx.pid; events { worker_connections 1024; } http { access_log /var/log/nginx/access.log; error_log /var/log/nginx/error.log; include /usr/local/etc/nginx/mime.types; default_type application/octet-stream; sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 65; client_max_body_size 5m; server_names_hash_bucket_size 64; types_hash_max_size 2048; types_hash_bucket_size 64; include /usr/local/etc/nginx/conf/*.conf; }
конфиг виртуального хоста /usr/local/etc/nginx/conf/postfix.conf
server { listen 80; server_name postfix.megapuper.ru; root /usr/local/www/postfix; index index.php index.html index.htm; access_log /var/log/nginx/postfix.access.log; error_log /var/log/nginx/postfix.error.log; location / { # try_files $uri $uri/ /index.php?$uri&$args; } location ~ \.php$ { fastcgi_pass 127.0.0.1:10000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name; fastcgi_intercept_errors on; include fastcgi_params; } }
PHP и нужные PHP-extension тоже ставим из пакетов
# pkg install php55 # pkg install php55-* (пригодятся php55-ctype php55-dom php55-gd php55-hash php55-iconv php55-imap php55-json php55-mbstring php55-mcrypt php55-mysql php55-mysqli php55-session php55-xml)
конфиг php-fpm /usr/local/etc/php-fpm.conf
[global] error_log = /var/log/php/php-fpm.log pid = /var/run/php-fpm.pid log_level = notice include=/usr/local/etc/php/*.conf
конфиг для виртуального хоста /usr/local/etc/php/postfix.conf
[postfix] prefix = /usr/local/www/$pool listen = 127.0.0.1:10000 listen.allowed_clients = 127.0.0.1 listen.owner = www listen.group = www listen.mode = 0660 user = www group = www pm = dynamic pm.max_children = 4 pm.start_servers = 2 pm.min_spare_servers = 1 pm.max_spare_servers = 3 pm.max_requests = 100 ;pm.status_path = /status/php-fpm/$pool request_terminate_timeout = 0 request_slowlog_timeout = 1m slowlog = /var/log/php/$pool.slow.log catch_workers_output = yes
MySQL тоже из пакетов
# pkg install mysql56-server
простенький конфиг /etc/my.cnf
[mysqld] bind-address=127.0.0.1
в конфигах. где используется подключение к базе указываем хост 127.0.0.1
После этого имеем готовый web-сервер можно переходить к установке postfixadmin
3. Установка PostfixAdmin
Скачиваем последнюю версию отсюда http://sourceforge.net/projects/postfixadmin/ и заливаем на web-сервер
создаём базу и даём права пользователю
> create database postfix character set utf8 collate utf8_general_ci; > grant all on postfix.* to postfix@127.0.0.1 identified by 'пароль';
Правим основной конфиг postfixadmin config.inc.php
Spoiler
6. Устанавливаем Postfix.
7. Устанавливаем Dovecot.