aquaballoon

Mail Server

Jun 22nd, 2011
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 3.25 KB | None | 0 0
  1. Mail Server
  2.  
  3.  
  4. $ sudo gedit /etc/hostname
  5.     aquaballoon.net
  6.  
  7. $ sudo apt-get install postfix
  8.  
  9. $ sudo dpkg-reconfigure postfix
  10.  
  11. Internet Site
  12. aquaballoon.net
  13. Jason Lee
  14. aquaballoon.net, localhost
  15. No
  16. 127.0.0.0/8
  17. 0
  18. +
  19. all
  20.  
  21. $ sudo apt-get install dovecot-postfix
  22.  
  23. $ sudo /etc/init.d/postfix restart
  24.  
  25. $ sudo gedit /etc/postfix/main.cf
  26.     # See /usr/share/postfix/main.cf.dist for a commented, more complete version
  27.  
  28.  
  29.     # Debian specific:  Specifying a file name will cause the first
  30.     # line of that file to be used as the name.  The Debian default
  31.     # is /etc/mailname.
  32.     #myorigin = /etc/mailname
  33.  
  34.     smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
  35.     biff = no
  36.  
  37.     # appending .domain is the MUA's job.
  38.     append_dot_mydomain = no
  39.  
  40.     # Uncomment the next line to generate "delayed mail" warnings
  41.     #delay_warning_time = 4h
  42.  
  43.     readme_directory = no
  44.  
  45.     # TLS parameters
  46.     smtpd_tls_cert_file = /etc/ssl/certs/ssl-mail.pem
  47.     smtpd_tls_key_file = /etc/ssl/private/ssl-mail.key
  48.     smtpd_use_tls = yes
  49.     smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
  50.     smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
  51.  
  52.     # See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
  53.     # information on enabling SSL in the smtp client.
  54.  
  55.     alias_maps = hash:/etc/aliases
  56.     alias_database = hash:/etc/aliases
  57.     myorigin = $mydomain
  58.     mydestination = aquaballoon.net, localhost
  59.     mynetworks = 127.0.0.0/8
  60.     mailbox_size_limit = 0
  61.     recipient_delimiter = +
  62.  
  63. $ sudo apt-get install dovecot-imapd dovecot-pop3d dovecot-common
  64.  
  65. $ sudo gedit /etc/dovecot/dovecot.conf
  66.     mail_location = mbox:~/mail/:INBOX=/var/mail/%u
  67.  
  68. $ /etc/init.d/dovecot restart
  69.  
  70.  
  71. Squirrel Web Mail
  72.  
  73.  
  74. $ sudo apt-get install squirrelmail
  75.  
  76. $ sudo gedit /etc/apache2/httpd.conf
  77.     <VirtualHost *:80>
  78.     DocumentRoot /usr/share/squirrelmail
  79.     ServerName mail.aquaballoon.net
  80.     </VirtualHost>
  81.  
  82.  
  83. $ sudo /etc/init.d/apache2 restart
  84.  
  85.  
  86. Ldap+Postfix
  87.  
  88. $ sudo apt-get install postfix-ldap
  89.  
  90. $ sudo gedit /etc/ldap/slapd.conf
  91.     # Schema and objectClass definitions
  92.     include /etc/ldap/schema/core.schema
  93.     include /etc/ldap/schema/cosine.schema
  94.     include /etc/ldap/schema/nis.schema
  95.     include /etc/ldap/schema/inetorgperson.schema
  96.     include /etc/ldap/schema/misc.schema
  97.  
  98. $ sudo gedit /etc/ldap/schema/misc.schema
  99.     # improperly delegated OID.  A typo is likely.
  100.     objectclass ( 2.16.840.1.113730.3.2.147
  101.     NAME 'inetLocalMailRecipient'
  102.     DESC 'Internet local mail recipient'
  103.     SUP top STRUCTURAL
  104.     MAY ( mailLocalAddress $ mailHost $ mailRoutingAddress ) )
  105.  
  106. $ sudo gedit /etc/postfix/main.cf
  107.     alias_maps = hash:/etc/aliases,ldap:/etc/postfix/alias_maps.1.ldap.conf
  108.     myorigin = $mydomain
  109.     mydestination = aquaballoon.net, localhost
  110.     mynetworks = 127.0.0.0/8
  111.     mailbox_size_limit = 0
  112.     recipient_delimiter = +
  113.  
  114. $ sudo gedit /etc/postfix/alias_maps.1.ldap.conf
  115.     server_host = aquaballoon.net
  116.     start_tls = no
  117.     search_base = dc=Users,dc=aquaballoon,dc=net
  118.     query_filter = mailLocalAddress=%s
  119.     result_attribute = mailRoutingAddress
  120.     bind = yes
  121.     bind_dn = cn=admin,dc=aquaballoon,dc=net
  122.     bind_pw = ******
Advertisement
Add Comment
Please, Sign In to add comment