[ubuntu] mail server
2010.10.03 19:21
번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|
15 | [ubuntu 10.10 RC] Apple Magic TouchPad [14] | Shadow | 2010.10.03 | 34823 |
14 | [Ubuntu 10.04 LTS] VirutalBox (similar to VMware) | Shadow | 2010.08.29 | 34474 |
13 | [Ubuntu 10.04 LTS] Ubuntu Guide | Shadow | 2010.08.31 | 31367 |
12 | Xpra + winswitch [16] | Shadow | 2013.02.08 | 30245 |
11 | 설치형 클라우드 - ownCloud [15] | Shadow | 2013.01.27 | 29529 |
10 | [ubuntu] sftp (ssh+ftp) 마운트 하기 [16] | Shadow | 2013.01.17 | 29108 |
9 | command line에서 email 작성 [167] | Shadow | 2013.06.03 | 27674 |
8 | How to install an APC Back-UPS RS 800 UPS on Ubuntu 10.04 LTS [15] | Shadow | 2012.12.04 | 27147 |
7 | Ubuntu 13.10 한영전환키 [11] | Shadow | 2013.12.28 | 26674 |
6 | [ubuntu 12.04 LTS] PDF printer [18] | Shadow | 2013.01.31 | 26138 |
5 | [Ubuntu 10.04 LTS] Acroread (Adobe PDF Reader) | Shadow | 2010.08.29 | 26086 |
4 | [ubuntu] PPA for Ubuntu Korean Team [12] | Shadow | 2013.05.31 | 22992 |
3 | [ubuntu] ZFS [9] | Shadow | 2013.10.04 | 21268 |
2 | Serviio 1.4.1 / Ubuntu 13.10 | Shadow | 2014.09.09 | 14093 |
1 | [ubuntu] proftp deamon이 주기적으로 죽을때... | Shadow | 2015.01.18 | 13082 |
https://help.ubuntu.com/community/Postfix
Configure Postfix to do SMTP AUTH using SASL (saslauthd):
Next edit /etc/postfix/sasl/smtpd.conf and add the following lines:
The file /etc/postfix/main.cf should now look like this:
# See /usr/share/postfix/main.cf.dist for a commented, more complete version smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu) biff = no # appending .domain is the MUA's job. append_dot_mydomain = no # Uncomment the next line to generate "delayed mail" warnings #delay_warning_time = 4h myhostname = server1.example.com alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases myorigin = /etc/mailname mydestination = server1.example.com, example.com, localhost.example.com, localhost relayhost = mynetworks = 127.0.0.0/8 mailbox_command = procmail -a "$EXTENSION" mailbox_size_limit = 0 recipient_delimiter = + inet_interfaces = all smtpd_sasl_local_domain = smtpd_sasl_auth_enable = yes smtpd_sasl_security_options = noanonymous broken_sasl_auth_clients = yes smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination smtpd_tls_auth_only = no #Use these on Postfix 2.2.x only #smtp_use_tls = yes #smtpd_use_tls = yes #For Postfix 2.3 or above use: smtp_tls_security_level = may smtpd_tls_security_level = may smtp_tls_note_starttls_offer = yes smtpd_tls_key_file = /etc/ssl/private/smtpd.key smtpd_tls_cert_file = /etc/ssl/certs/smtpd.crt smtpd_tls_CAfile = /etc/ssl/certs/cacert.pem smtpd_tls_loglevel = 1 smtpd_tls_received_header = yes smtpd_tls_session_cache_timeout = 3600s tls_random_source = dev:/dev/urandom
Restart the postfix daemon like this:
sudo /etc/init.d/postfix restart
Authentication
The next steps are to configure Postfix to use SASL for SMTP AUTH.
First you will need to install the libsasl2-2 and sasl2-bin from the Main repository [i.e. sudo apt-get install them both].
Note: if you are using Ubuntu 6.06 (Dapper Drake) the package name is libsasl2.
We have to change a few things to make it work properly. Because Postfix runs chrooted in /var/spool/postfix we have change a couple paths to live in the false root. (ie. /var/run/saslauthd becomes /var/spool/postfix/var/run/saslauthd):
Note: by changing the saslauthd path other applications that use saslauthd may be affected.
First we edit /etc/default/saslauthd in order to activate saslauthd. Remove # in front of START=yes, add the PWDIR, PARAMS, and PIDFILE lines and edit the OPTIONS line at the end:
Note: If you prefer, you can use "shadow" instead of "pam". This will use MD5 hashed password transfer and is perfectly secure. The username and password needed to authenticate will be those of the users on the system you are using on the server.
Next, we update the dpkg "state" of /var/spool/postfix/var/run/saslauthd. The saslauthd init script uses this setting to create the missing directory with the appropriate permissions and ownership:
This may report an error that "--update given" and the "/var/spool/postfix/var/run/saslauthd" directory does not exist. You can ignore this because when you start saslauthd next it will be created.
Finally, start saslauthd: