kyle95wm
Phone Genius Owner
- Joined
- Apr 16, 2016
- Messages
- 520
- Reaction score
- 90
@kmcdaniel - try the script below (make sure to edit placeholders) to use gmail asn an SMTP relay. This is way better for any type of insstall.:
Code:
#!/bin/bash
cd /etc/mail || exit
hostname -f > genericsdomain
touch genericstable
makemap -r hash genericstable.db < genericstable
mv sendmail.mc sendmail.mc.original
wget http://incrediblepbx.com/sendmail.mc.gmail
cp sendmail.mc.gmail sendmail.mc
mkdir -p auth
chmod 700 auth
cd auth || exit
echo AuthInfo:smtp.gmail.com \"U:smmsp\" \"I:YOUR_GMAIL_USERNAME_WITHOUT_AT_GMAIL\" \"P:YOUR_PASSWORD_HERE\" \"M:PLAIN\" > client-info
echo AuthInfo:smtp.gmail.com:587 \"U:smmsp\" \"I:YOUR_GMAIL_USERNAME_WITHOUT_AT_GMAIL\" \"P:YOUR_PASSWORD_HERE\" \"M:PLAIN\" >> client-info
echo AuthInfo:smtp.gmail.com:465 \"U:smmsp\" \"I:YOUR_GMAIL_USERNAME_WITHOUT_AT_GMAIL\" \"P:YOUR_PASSWORD_HERE\" \"M:PLAIN\" >> client-info
chmod 600 client-info
makemap -r hash client-info.db < client-info
cd /etc/mail || exit
yum -y install sendmail-cf
make
service sendmail restart
echo "test from server $(curl -s icanhazip.com)" | mail -s testmessage [email protected]
Last edited by a moderator: