LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-17-2011, 11:29 PM   #1
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,555

Rep: Reputation: 177Reputation: 177
Setup Linux/sendmail from home network


(hope this is the right forum!)

I've set up numerous linux/sendmail configurations for hosts with static IPs, but never from a home office behind a router/firewall. So, I need some help.

I am using roadrunner at my home office. I have my home office linux sendmail.mc file shown at bottom (comments removed). I have a couple of PC's, a wireless router and this new linux host on the home office lan. All hosts, including linux, are setup for DHCP. The linux host gets 192.168.2.7 as its IP.

First puzzle, what domainname should I give this linux host? Should I use rr.com (roadrunner)? For my 1st test I used my business domain, even though it is located physically elsewhere (probably a bad idea). That is: novatec-inc.com.

I then tried sending a test message to my verizon phone and to my real personal account at novatec-inc.com specifying a reply-to as the same personal account. The bounced message is below.

I'm not too surprised that it had trouble delivering the message to my work account since it possibly got confused thinking that message should have been for local delivery (perhaps I should remove LOCAL_DOMAIN from my .mc file?). On the other hand, it appears to have contacted netsolmail.net which is where the mail.novatec-inc.com is hosted. I also appear to have spam rejections from vtext.com and spamhaus.org whereas mail normally sent from my actual office computer does not get such rejections.

Anyway - it appears I am very far off configuring the right things on this. It seems to me this is a fairly common application (home linux/mail use) so I have every confidence that some expert will be able to help me sort it out!

From MAILER-DAEMON@novatec-inc.com Mon Jan 17 13:57:35 2011
Return-Path: <MAILER-DAEMON@novatec-inc.com>
Date: Mon, 17 Jan 2011 13:57:35 -0500
From: Mail Delivery Subsystem <MAILER-DAEMON@novatec-inc.com>
To: postmaster@watcher.novatec-inc.com
Content-Type: multipart/report; report-type=delivery-status;
boundary="p0HIvZov003592.1295290655/watcher.novatec-inc.com"
Subject: Postmaster notify: see transcript for details
Auto-Submitted: auto-generated (postmaster-notification)
Status: RO

Part 1:

The original message was received at Mon, 17 Jan 2011 13:57:35 -0500
from localhost

----- The following addresses had permanent fatal errors -----
<mfoley@novatec-inc.com>

----- Transcript of session follows -----
554 5.0.0 Service unavailable

Part 2:
Content-Type: message/delivery-status


Part 3:
Content-Type: message/rfc822

From MAILER-DAEMON Mon Jan 17 13:57:35 2011
Return-Path: <MAILER-DAEMON>
Date: Mon, 17 Jan 2011 13:57:35 -0500
From: Mail Delivery Subsystem <MAILER-DAEMON>
To: <mfoley@novatec-inc.com>
Content-Type: multipart/report; report-type=delivery-status;
boundary="p0HIvZou003592.1295290655/watcher.novatec-inc.com"
Subject: Returned mail: see transcript for details
Auto-Submitted: auto-generated (failure)


Part 3.1:

The original message was received at Mon, 17 Jan 2011 13:57:34 -0500
from localhost [127.0.0.1]

