True to form, Comcast has recently taken to screwing its customers by shutting down port 25 on your cable modem. Other ISPs will no doubt follow suit. This means you not only can't run your own SMTP server on a box such as
PBX in a Flash, but you can't even connect through a mail client to your provider's SMTP server to send mail on the traditional port 25. To find out whether your provider has done it to you, issue the following command. If it times out, you lose. Otherwise, you're still OK. Type
quit to exit.
telnet cutedgesystems.com 25
What you basically need is an SMTP relay host that supports port 587 and 465 mail traffic. We already have documented
how to do this with Comcast, but you also can use
gMail.
Configuring
gMail to handle the change was painful so I thought I'd document the steps for those of you that get screwed next.

When you complete the following steps, outbound emails (including voicemails that have been configured for delivery by email in FreePBX) will be sent from your
PBX in a Flash server through SendMail to gMail's secure server on port 587 or 465 for forwarding. You will need your
gMail username and password to complete this install.
This tutorial is for
PBX in a Flash systems only and assumes you already have performed the email fixup steps outlined in this
Nerd Vittles tutorial. If not, do that first. Then log into your server as root and issue the following commands in order:
|
Code:
|
cd /etc/mail
hostname -f > genericsdomain
touch genericstable
makemap -r hash genericstable.db < genericstable
mv sendmail.mc sendmail.mc.original
wget http://pbxinaflash.net/source/sendmail/sendmail.mc.gmail
cp sendmail.mc.gmail sendmail.mc
mkdir -p auth
chmod 700 auth
cd auth
echo AuthInfo:smtp.gmail.com /"U:smmsp/" /"I:user_id/" /"P:password/" /"M:PLAIN/" > client-info
echo AuthInfo:smtp.gmail.com:587 /"U:smmsp/" /"I:user_id/" /"P:password/" /"M:PLAIN/" >> client-info
echo AuthInfo:smtp.gmail.com:465 /"U:smmsp/" /"I:user_id/" /"P:password/" /"M:PLAIN/" >> client-info
# Stop here and edit client-info (nano -w client-info) in both lines.
# Replace user_id with your gMail account name without @gmail.com
# Replace password with your real gMail password
# Be sure to replace the double-quotes shown above if they don't appear in the file!!!
# Save your changes (Ctrl-X, Y, then Enter)
chmod 600 client-info
makemap -r hash client-info.db < client-info
cd ..
make
service sendmail restart |
Now you should be back in business. Special thanks to
Linux Home Automation for all the helpful information.
WARNING: This design has not been tested with direct exposure of SendMail to the Internet and should NOT be used without at least the PBX in a Flash firewall in place to block inbound port 25 and 587 and 465 traffic. If you don't heed this advice, you may risk turning your server into an Internet mail relay host in which case you'll probably lose (what's left of) your broadband account for aiding and abetting the proliferation of... 