0

I am working on a email confirmation for a website and I am really new to this. So if anyone please kindly show me how to set up postfix to send out mail. I only need to send out mail (Plain text is fine, although encrypted mail would be a plus). I am using Java to send out mail. Please help please

1 Answers1

1

To interact with SMTP authentication on other hosts, you'll need dovecot. Use a sample configuration similar to the one specified below and modify mydomain and myhostname accordingly to your needs. This should allow for basic mail-sending functionality. Use gnupg for encrypting email, I think there should be some Java bindings somewhere.

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

If you need more information this is a useful link: http://www.server-world.info/en/note?os=Fedora_14&p=mail

atx
  • 1,311