sasl2-bin
- Programs for
manipulating the SASL users database libsasl2-modules - Basic Pluggable Authentication Modules for SASL postfix-tls - TLS and SASL support for Postfix |
# saslpasswd2 -c -u karappi.minidns.net hogehoge |
# chgrp postfix
/etc/sasldb2 # chmod 640 /etc/sasldb2 |
# sasldblistusers2 hogehoge@karappi.minidns.net: userPassword |
# saslpasswd2 -d ユーザ名 |
# cp -p /etc/sasldb2 /var/spool/postfix/etc/ |
smtp inet
n
- - - - smtpd -o
smtpd_sasl_auth_enable=yes |
command_directory =
/usr/sbin daemon_directory = /usr/lib/postfix program_directory = /usr/lib/postfix smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU) setgid_group = postdrop biff = no # appending .domain is the MUA's job. append_dot_mydomain = no myhostname = karappi.minidns.net mydomain = karappi.minidns.net alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases myorigin = /etc/mailname mydestination = $myhostname, localhost.$mydomain, $mydomain, localhost relayhost = mynetworks = 127.0.0.0/8, 192.168.0.0/24 #home_mailbox=Maildir/ mailbox_command = mailbox_size_limit = 0 recipient_delimiter = + allow_mail_to_commands=alias,forward,include smtpd_sasl_auth_enable = yes smtpd_sasl_security_options = noanonymous smtpd_recipient_restrictions = permit_mynetworks, <----$mynetworksからのアクセスを許可 permit_sasl_authenticated,<----認証したメールを許可 permit_auth_destination, <----このサーバ宛のメールを許可 reject <---- あとは全部拒否 broken_sasl_auth_clients = yes <----Outlook express用 |
# /etc/init.d/postfix restart |
$ telnet
localhost
25 Trying 127.0.0.1... Connected to tama. Escape character is '^]'. 220 karappi.minidns.net ESMTP Postfix (Debian/GNU) EHLO hogehoge 250-karappi.minidns.net 250-PIPELINING 250-SIZE 10240000 250-VRFY 250-ETRN 250-AUTH LOGIN PLAIN CRAM-MD5 DIGEST-MD5 GSSAPI 250-AUTH=LOGIN PLAIN CRAM-MD5 DIGEST-MD5 GSSAPI 250-XVERP 250 8BITMIME QUIT 221 Bye |
# printf
'hogehoge\0hogehoge\0パスワード' | mimencode lkslfjsadfsadlij <----------これが MIMEエンコード化されたもの |