PostFix を設定してメールを送信する方法

PostFix を設定してメールを送信する方法

私はウェブサイトのメール確認に取り組んでいますが、この分野にはまったく不慣れです。誰か、メールを送信するための postfix の設定方法を教えてください。メールを送信するだけでいいのです (プレーンテキストでも構いませんが、暗号化されたメールがあればなお良いです)。メールの送信には Java を使用しています。どうか助けてください。

答え1

他のホストの SMTP 認証とやり取りするには、dovecot が必要です。以下に指定されているものと同様のサンプル構成を使用し、必要に応じて mydomain と myhostname を変更します。これにより、基本的なメール送信機能が使用可能になります。電子メールの暗号化には gnupg を使用します。どこかに Java バインディングがあるはずです。

mydomain = yourdomain.com
myhostname = yourdomain.com
myorigin = $mydomain
inet_interfaces = all
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mynetworks = 127.0.0.0/8, 10.0.0.0/24
home_mailbox = Maildir/
header_checks = regexp:/etc/postfix/header_checks
body_checks = regexp:/etc/postfix/body_checks
smtpd_banner = $myhostname ESMTP

# limit an email size 10M
message_size_limit = 10485760
# limit mailbox 1G
mailbox_size_limit = 1073741824

# for SMTP-Auth settings
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_local_domain = $myhostname
smtpd_client_restrictions = permit_mynetworks,reject_unknown_client,permit
smtpd_recipient_restrictions = permit_mynetworks,permit_auth_destination,permit_sasl_authenticated,reject
smtpd_use_tls = yes
smtpd_tls_cert_file = /etc/pki/tls/certs/server.crt
smtpd_tls_key_file = /etc/pki/tls/certs/server.key
smtpd_tls_session_cache_database = btree:/var/lib/postfix/smtpd_scache

さらに詳しい情報が必要な場合は、次のリンクが役立ちます: http://www.server-world.info/en/note?os=Fedora_14&p=mail

関連情報