Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Postfix Problem
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
cfrogjump
n00b
n00b


Joined: 17 Apr 2002
Posts: 20
Location: Utah

PostPosted: Thu Dec 19, 2002 5:16 am    Post subject: Postfix Problem Reply with quote

Ok here's my problem. I am currently running courier-imap, postfix, and squirrelmail. I can receive mail fine. I can send mail using squirrelmail. Everytime I try and send mail from a remote host I get the following error:
Code:
554 <xxxx@xxxxx.org>: Recipient address rejected: Relay access denied


Does anyone have any idea how to setup postfix to relay mail for authorized users?

Thanks,

cfrogjump
Back to top
View user's profile Send private message
pem725
n00b
n00b


Joined: 26 Sep 2002
Posts: 68
Location: Tucson, AZ USA

PostPosted: Thu Dec 19, 2002 6:00 am    Post subject: Reply with quote

Have you checked out:

http://www.postfix.org/faq.html#relaying

Ordinarily I wouldn't merely suggest you read the FAQ but it might offer more insight into your problem than me merely guessing at all of your parameters. Also, I suspect that the FAQ may be more accurate.

I tackled postfix just recently on several machines - some networked in a subnet and all relayed through a caching proxy server that ran postfix. The relay was easy to setup but then again I had a domain name through dyndns. Perhaps you might want to investigate that option:

see http://www.dyndns.org

Very handy. HTH.
_________________
Cheers,
Patrick

Do the community a favor and answer a few stranded messages. I'm off to answer one now...thanks to gentoo!
Back to top
View user's profile Send private message
phunkphorce
Tux's lil' helper
Tux's lil' helper


Joined: 22 Nov 2002
Posts: 145

PostPosted: Thu Dec 19, 2002 9:06 am    Post subject: Easy Reply with quote

By default Postfix only relays mail that comes from the same domain as the machine's or from machines that are in the same network. Well, to be more precise (copied from Postfix's documentation):
Quote:

# By default, Postfix relays mail
# - from trusted clients whose IP address matches $mynetworks,
# - from trusted clients matching $relay_domains or subdomains thereof,
# - 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.
#
# In addition to the above, the Postfix SMTP server by default accepts mail
# that Postfix is final destination for:
# - destinations that match $inet_interfaces,
# - destinations that match $mydestination
# - destinations that match $virtual_maps.
# These destinations do not need to be listed in $relay_domains.

It's something they call security :D

As the first reply to your post, the topic of 'mail relaying' is widely covered in the FAQ/documentation of Postfix so you'd better have a look at it. Otherwise, have a look at the parameter relay_domains in the /etc/postfix/main.cf
_________________
O God, Thou art in Heaven...
...please stay there!
Back to top
View user's profile Send private message
cfrogjump
n00b
n00b


Joined: 17 Apr 2002
Posts: 20
Location: Utah

PostPosted: Thu Dec 19, 2002 7:05 pm    Post subject: Reply with quote

I have read most of the docs on the postfix site as well as what I could find here. I also understand why they have it setup the way they do.

The reason that I want to be able to have authorized user send mail is because I offer email account to my friends and family. It works great through squirrelmail but if someone wants to use evolution, kmail, or even outlook to check and send email it doesn't work. They can check mail fine but can't reply or send new mail, save to people who are also on my system.

Does anyone have any suggestions on how to set it up this way? or Am I going to have to switch to something like qmail or use sendmail instead?
Back to top
View user's profile Send private message
phunkphorce
Tux's lil' helper
Tux's lil' helper


Joined: 22 Nov 2002
Posts: 145

PostPosted: Thu Dec 19, 2002 10:27 pm    Post subject: Reply with quote

cfrogjump wrote:
The reason that I want to be able to have authorized user send mail is because I offer email account to my friends and family. It works great through squirrelmail but if someone wants to use evolution, kmail, or even outlook to check and send email it doesn't work. They can check mail fine but can't reply or send new mail, save to people who are also on my system.

Does anyone have any suggestions on how to set it up this way? or Am I going to have to switch to something like qmail or use sendmail instead?

No, dont' worry, you won't have to switch to qmail or anything else. All you have to do is tell Postfix to accept mails for the domains of the persons who will be using your mail server. For example, if one of them is using yahoo.com and another one is using whatever.net, then configure postfix so that it accepts emails with destination yahoo.com and whatever.net. As I said in my previous post, have a look at the relay_domains parameter in your /etc/postfix/main.cf, where you can specify to which domains your machine will accept mail. You can configure it the easy way, saying that it should take any email sent to yahoo.com and whatever.net, or be more precise (and secure!!) and specify the ip of those machines so that postfix recognizes them whenever they're trying to send and relays the mails.

Again, let's have a look at Postfix's documentation:
Quote:
# - from trusted clients whose IP address matches $mynetworks,
# - from trusted clients matching $relay_domains or subdomains thereof,
# - 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.
Just follow these instructions, you shouldn't have any problem with it with something like this:
Code:
relay_domains=yahoo.com, whatever.net, $mydestination

Good luck!
_________________
O God, Thou art in Heaven...
...please stay there!
Back to top
View user's profile Send private message
Alowishus
n00b
n00b


Joined: 18 Apr 2002
Posts: 22

PostPosted: Fri Dec 20, 2002 3:59 am    Post subject: Reply with quote

Alternate solutions would be:

1) set up SMTP authentication under Postfix so mail clients who authenticate are allowed to relay (http://postfix.state-of-mind.de/patrick.koetter/smtpauth/)

2) set up a POP-before-relay script which will tell Postfix to temporarily allow relaying from any IP which has performed a valid POP retrieval (http://www.stahl.bau.tu-bs.de/~hildeb/postfix/pop-before-smtp_en.shtml)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum