?

Log in

Data Center

POSTFIX, et. al.

Posted on 2014.10.30 at 12:00
Current Location: 67114
Tags: , , ,

Because I seem to buy, build, and lose/destroy/rebuild/re-purpose a stupid number of VPS, I need a placeholder for a quick and dirty checklist. Well, that and every single postfix HOWTO is seemingly either written by a mail engineer, or a 10 year-old. It took me far too long to get only the pieces I needed (have the sever send only, and send through gmail) filtered from all the other fancy-schmancy mail minutia and the not-really-working-after-all HOWTOs.


new_vps:~#

USER ACCCOUNTS

new_vps:~#useradd ehowton
new_vps:~#passwd ehowton
new_vps:~#visudo
%wheel ALL=(ALL) ALL

new_vps:~#vi /etc/ssh/sshd_config
PermitRootLogin no

new_vps:~#service sshd restart

O/S UPDATE

new_vps:~#zypper up

DATABASE

new_vps:~#zypper install mariadb
new_vps:~#service mysql start
new_vps:~#mysql -u root
mysql> UPDATE mysql.user SET Password = PASSWORD('newpwd')
-> WHERE User = 'root';
mysql> FLUSH PRIVILEGES;
quit

MAIL

new_vps:~#zypper install postfix
new_vps:~#zypper install ca-certificates
new_vps:~#vi /etc/postfix/main.cf
relayhost = [smtp.gmail.com]:587
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_tls_CAfile = /etc/ssl/certs/Equifax_Secure_CA.pem
smtp_use_tls = yes

new_vps:~#vi /etc/postfix/saslpasswd
[smtp.gmail.com]:587 USERNAME@gmail.com:PASSWORD

new_vps:~#chmod 400 /etc/postfix/sasl_passwd
new_vps:~#postmap /etc/postfix/sasl_passwd

new_vps:~#service postfix restart

https://www.google.com/accounts/DisplayUnlockCaptcha

new_vps:~#echo "postfix test" | mail -s "postfix test" USERNAME@gmail.com

CHECK IN SPAM FOLDER




Previous Entry  Next Entry