Responsible mail server use on a residential network?
July 6, 2007 1:51 PM   Subscribe

How do I send email from a linux box from my residential cable modem connection?

I've got a box running CentOS that fires a shell script every day. (The script backs up a friend's webserver via rsync) The log from the script is a text file that I turn into an email message. I want to send the message to my friend (at a gmail address).

When I send the messages, I get replies from gmail reading "The IP you're using to send email is not authorized."

It's implied that they want me to use my ISP's (TimeWarner) SMTP server, but I can't use that directly, mail relay restrictions and all.

I figured I could solve this problem by setting up Sender Policy Framework information for my domain. So I used I set up a TXT record for my domain with the appropriate SPF string.

Still, a few hours later, no go with GMail. Tried sending to another email address and found that my IP was listed with SpamHaus. Jumped through the requisite hoops there to attempt to remove my IP from their list.

I'm sure there's an obvious solution I'm overlooking.
posted by Wild_Eep to Computers & Internet (10 answers total)
Are you sure there is no outgoing mail server for that domain which you can use? I am on rcn, and they allow me to send out of their domain using without any authentication at all, as long as I am on one of their internal IP addresses. I have done the same thing on other cable systems while visiting friends and relatives with general success.

I would ask their tech support to see if there is some way to use their server.
posted by procrastination at 2:03 PM on July 6, 2007

You have to use your ISP's SMTP server, that's what 99% of the people do when their assigned IP is part of the Residential IP block list.

You should be able to set up your mailers (sendmail or whatever) to utilize your ISP SMTP server. That's your best bet. They have no reason not to allow this. This is how they intend for you to use it.
posted by iheartcanada at 2:05 PM on July 6, 2007

If you want to run your own SMTP server from a closet, you're going to need a lot of things:

1. You must understand how to configure your system correctly for it (outside the scope of this answer);

2. You must use an ISP that will allow you to do this (my ISP blocks outbound port 25 unless you request it be opened, and if you request it, they'll scan your IP every day to make sure your mail server isn't an open relay);

3. You must configure your mail server so that it isn't an open relay, and doesn't APPEAR to be an open relay -- not only does my ISP scan to make sure I'm not open, but various spam blacklists do the same thing, and I got blocked once because I had an inconsistent message going out to their scan;

4. You must have the patience to track down and fix bounced mails. Mail I sent to a friend at Harvard was bouncing repeatedly; I finally stumbled across an online document dated years before outlining their plan to block mail from all residential IPs. I had to speak with someone there (who was very nice) to get an exception made for my IP.

So use your ISP's SMTP server, or give up, unless you have time and energy and a real need to do this.
posted by davejay at 2:10 PM on July 6, 2007

Use your ISP's SMTP server, that's what it's there for.
posted by Skorgu at 2:15 PM on July 6, 2007

Okay, sounds like diving into the sendmail config files and docs is next.
posted by Wild_Eep at 2:17 PM on July 6, 2007

If you're not stuck on sendmail, Postfix is probably more secure, and it's a lot easier to configure. The documentation is a little weak, mostly because it's scattered all over the freaking place, but it's pretty straightforward once you get a handle on it.

Sendmail, on the other hand, is the single most difficult program to configure I've ever personally dealt with. I'd suggest avoiding it if you have any real choice in the matter.
posted by Malor at 2:37 PM on July 6, 2007

Ssmtp is what I use from my home cable connection to send mail through my gmail account. Postfix will also work but is a little harder to configure. Ssmtp can be called from a simple shell script


/usr/sbin/ssmtp -au "" \
-ap "your_password"

I don't know if it is packaged for CentOs but you can grab the source code from the Debian link. It is the smallest program that I know of that can handle tsl, which you need for gmail.
posted by calumet43 at 3:52 PM on July 6, 2007

Sorry I read the original post wrong. You would need to either use your friends gmail account to use ssmtp or setup your own gmail account to email through. I also forgot to mention that you need to enable pop access on your gmail account.
posted by calumet43 at 4:04 PM on July 6, 2007

It's entirely possible, if a bit of a surprise, that gmail does not accept mail from large blocks of IP addresses known to be allocated to residential users.
posted by TravellingDen at 5:46 PM on July 6, 2007

Well, out of nowhere, and with no further effort on my part (since the SPF additions to my DNS records), google is now receiving my mail trouble-free.
posted by Wild_Eep at 1:00 PM on July 7, 2007

« Older need tasty, fruity, recipe to satiate alchoholics   |   Do we need a real estate agent for a hot, hot, hot... Newer »
This thread is closed to new comments.