LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 11-14-2003, 11:23 AM   #1
ilovebytes
LQ Newbie
 
Registered: Nov 2003
Posts: 15

Rep: Reputation: 0
Unhappy mail relay problem with sendmail


hi i have a few questions regarding mail relaying with sendmail

the problem is this :
i have a lan here which is connected through a router(linux machine running redhat 9)
to the internet. All that functions fine but , now my problem is that my mailserver in the lan cannot directly be reached from the net.

so i wanted to configure a sendmail mail relay on the router which forwards the mail for my domain to the mailserver in the lan

therefore i made this changes to the mailertable to define to which host in my lan the mail shoot be sent


my-net.com smtp:[10.1.1.222] (the adress of the mailserver in my lan)
.my-net.com smtp:[10.1.1.222]


and the following changes to the relay-domains


my-net.com

which should define the domains the relaying is allowed to i think
all other settings i let on default.


but now when somone trys to send mail to my domain from the outside , the following message is sent back :

PHP Code:
553 sorrythat domain isnt in my list of allowed rcpthosts (#5.7.1) 

and on the mail log of my router is the following message :

PHP Code:
Nov 14 15:32:12 route sm-msp-queue[4284]:hACLCoqY003077to [email]fred.feuerstein@my-net.com[/emaildelay=1+12:02:19xdelay=00:00:00mailer=relaypri=30049relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0stat=DeferredConnection refused by [127.0.0.1
why is in my log that relay goes to 127.0.0.1 and not to 10.1.222

so no mail comes in


maybe anybody can help me out , i don`t know whats going wrong there
would be great

are there any howtos to this problem ?

greetz
 
Old 11-14-2003, 12:00 PM   #2
Finlay
Senior Member
 
Registered: Mar 2003
Location: Seattle
Distribution: Slackware ?-14.1
Posts: 1,029

Rep: Reputation: 47
You need to open the mail ports on your router/firewall to allow them to pass through to the mailserver
 
Old 11-14-2003, 06:39 PM   #3
DaveG
Member
 
Registered: Nov 2001
Location: London, UK
Distribution: Fedora 16
Posts: 160

Rep: Reputation: 41
You could try port forwarding (or DNAT) to just redirect the incoming packets directly to the mail server. That would "skip a hop". No need for the relay.
You would have just as much control at the router firewall and you could tighten the firewall on the mail server to only accept connections from the router if required.
I'm not sure what the implications would be regarding sendmail connection control and logging, i.e. what source IP address the mail server would see.
The NAT-HOWTO has the details.
 
Old 11-15-2003, 07:44 AM   #4
ilovebytes
LQ Newbie
 
Registered: Nov 2003
Posts: 15

Original Poster
Rep: Reputation: 0
thx for your answers , i already thought of direct port forwarding myself , i am going to give it a try, but i will also try to get the mail relay to work.

@Finl ay the ports for smtp on my router/firewall are open otherwise the mail relay on the router would not even respond or block anything

greetz ilovebytes

Last edited by ilovebytes; 11-15-2003 at 07:46 AM.
 
Old 11-15-2003, 07:35 PM   #5
J_Szucs
Senior Member
 
Registered: Nov 2001
Location: Budapest, Hungary
Distribution: SuSE 6.4-11.3, Dsl linux, FreeBSD 4.3-6.2, Mandrake 8.2, Redhat, UHU, Debian Etch
Posts: 1,126

Rep: Reputation: 58
No need for the mail relay.

Just do the port redirection. It is much simpler, and it should work immediately.
 
Old 11-16-2003, 07:56 AM   #6
ilovebytes
LQ Newbie
 
Registered: Nov 2003
Posts: 15

Original Poster
Rep: Reputation: 0
hi i did as most of you suggested the redirecting , its really much easier , and it works fine thx for your help.


greetz
 
  


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
Using sendmail to relay mail to ISP mail server Swift&Smart Linux - Software 26 11-09-2008 03:00 PM
Mail Relay Server by using Sendmail raymond117 Linux - Security 2 05-11-2005 10:25 AM
local mail relay problem in Sendmail RajaRC Linux - Networking 3 09-15-2004 07:23 AM
relay mail to sendmail relay server??? lemay_jeff Linux - Newbie 0 07-06-2004 04:54 PM
Sendmail relay mail problem Swift&Smart Linux - Software 15 10-30-2003 09:14 PM


All times are GMT -5. The time now is 12:02 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration