ehowton (ehowton) wrote,
ehowton
ehowton

POSTFIX, et. al.


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



Tags: linux, mysql, unix, vps
Subscribe

  • Speaking of Old School

  • Playing the Game

    Global Chat and Online Forums are a wondrous, yet frightening thing; you can learn so many new ideas, helpful hints, and gain previously unthought…

  • World of Warships Roster

    U.S.A. 🇺🇸 Destroyer II SMITH ⚒ II WICKES ⚒ III CLEMSON ⚒ IV FARRAGUT ⚒ V MAHAN ⚒ VI BENHAM ⚒ VI BENSON VI…

  • Post a new comment

    Error

    default userpic

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 0 comments