از ایمیل می باشد ، در این راستا فردی که لینوکسی بوده و به عنوان ادمین
سیستم کار می کند باید با روش ایجاد یک سرور ایمیل روی سرویس دهنده لینوکسی
آشنا باشد ، در این نوشته بر آن هستیم تا روش ایجاد یک سرویس دهنده ساده
ایمیل با استفاده از postfix , Dovecot و نام کاربری سیستم لینوکسی را به
زبانی ساده در لینوکس دبیان اسکوئیز بیان کنیم
$ apt-get install libsasl2-2 libsasl2-modules sasl2-bin postfix dovecot-common dovecot-imapd dovecot-pop3d
$ nano /etc/default/saslauthd
START=yes
$ nano /etc/postfix/sasl/smtpd.conf
pwcheck_method: saslauthd
$ service saslauthd start
$ openssl req -new -x509 -days 365 -nodes -out /etc/ssl/certs/postfix.pem -keyout /etc/ssl/private/postfix.key
$ nano /etc/postfix/main.cf
smtpd_tls_cert_file=/etc/ssl/certs/postfix.pem
smtpd_tls_key_file=/etc/ssl/private/postfix.keysmtp_use_tls = yes
smtpd_use_tls = yes
smtp_tls_note_starttls_offer = yes
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yessmtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth-client
smtpd_sasl_auth_enable = yessmtpd_sasl_security_options = noanonymous
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_application_name = smtpd
broken_sasl_auth_clients = yes
#سه خط پایینی را در یک خط قرار دهید
smtpd_recipient_restrictions = reject_unknown_sender_domain, reject_unknown_recipient_domain, reject_unauth_pipelining, permit_mynetworks, permit_sasl_authenticated, reject_unauth_destinationvirtual_alias_maps = hash:/etc/postfix/virtual
home_mailbox = Maildir/
$ nano /etc/postfix/virtual
[email protected] admin
[email protected] admin
$ nano /etc/aliases
root: admin
$ postalias /etc/aliases
$ postmap /etc/postfix/virtual
$ service postfix restart
$ cp /etc/dovecot/dovecot.conf /etc/dovecot/dovecot.conf-backup
$ rm /etc/dovecot/dovecot.conf
$ nano /etc/dovecot/dovecot.conf
protocols = imap pop3
log_timestamp = \”%Y-%m-%d %H:%M:%S \”
mail_privileged_group = mail
ssl_cert_file = /etc/ssl/certs/postfix.pem
ssl_key_file = /etc/ssl/private/postfix.key
mail_location = maildir:Maildir
protocol imap {
}protocol pop3 {
pop3_uidl_format = %08Xu%08Xv
}protocol managesieve {
}auth default {
mechanisms = plain login
passdb pam {
}
userdb passwd {
}
socket listen {
client {
path = /var/spool/postfix/private/auth-client
mode = 0660
user = postfix
group = postfix
}
}
}dict {
}plugin {
}
$ service dovecot restart
$nano /etc/rc.local
service dovecot startservice dovecot restart
$ touch /etc/procmailrc
$ nano /etc/procmailrc
DEFAULT=$HOME/Maildir/
ORGMAIL=${HOME}/Maildir/
DEFAULT=${ORGMAIL}
$ service postfix restart