LinuxQuestions.org
Visit Jeremy's Blog.
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 02-24-2003, 03:12 PM   #1
A08
LQ Newbie
 
Registered: Jun 2002
Location: Earth/Europe/Ireland/Wicklow/Bray
Distribution: Gentoo
Posts: 17

Rep: Reputation: 0
Unhappy Problem with Sendmail unknown user relaying (LUSER_RELAY)...


Redhat 7.3
Sendmail 8.12-5

Hi,

I need to set up two machines which act as email servers for several accounts locally and if the account isn't found locally to forward it to an external server.

Example:
internet.domain.com - knows about all users
server1.domain.com - knows about user1 and user2

All addresses should be masqueraded as '@domain.com' - like 'user1@domain.com'

1. If you send from 'server1' a message to 'user1', it shell be delivered locally.
2. If you send from 'server1' a message to 'user3', it cannot be found and should be forwarded to 'internet.domain.com'

The forwarding part works using 'LUSER_RELAY', but it will change the part after '@' to the domain/host to relay to - example:
'user@domain.com' becomes 'user@internet.domain.com'

I tried using the Feature 'preserve_luser_host', but unfortunately this did not change anything. The readme says that this will only work when the hostname has been passed to the mailer.

Any Idea how I can pass the hostname to the mailer or get my stuff to work somehow?


thank you very much,
Chris
 
Old 07-02-2003, 10:53 AM   #2
AlexDfr
LQ Newbie
 
Registered: Jul 2003
Posts: 3

Rep: Reputation: 0
Hi,

I have exactly the same issue...
Any idea?

Alex
 
Old 07-03-2003, 07:44 AM   #3
A08
LQ Newbie
 
Registered: Jun 2002
Location: Earth/Europe/Ireland/Wicklow/Bray
Distribution: Gentoo
Posts: 17

Original Poster
Rep: Reputation: 0
Smile My Solution/Workaround

Hi,

I could solve the problem by configuring sendmail with the following options in sendmail.mc (and afterwards compile it with m4):

MASQUERADE_AS(`domain.com')dnl
define(`LUSER_RELAY', `domain.com.')dnl

do not forget the DOT after the domain name to forward it to. Of course the DNS resolution has to work properly for this to work, but many provider send anything going to your domain anyway to the right server

I hope it will work in your case as well and if it doesn't: let me know.


Cheers,
A08
 
Old 07-03-2003, 09:58 AM   #4
AlexDfr
LQ Newbie
 
Registered: Jul 2003
Posts: 3

Rep: Reputation: 0
Thanks for your quick response. I really appreciate.

Here is what I've done after your answer :

MASQUERADE_AS(`domain.com')dnl
define(`LUSER_RELAY', `smtp:hostname')dnl

But unknown users @domain.com are still relayed to hostname with the address unknown.user@hostname ((
It didn't change anything. How is it possible?

Alex
 
Old 07-03-2003, 10:29 AM   #5
A08
LQ Newbie
 
Registered: Jun 2002
Location: Earth/Europe/Ireland/Wicklow/Bray
Distribution: Gentoo
Posts: 17

Original Poster
Rep: Reputation: 0
That was exactly the problem I had before - in your case I would do the following:

change your LUSER_RELAY to domain.com:
define(`LUSER_RELAY', `domain.com.')dnl

Do not forget the trailing dot. The 'smtp:' part is not required, because smtp is the default anyway. Then change your DNS configuration, so that 'domain.com' points to the ip address of the target server - it will probably also work with /etc/hosts file, but I haven't tested it yet.

Do you actually try to relay internally or do you route the email out to the internet?


cheers,
Chris
 
Old 07-04-2003, 07:34 AM   #6
AlexDfr
LQ Newbie
 
Registered: Jul 2003
Posts: 3

Rep: Reputation: 0
Hi Chris,

Thanks for your help Chris. It is working great now.
I need to relay internally between the old mail server and the 'future' new one.
My problem now is that the old mail server supports domain1.com and domain2.com. Now all unknown users are relayed to the new mail server with unknown.user@domain1.com.
What I want is : domain1.com 'masqueraded' as domain1.com and domain2.com 'masqueraded' as domain2.com. Do you think I can use the : MASQUERADE_DOMAIN_FILE(`filename') ?


Alex
 
  


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
Sendmail Unknown user (has a valid domain) Nico Linux - Newbie 4 02-19-2007 09:59 AM
sendmail problem stat=User unknown singying304 Linux - Networking 1 10-07-2005 06:59 PM
sendmail relaying problem mhatre kedar Linux - Networking 4 03-18-2005 04:49 PM
Sendmail relaying problem (1/2 Noob!) Nerd2 Linux - Security 7 08-21-2003 04:35 PM
sendmail 8.12.9 relaying problem dunc Linux - Networking 3 04-28-2003 09:50 AM

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

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