LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 09-09-2003, 08:49 AM   #1
solkan
LQ Newbie
 
Registered: Sep 2003
Posts: 3

Rep: Reputation: 0
Unhappy Postfix Problem (Unknown User)


Hello,

I want to the following to work:

Each time someone in my LAN sents a mail via postfix, postfix checks if theres a responsible local user. IF NOT, the mail is forwarded to an external smtp. (atm I get Unknown User: ...)

How do achieve this?

Thanks and kind regards, Solkan
 
Old 09-09-2003, 08:20 PM   #2
MasterC
Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
What exactly do you want to happen? If the mail is NOT sent from a known local user, or from a known alias, then you want the mail dropped, or simply sent from the 'unknown' user (such as a Spam sender would want)?

Cool
 
Old 09-10-2003, 03:35 AM   #3
solkan
LQ Newbie
 
Registered: Sep 2003
Posts: 3

Original Poster
Rep: Reputation: 0
It should be sent from 'unknown' user to external mail server. The people in my LAN are trusted anyway and the local mail server is not open for external usage.

Main reason is to reduce traffic...
 
Old 09-10-2003, 03:52 PM   #4
MasterC
Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
You'll wanna look at the 'mynetworks' parameter, and specify the subnet (or class or other as noted in the main.cf) you want to allow mail from, this should be outlined in your main.cf but here's the exerpt to note:
Quote:
# By default, Postfix relays mail
# - from "trusted" clients (IP address matches $mynetworks) to any destination,
# - from "untrusted" clients to destinations that match $relay_domains or
# subdomains thereof, except addresses with sender-specified routing.
# The default relay_domains value is $mydestination.
Which pertains to:

Quote:
# TRUST AND RELAY CONTROL

# The mynetworks parameter specifies the list of "trusted" SMTP
# clients that have more privileges than "strangers".
#
# In particular, "trusted" SMTP clients are allowed to relay mail
# through Postfix. See the smtpd_recipient_restrictions parameter
# in file sample-smtpd.cf.
#
# You can specify the list of "trusted" network addresses by hand
# or you can let Postfix do it for you (which is the default).
#
# By default (mynetworks_style = subnet), Postfix "trusts" SMTP
# clients in the same IP subnetworks as the local machine.
# On Linux, this does works correctly only with interfaces specified
# with the "ifconfig" command.

# Specify "mynetworks_style = class" when Postfix should "trust" SMTP
# clients in the same IP class A/B/C networks as the local machine.
# Don't do this with a dialup site - it would cause Postfix to "trust"
# your entire provider's network. Instead, specify an explicit
# mynetworks list by hand, as described below.
#
# Specify "mynetworks_style = host" when Postfix should "trust"
# only the local machine.
#
#mynetworks_style = class
#mynetworks_style = subnet
#mynetworks_style = host

# Alternatively, you can specify the mynetworks list by hand, in
# which case Postfix ignores the mynetworks_style setting.
#
# Specify an explicit list of network/netmask patterns, where the
# mask specifies the number of bits in the network part of a host
# address.
#
HTH

Cool
 
Old 09-12-2003, 06:56 AM   #5
solkan
LQ Newbie
 
Registered: Sep 2003
Posts: 3

Original Poster
Rep: Reputation: 0
I have:

#
#mynetworks_style = class
mynetworks_style = subnet
#mynetworks_style = host

still (mailq):

6D9141DC100 536 Fri Sep 12 12:53:06 root@<hostname>.net
(unknown user: "a.user")
a.user@<hostname>.net

This User doesn't exit locally, right. But because of that I want this mail to be forwarded to external mail server, on which this user actually _exists_

It should be like: If <domain> is trusted and User doesn't exist locally, sent mail to external mail server. I DON'T GET IT!

Thanks for all answers!

Solkan

Last edited by solkan; 09-12-2003 at 07:04 AM.
 
Old 09-12-2003, 08:35 PM   #6
MasterC
Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
If you've defined mynetworks it will override mynetworks_style. Either way, be sure to restart postfix after making changes to the main.cf:
postfix reload

After that you **should** be able to relay, the above error shouldn't exist on **outgoing** email.

Just read over the FAQ and documentation, and I still think this is true, however, can you post up your full /etc/postfix/main.cf so we can see what's setup? If you feel it necessary, go ahead and use "example.net" instead of your actual domain where all references exist.

Cool
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
sendmail problem stat=User unknown singying304 Linux - Networking 1 10-07-2005 07:59 PM
Postfix/Unknown Users ]SK[ Linux - Software 1 07-05-2005 06:24 PM
postfix and php : recipient unknown jodaog Linux - Software 1 03-13-2005 10:25 AM
Problem with Sendmail unknown user relaying (LUSER_RELAY)... A08 Linux - Networking 5 07-04-2003 08:34 AM
Postfix "unknown user" bounce kphinney Linux - Networking 0 06-29-2003 02:29 PM


All times are GMT -5. The time now is 09:10 PM.

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