Linux Mint 18 Mail Server Via Gmail 2017

View previous topic View next topic Go down

Linux Mint 18 Mail Server Via Gmail 2017

Post by jamied_uk on 8th May 2017, 14:05



1st Install Time

Code:
sudo apt insall -y mutt php sendmail ssmtp mailutils


Code:
sudo gedit /etc/ssmtp/ssmtp.conf


inside this file:


Code:
# Config file for SSMTP sendmail
# The person who gets all mail for userids < 1000
# Make this empty to disable rewriting.

root=postmaster

hostname=YOUR-MAIL-SERVER-HOSTNAME

AuthUser=USERNAME@gmail.com
AuthPass=YOUR-GMAIL-PASSWORDHERE
#UseTLS=YES
FromLineOverride=YES
mailhub=smtp.gmail.com:587
UseSTARTTLS=YES

# Alias Example
#root:USER@gmail.com:smtp.gmail.com:587

#rewriteDomain=

# 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=mail

FromLineOverride=YES


Code:
sudo gedit /etc/php/7.0/apache2/php.ini


inside php.ini

search and make sure path correct as below:


Code:
sendmail_path = /usr/sbin/sendmail -t -i -F"From Name" -f"USER@gmail.com"


Code:
sudo /etc/init.d/apache2 restart



Testing from cli

Code:
sudo sendmail -s "Test Email" TEST-EMAIL@hotmail.com < /dev/null

sudo mutt -s "Test Email" TEST-EMAIL@hotmail.com < /dev/null





More docs and testing links

http://jnet.forumn.biz/t74-your-own-mail-server#2179


Last edited by jamied_uk on 8th May 2017, 16:04; edited 1 time in total
avatar
jamied_uk
Admin

Posts : 2193
Join date : 2010-05-09
Age : 34
Location : UK

http://address-shortner.co.uk

Back to top Go down

Re: Linux Mint 18 Mail Server Via Gmail 2017

Post by jamied_uk on 8th May 2017, 15:47

Sendmail from command line is touch and go but it works via php web server for sending emails from a web page or script and from the command line mutt works fine, i don't bother with sendmail from command line anymore.
avatar
jamied_uk
Admin

Posts : 2193
Join date : 2010-05-09
Age : 34
Location : UK

http://address-shortner.co.uk

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

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