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

  • Create Veritas Volumes

    scripts]$ cat vxcreate1 x=0 while [ $x = 0 ] do clear echo "Initialize all Veritas disks press 1" echo "Create a vg and extend disks into it press…

  • Living Life

    Last night I dreamed I was experiencing the last stages of my life chapter by chapter and surprised by how stark that which became important to me…

  • Mr. Dowg and Feral Hog Dogs

    Dreamed Mr. Narodowg and I were taking a leisurely stroll down a wooded path, just talking of this and that and enjoying each other's company -…

  • 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