Benutzer-Werkzeuge

Webseiten-Werkzeuge


linux:ssmtp

Mails versenden mit ssmtp

A slim smtp forwarding tool can be installed via the package ssmtp. It provides /usr/sbin/sendmail.

apt-get install ssmtp

Konfiguration

nano /etc/ssmtp/ssmtp.conf
# ---------------------------------------------------------------------- 
# Config file for sSMTP sendmail 
# 
# The person who gets all mail for userids < 1000 
# Make this empty to disable rewriting. 
root=yourmail@mail.com 
 
# The place where the mail goes. The actual machine name is required no  
# MX records are consulted. Commonly mailhosts are named mail.domain.com 
mailhub=smtp.yourmail.com 
UseSTARTTLS=Yes
 
# Where will the mail seem to come from? 
rewriteDomain= 
 
# The full hostname 
hostname=yourserver.example.com 
 
# Are users allowed to set their own From: address? 
# YES - Allow the user to specify their own From: address 
# NO - Use the system generated From: address 
FromLineOverride=YES 
 
# Username and password for Google's Gmail servers 
# From addresses are settled by Mutt's rc file, so  
# with this setup one can still achieve multi-user SMTP 
AuthUser=username@gmail.com 
AuthPass=password 
 
#### VERY IMPORTANT !!! If other people have access to this computer 
# Your GMAIL Password is left unencrypted in this file 
# so make sure you have a strong root password, and make sure 
# you change the permissions of this file to be 640: 
# chown root:mail /etc/ssmtp/ssmtp.conf 
# chmod 640 /etc/ssmtp/ssmtp.conf 
#  
# add your user to the group mail 
# usermod -a -G mail <yourUserName> 
# quit all your sessions 
# login again 
# send a test mail: 
# user@yourmachine ~ $ ssmtp "testing ssmtp setup" yourMail@gmail.com 
# ----------------------------------------------------------------------
linux/ssmtp.txt · Zuletzt geändert: 2014/07/17 14:32 von Madic