PC & IT SUPPORT MADE EASY FORUM
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Setting Up Mail Server On Linux Localhost

Go down

Setting Up Mail Server On Linux Localhost Empty Setting Up Mail Server On Linux Localhost

Post by jamied_uk 19th November 2013, 14:00

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


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
jamied_uk
jamied_uk
Admin

Posts : 3053
Join date : 2010-05-09
Age : 41
Location : UK

https://jnet.sytes.net

Back to top Go down

Setting Up Mail Server On Linux Localhost Empty Re: Setting Up Mail Server On Linux Localhost

Post by jamied_uk 20th November 2013, 00:52

#
# 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
jamied_uk
jamied_uk
Admin

Posts : 3053
Join date : 2010-05-09
Age : 41
Location : UK

https://jnet.sytes.net

Back to top Go down

Setting Up Mail Server On Linux Localhost Empty Re: Setting Up Mail Server On Linux Localhost

Post by jamied_uk 5th June 2016, 00:22

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
jamied_uk
jamied_uk
Admin

Posts : 3053
Join date : 2010-05-09
Age : 41
Location : UK

https://jnet.sytes.net

Back to top Go down

Setting Up Mail Server On Linux Localhost Empty Re: Setting Up Mail Server On Linux Localhost

Post by jamied_uk 5th June 2016, 02:09

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
jamied_uk
jamied_uk
Admin

Posts : 3053
Join date : 2010-05-09
Age : 41
Location : UK

https://jnet.sytes.net

Back to top Go down

Setting Up Mail Server On Linux Localhost Empty Re: Setting Up Mail Server On Linux Localhost

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum