Setting Up Mail Server On Linux Localhost
Page 1 of 1
Setting Up Mail Server On Linux Localhost
Sendmail
Try this method last as the backup way of doing it has failed me after many years of good service mail(); fails!!!!!
If all else fails...
Use Swift
use LinkAbove 1st!
Now for the backup way if 1st method fails!
Setting Up Mail Server On Linux Localhost
Try this method last as the backup way of doing it has failed me after many years of good service mail(); fails!!!!!
If all else fails...
Use Swift
use LinkAbove 1st!
Now for the backup way if 1st method fails!
Setting Up Mail Server On Linux Localhost
- Code:
sudo apt-get install -y ssmtp
We need to then need to edit, /etc/ssmtp/ssmtp.conf
- Code:
sudo gedit /etc/ssmtp/ssmtp.conf
- Code:
root=username@gmail.com
- Code:
mailhub=smtp.gmail.com:587
- Code:
rewriteDomain=
- Code:
hostname=username@gmail.com
- Code:
UseSTARTTLS=YES
- Code:
AuthUser=username
- Code:
AuthPass=password
- Code:
FromLineOverride=YES
Then add each account that you want to be able to send mail from by editing, ‘/etc/ssmtp/revaliases‘:
- Code:
root:username@gmail.com:smtp.gmail.com:587
- Code:
localusername:username@gmail.com:smtp.gmail.com:587
Last edited by jamied_uk on 5th June 2016, 02:03; edited 4 times in total
Re: Setting Up Mail Server On Linux Localhost
#
# Config file for sSMTP sendmail called /etc/ssmtp/ssmtp.conf
#
# The person who gets all mail for userids < 1000
# Make this empty to disable rewriting.
root=whateverdoesntmatterwhatgoeshere@gmail.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.gmail.com:587
# Where will the mail seem to come from? dosnt matter most of the time what you put here but
# test everything
rewriteDomain=google.com
# The full hostname dosnt matter most of the time what you put here but test everything
hostname=google.com
# the rest of the lines need to be authentic
UseSTARTTLS=YES
AuthUser=youremail@gmail.com
AuthPass=password
# 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
# Config file for sSMTP sendmail called /etc/ssmtp/ssmtp.conf
#
# The person who gets all mail for userids < 1000
# Make this empty to disable rewriting.
root=whateverdoesntmatterwhatgoeshere@gmail.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.gmail.com:587
# Where will the mail seem to come from? dosnt matter most of the time what you put here but
# test everything
rewriteDomain=google.com
# The full hostname dosnt matter most of the time what you put here but test everything
hostname=google.com
# the rest of the lines need to be authentic
UseSTARTTLS=YES
AuthUser=youremail@gmail.com
AuthPass=password
# 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
Re: Setting Up Mail Server On Linux Localhost
Useful Code
- Code:
echo "Email Test " | mail -s "testing Email" testemail@hotmail.com
sudo service mail restart
turn on and off
sudo chkconfig sendmail off
sudo apt-get install -y sendmail
Read https://www.google.com/settings/security/lesssecureapps
sudo gedit /etc/ssmtp/ssmtp.conf
sudo apt-get install -y ssmtp
Re: Setting Up Mail Server On Linux Localhost
To use gmail as an SMTP Server you need to make sure the settings are setup for less secure to enable linux to use your gmail
https://www.google.com/settings/security/lesssecureapps
https://www.google.com/settings/security/lesssecureapps
Similar topics
» Setting up SMTP for localhost web server for sending free emails using gmail
» how to setup a mail server on linux or ubuntu
» Linux Mint 18 Mail Server Via Gmail 2017
» Prevent Unwanted Cron Emails From Mail Server On Linux
» Setting up linux ssh server
» how to setup a mail server on linux or ubuntu
» Linux Mint 18 Mail Server Via Gmail 2017
» Prevent Unwanted Cron Emails From Mail Server On Linux
» Setting up linux ssh server
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum