LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 08-30-2012, 11:08 PM   #1
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,555

Rep: Reputation: 177Reputation: 177
howto sendmail with redirected port


I have a fairly vanilla sendmail setup I've used before, but is not working now. I think the difference is that the IP address for the mail server and MX record resolves to a router which forwards port 25 to an machine with a LAN IP of 192.168.2.100. I think this is messing things up, but I don't know how to fix it. Here is my .mc file:

include(`../m4/cf.m4')
VERSIONID(`$Id: fluxrunner.mc,v 1.0 2009/08/08 11:07:18 root Exp root $')dnl
OSTYPE(`linux')dnl
define(`confPRIVACY_FLAGS', `authwarnings,novrfy,noexpn,restrictqrun')dnl
define(`confTO_IDENT', `0')dnl
define(`confBAD_RCPT_THROTTLE',`1')dnl
define(`confCONNECTION_RATE_THROTTLE',`3')dnl
define(`confDEAD_LETTER_DROP',`/dev/null')dnl
define(`confDOUBLE_BOUNCE_ADDRESS',`nobody')dnl
define(`confDF_BUFFER_SIZE',`16384')dnl
define(`confXF_BUFFER_SIZE',`16384')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(`lookupdotdomain')dnl
FEATURE(`blacklist_recipients')dnl
FEATURE(`dnsbl', `dul.dnsbl.sorbs.net')dnl
FEATURE(`delay_checks',`friend',`n')dnl
FEATURE(`local_procmail',`',`procmail -t -Y -a $h -d $u')dnl
FEATURE(`always_add_domain')dnl
FEATURE(`redirect')dnl
MASQUERADE_AS(`cantleysauto.com')
FEATURE(`masquerade_envelope')
FEATURE(`masquerade_entire_domain')
FEATURE(`relay_entire_domain')dnl
EXPOSED_USER(`root')dnl
LOCAL_DOMAIN(`localhost.localdomain')dnl
MAILER(local)dnl
MAILER(smtp)dnl
MAILER(procmail)dnl

Here is the /etc/maillog info after trying to send from a local user account to my account at a remote location:


Aug 29 19:59:49 mail sm-mta[1797]: gethostbyaddr(192.168.2.100) failed: 1
Aug 29 19:59:49 mail sm-mta[1798]: starting daemon (8.14.4): SMTP+queueing@00:25:00
Aug 29 19:59:53 mail sm-msp-queue[1801]: starting daemon (8.14.4): queueing@00:25:00
Aug 29 20:00:05 mail sm-mta[2256]: q7U005LQ002256: cpe-76-181-75-238.columbus.res.rr.com [76.181.75.238] did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA
Aug 29 20:06:09 mail sm-mta[1799]: q7TNv2Gs028575: to=<mfoley@novatec-inc.com>, ctladdr=<mfoley@mail> (1000/100), delay=00:09:04, xdelay=00:06:19, mailer=esmtp, pri=120466, relay=inbound.novatec-inc.com.netsolmail.net. [205.178.149.7], dsn=4.0.0, stat=Deferred: Connection timed out with inbound.novatec-inc.com.netsolmail.net.
Aug 29 20:10:05 mail sm-mta[6129]: q7U0A5n5006129: cpe-76-181-75-238.columbus.res.rr.com [76.181.75.238] did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA
Aug 29 20:20:05 mail sm-mta[10008]: q7U0K5e5010008: cpe-76-181-75-238.columbus.res.rr.com [76.181.75.238] did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA


Notice the "gethostbyaddr(192.168.2.100) failed: 1" error.

I added 192.168.2.100 to my /etc/hosts file and got the following in maillog:

Aug 30 12:55:02 mail sm-mta[1792]: starting daemon (8.14.4): SMTP+queueing@00:25:00
Aug 30 12:55:02 mail sm-msp-queue[1795]: starting daemon (8.14.4): queueing@00:25:00
Aug 30 12:55:03 mail sm-mta[1793]: q7UGoA45005574: to=<mfoley@mail.cantleysauto.com>, ctladdr=<mfoley@mail.cantleysauto.com> (1000/100), delay=00:04:51, xdelay=00:00:00, mailer=local, pri=150678, dsn=2.0.0, stat=Sent
Aug 30 13:00:02 mail sm-mta[3804]: q7UH02Fu003804: cpe-76-181-75-238.columbus.res.rr.com [76.181.75.238] did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA
Aug 30 13:01:24 mail sm-mta[1793]: q7UGoA45005574: to=<mfoley@novatec-inc.com>, ctladdr=<mfoley@mail.cantleysauto.com> (1000/100), delay=00:11:12, xdelay=00:06:21, mailer=esmtp, pri=150678, relay=inbound.novatec-inc.com.netsolmail.net. [205.178.149.7], dsn=4.0.0, stat=Deferred: Connection timed out with inbound.novatec-inc.com.netsolmail.net.
Aug 30 13:01:24 mail sm-mta[1793]: q7UGYUBH031628: to=<mfoley@novatec-inc.com>, ctladdr=<mfoley@mail.cantleysauto.com> (1000/100), delay=00:26:53, xdelay=00:00:00, mailer=esmtp, pri=210509, relay=inbound.novatec-inc.com.netsolmail.net., dsn=4.0.0, stat=Deferred: Connection timed out with inbound.novatec-inc.com.netsolmail.net.
Aug 30 13:10:02 mail sm-mta[7669]: q7UHA2Rk007669: cpe-76-181-75-238.columbus.res.rr.com [76.181.75.238] did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA
Aug 30 13:20:02 mail sm-mta[11533]: q7UHK2RI011533: cpe-76-181-75-238.columbus.res.rr.com [76.181.75.238] did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA
Aug 30 13:26:23 mail sm-mta[11534]: q7UGoA45005574: to=<mfoley@novatec-inc.com>, ctladdr=<mfoley@mail.cantleysauto.com> (1000/100), delay=00:36:11, xdelay=00:06:19, mailer=esmtp, pri=240678, relay=inbound.novatec-inc.com.netsolmail.net. [205.178.149.7], dsn=4.0.0, stat=Deferred: Connection timed out with inbound.novatec-inc.com.netsolmail.net.
Aug 30 13:26:23 mail sm-mta[11534]: q7UGYUBH031628: to=<mfoley@novatec-inc.com>, ctladdr=<mfoley@mail.cantleysauto.com> (1000/100), delay=00:51:52, xdelay=00:00:00, mailer=esmtp, pri=300509, relay=inbound.novatec-inc.com.netsolmail.net., dsn=4.0.0, stat=Deferred: Connection timed out with inbound.novatec-inc.com.netsolmail.net.
Aug 30 13:30:02 mail sm-mta[15397]: q7UHU2QO015397: cpe-76-181-75-238.columbus.res.rr.com [76.181.75.238] did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA

No more gethostbyaddr error, but still not working. I suspect the problem is that 192.168.2.100 does not correspond to the real external MX IP address, but if that's the case, I don't know how to fix it. Help?
 
  


Reply

Tags
firewall, port forwarding, router, sendmail



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
Redirected lpt printer port via samba on Fedora 9 cahalsall Linux - Server 9 09-22-2008 09:25 PM
Changing port in sendmail, sendmail not working. flschou Linux - Newbie 4 01-16-2008 09:03 AM
Howto do Secured ssh from port https or port80(standard) to ssh d listening port 22 ? Xeratul Linux - General 4 11-23-2006 06:09 AM
SF Thinstation redirected com port baud rate JoDee Linux - Software 0 09-11-2006 12:25 PM
Sendmail settings. Will sendmail always answer "helo". (and tracing blocked port 25) Bjorkli Linux - Networking 5 05-24-2004 03:13 AM

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

All times are GMT -5. The time now is 08:51 AM.

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