LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-17-2016, 11:22 PM   #1
DBabo
Member
 
Registered: Feb 2003
Distribution: Fedora {latest}
Posts: 568

Rep: Reputation: 40
Post Setting email relay on Comcast network


Problem:
unable to send email from my (SOHO) server while on the Comcast network.

Disclaimer :
i'm sure there are better/proper ways to solve this problem. This is what i was able to put together after getting slowly mad over the 6 hours today.
You must have comcast username/password. Yes, you must register on comcast.net. Good part - it is free after service purchase.

Solution:

I'm running Scientific Linux 6.4 (aka RH) with postfix.
Out of the box setup didn't work:
connect to gmail-smtp-in.l.google.com[64.233.185.27]: Connection timed out (port 25)

Comcast closed port 25 on the public network and all smtp connections should use 587 - http://customer.xfinity.com/help-and...xfinity-email/

The following configuration should address following errors:
Code:
Feb 17 18:49:33 server postfix/smtp[12723]: 53D2F6248D: to=<XXXX@gmail.com>, relay=smtp.comcast.net[68.87.20.6]:587, delay=5903, delays=5903/0.08/0.31/0.08, dsn=5.1.0, status=bounced (host smtp.comcast.net[68.87.20.6] said: 550 5.1.0 <dbabo@server.home> sender rejected : invalid sender domain (in reply to MAIL FROM command))

Feb 17 19:07:08 server postfix/local[13143]: 88ABE62475: to=<XXXXX@gmail.com>, relay=local, delay=0.18, delays=0.11/0.01/0/0.06, dsn=5.1.1, status=bounced (unknown user: "XXXX")

Feb 17 19:18:34 server postfix/smtp[13480]: warning: SASL authentication failure: No worthy mechs found
Feb 17 19:18:34 server postfix/smtp[13480]: 1CB9F62475: to=<alpine-count@patches.freeiz.com>, relay=smtp.comcast.net[96.114.157.81]:587, delay=0.77, delays=0.15/0.04/0.57/0, dsn=4.7.0, status=deferred (SASL authentication failed; cannot authenticate to server smtp.comcast.net[96.114.157.81]: no mechanism available

Feb 17 19:33:19 server postfix/smtp[13717]: 6207E62493: to=<XXXX@server.home>, relay=smtp.comcast.net[96.114.157.81]:587, delay=0.79, delays=0.03/0/0.48/0.28, dsn=5.1.1, status=bounced (host smtp.comcast.net[96.114.157.81] said: 550 5.1.1 <XXXX@server.home> recipient invalid domain (in reply to RCPT TO command))

Feb 17 19:39:04 server postfix/smtp[13912]: connect to smtp.comcast.net[68.87.20.6]:587: Connection timed out
Final result:
Code:
Feb 17 21:48:17 server postfix/smtp[15279]: 97EC162475: to=<XXXX@gmail.com>, relay=smtp.comcast.net[96.114.157.81]:587, delay=0.99, delays=0.09/0.01/0.46/0.43, dsn=2.0.0, status=sent (250 2.0.0 KeoG1s00M4ZxyZj01eoHZW mail accepted for delivery)
There are 2 major parts to this :
a. allow outbound traffic to the stmp server on iptables:
Code:
#MAIL
$IPT -A OUTPUT -p TCP -o eth0 --dport 587 -m state --state NEW -j ACCEPT
b. Configure postfix to work with smtp.comcast.net as relay server:
1. you need to enable SSL auth by adding cyrus-sasl packages and configuring main.cf. Since i didn't want to look into which one i need and which ones i don't - i just installed them all. I quickly learned that cyrus-sasl-sql (at the time of this writing - cyrus-sasl-sql-2.1.23-13.el6_3.1.x86_64) is causing issues.

2. Configure main.cf:
Code:
smtp_generic_maps = hash:/etc/postfix/generic
inet_protocols = ipv4
relayhost = [smtp.comcast.net]:587
smtp_sasl_auth_enable = yes
smtp_generic_maps = hash:/etc/postfix/generic
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
c. Convince comcast server that you are legit user aka - you have a legit domain ( even though you are running off dynamic IP and (probably) do not have a legit registered domain):
change "generic" file to map you local username to some email you use to communicate with the world.
mine:
Code:
 oracle@server.home   some_email@gmail.com
d. Once you made the above changes to main.cf run the postmap to convert the sasl_passwd and "generic" files to their db:
Code:
postmap generic
postmap hash:/etc/postfix/sasl_passwd
restart postfix and you should be good.

Last edited by DBabo; 02-17-2016 at 11:25 PM.
 
Old 02-19-2016, 09:04 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,212
Blog Entries: 28

Rep: Reputation: 6111Reputation: 6111Reputation: 6111Reputation: 6111Reputation: 6111Reputation: 6111Reputation: 6111Reputation: 6111Reputation: 6111Reputation: 6111Reputation: 6111
Do you have a home or business account and have you checked your Terms of Service?

Many, if not most, US ISPs do not allow their mail servers to be used as relays and forbid public-facing servers unless you have a business account and a domain. This is largely because open relays were historically a popular vector for spam.

Last edited by frankbell; 02-19-2016 at 09:07 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help setting up email relay in Redhat Mackhand Linux - Software 1 08-26-2014 10:17 AM
Setting up comcast wifi in Ubuntu monkeylor Linux - Wireless Networking 2 08-15-2009 10:19 AM
Help with Mozilla Email config. comcast issue mojokk Linux - Software 2 09-26-2005 11:55 AM
Setting-up Comcast HSI dlabele Linux - Newbie 6 01-23-2005 03:19 PM
Getting Comcast Email on Home Linux Box mchirico LinuxQuestions.org Member Success Stories 0 06-28-2004 12:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration