10.19
I can’t receive email after fresh installing Ubuntu on my server. I copy the old postfix config(main.cf) to the new installed server, but the new email arrived. I found there is a statement in the main.cf
smtpd_client_restrictions = check_client_access hash:/etc/postfix/access
But there is no such a file under /etc/postfix directory, so I copied access and access.db from the old server, then I received spams.
To cowork with my gmail account, I add a pop3s account on gmail, so I need some extra settings to activate the pop3s service.
Modify the setting in the /etc/dovecot/dovecot.conf
protocols = pop3s
and uncomment this two lines
ssl_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
ssl_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
Then restart dovecot, you can try telnet localhost 995 to see if the the port if opened.
For the postfix, you have to run the following commands.
openssl req -new -x509 -extensions v3_ca -keyout cakey.pem -out cacert.pem -days 3650
postconf -e 'smtpd_tls_auth_only = no'
postconf -e 'smtp_use_tls = yes'
postconf -e 'smtpd_use_tls = yes'
postconf -e 'smtp_tls_note_starttls_offer = yes'
postconf -e 'smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key'
postconf -e 'smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt'
postconf -e 'smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem'
postconf -e 'smtpd_tls_loglevel = 1'
postconf -e 'smtpd_tls_received_header = yes'
postconf -e 'smtpd_tls_session_cache_timeout = 3600s'
postconf -e 'tls_random_source = dev:/dev/urandom'
And add these two line in the /etc/postfix/master.cf
smtps inet n - n - - smtpd
smtps inet n - n - - smtpd -v -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes
Done.
No Comment.
Add Your Comment