----- The following addresses had permanent fatal errors -----
<mfoley@novatec-inc.com>
(reason: 551 76.181.74.190 listed on: http://www.spamhaus.org/lookup.lasso)
<6142053321@vtext.com>
(reason: 554 txslspamp1.vtext.com)

----- Transcript of session follows -----
... while talking to inbound.novatec-inc.com.netsolmail.net.:
<<< 551 76.181.74.190 listed on: http://www.spamhaus.org/lookup.lasso
554 5.0.0 Service unavailable
... while talking to smtp-bb.vtext.com.:
<<< 554 njbrspamp2.vtext.com
... while talking to smtp-sl.vtext.com.:
<<< 554 txslspamp1.vtext.com
554 5.0.0 Service unavailable

Part 3.2:
Content-Type: message/delivery-status


Part 3.3:
Content-Type: message/rfc822

From mfoley@novatec-inc.com Mon Jan 17 13:57:34 2011
Return-Path: <mfoley@novatec-inc.com>
Date: Sun, 16 Jan 2011 15:19:30 -0500
From: mfoley@novatec-inc.com
To: 6142053321@vtext.com
Cc: mfoley@novatec-inc.com
Subject: testing
User-Agent: Heirloom mailx 12.3 7/15/07
Content-Type: text/plain; charset=us-ascii

test message from watcher




---------------- sendmail.mc file ----------------
include(`../m4/cf.m4')
VERSIONID(`default setup for Slackware Linux')dnl
OSTYPE(`linux')dnl
define(`confPRIVACY_FLAGS', `authwarnings,novrfy,noexpn,restrictqrun')define(`confTO_IDENT', `0')dnl
FEATURE(`use_cw_file')dnl
FEATURE(`use_ct_file')dnl
FEATURE(`mailertable',`hash -o /etc/mail/mailertable.db')dnl
FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable.db')dnl
FEATURE(`access_db', `hash -T<TMPF> /etc/mail/access')dnl
FEATURE(`blacklist_recipients')dnl
FEATURE(`local_procmail',`',`procmail -t -Y -a $h -d $u')dnl
FEATURE(`always_add_domain')dnl
FEATURE(`redirect')dnl
MASQUERADE_AS(`novatec-inc.com')
FEATURE(`masquerade_envelope')
FEATURE(`masquerade_entire_domain')
EXPOSED_USER(`root')dnl
LOCAL_DOMAIN(`localhost.localdomain')dnl
MAILER(local)dnl
MAILER(smtp)dnl
MAILER(procmail)dnl
 
Old 01-18-2011, 03:58 PM   #2
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
The error you're getting is that your IP address is blacklisted at spamhaus.org. That's pretty common for the dynamic IP addresses issued by ISPs. You should be able to relay through your ISP with the following in your sendmailmc file:

Code:
define(`SMART_HOST', `your.isp.mail.server')dnl
You may also have problems if you use either rr.com or novatec-inc.com since they already resolve. You may end up adding /etc/hosts entries (or setting up your own DNS server) to over-ride their IP addresses. I may be wrong about that, but I wanted to avoid the possibility of it happening. I registered a domain name, got an account with dyndns.com and used ddclient to keep dyndns updated with my IP address.
 
Old 01-19-2011, 09:57 PM   #3
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,555

Original Poster
Rep: Reputation: 177Reputation: 177
Steve - sorry, I thought I had posted a rather elaborate response to your comment, but I kept getting the message, "Your submission could not be processed because you have logged in since the previous page was loaded." Don't know what that is about, but never mind. Just as well -- the short version is that your SMART_HOST solution worked just fine. When sending mail I use my work email as the reply address: mail -r myaccount@mywork.com, so no need to worry about incoming mail. If I wanted that, I have set up POP using getmail in the past, so that's not a problem. My sendmail.rc file ends up with:

define(`SMART_HOST', `my.isp.mail.server')dnl
MASQUERADE_AS(`mywork.com')
FEATURE(`masquerade_envelope')
FEATURE(`masquerade_entire_domain')

plus the standard directives as shown in my original post. I may not need the masquerading since I use the -r option in the mail client (what do you think?) I did have to change the local domain name to NOT be mywork.com because if I wanted to bcc to myaccount@mywork.com it would try to deliver to that user on the local host and, of course, fail. In the /etc/hosts I just use a dummy domain like alluneedizluv.local.

Since I am not delivering mail locally, I wonder if I should remove:

LOCAL_DOMAIN(`localhost.localdomain')dnl
MAILER(local)dnl
MAILER(procmail)dnl

Or do you think I need these even for outgoing mail (and perhaps to deliver bounces to root)?
 
Old 01-21-2011, 02:44 PM   #4
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
If the '-r' is working for you you won't need the masquerading to modify the envelope or re-write the sending domain. It shouldn't hurt to leave the local delivery stuff there - that way errors still get delivered to whoever the local postmaster is.
 
  


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
How to setup Linux DNS server for a small office/home network? lhnw08 Linux - Server 16 07-24-2009 06:35 AM
How to setup a home Network ? _GOGO_ Linux - Networking 9 10-03-2007 01:37 AM
Home Network Setup Help Linux Server running Windoze XP clients + ADSL router BeaverusIV Linux - Networking 10 04-22-2005 04:07 PM
Home network setup with network firewall/router Gates1026 Linux - Networking 4 01-17-2005 08:26 PM
Newbie wanna setup up a linux network on existing home network... marvc Linux - Networking 3 03-19-2003 09:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:51 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