Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 11-14-2003, 12:23 PM   #1
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 smtp:[] (the adress of the mailserver in my lan) smtp:[]

and the following changes to the relay-domains

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 isn't 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][/emaildelay=1+12:02:19xdelay=00:00:00mailer=relaypri=30049relay=[] [], dsn=4.0.0stat=DeferredConnection refused by [
why is in my log that relay goes to 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 ?

Old 11-14-2003, 01:00 PM   #2
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, 07:39 PM   #3
Registered: Nov 2001
Location: London, UK
Distribution: Fedora
Posts: 161

Rep: Reputation: 43
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, 08:44 AM   #4
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 08:46 AM.
Old 11-15-2003, 08:35 PM   #5
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, 08:56 AM   #6
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.



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

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

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