Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 24th November 2010, 06:51
rodobrist rodobrist is offline
Member
 
Join Date: Sep 2010
Posts: 30
Thanks: 10
Thanked 2 Times in 2 Posts
Default Postfix Relay Acess denied

Hi All,

ive set up postfix with courier imap/pop on ubuntu .... and i am trying to configure postfix

everything works (i can email within my domain)
ie root@roderick.dyndns.info can email fmaster@roderick.dyndns.info

i can login with outlook on a desktop far far away(i am saying this because i have read other forums who found the issue was in the client)

i can even receive email from my hotmail
myemailadress@hotmail.com

but i cannot send email... i have read around and tried numerous combinations for mydestination and myhost name... because that seems to be the common fix

no sucsess

this is the outlook error message
The following recipient(s) cannot be reached:

'myemailadress@hotmail.com' on 24/11/2010 4:33 PM
554 5.7.1 <not telling@hotmail.com>: Relay access denied

this is an exerpt from netcat

MAIL FROM:<root@roderick.dyndns.info>
#250 2.1.0 Ok
#RCPT TO:<myemailadress@hotmail.com>
#554 5.7.1 <myemailadress@hotmail.com>: Relay access denied
#RCPT TO:<fmaster@roderick.dyndns.info>
#250 2.1.5 Ok

and here is the only relevent part of main.cf (relevent to my knowledge)


myhostname = mail.roderick.dyndns.info
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = mail.roderick.dyndns.info roderick.dyndns.info, localhost.dyndns.info, dyndns.info
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
home_mailbox = Maildir/
mailbox_command =



I tried not to run to you guys for help, cause im sure your all busy... but im out of ideas and every solution to this problem(that i can find) is like minimum of 3 years old and does not work

Last edited by rodobrist; 24th November 2010 at 06:57. Reason: accidently wrote my actual email adress
Reply With Quote
Sponsored Links
  #2  
Old 24th November 2010, 14:29
btb btb is offline
Junior Member
 
Join Date: Nov 2010
Posts: 3
Thanks: 0
Thanked 1 Time in 1 Post
Default

I got the same error.

I had to add the IP i was sending from to "mynetworks"

My main.cf looks like this

mynetworks_style = host
mynetworks = xxx.yyy.zzz.qqq, qqq.sss.ttt.rrr

(i anomized my ip's in the above, but the above config enable me to send from those 2 comma-seperated ip adresses)

Best regards,
Bo
Reply With Quote
The Following User Says Thank You to btb For This Useful Post:
rodobrist (24th November 2010)
  #3  
Old 24th November 2010, 22:45
rodobrist rodobrist is offline
Member
 
Join Date: Sep 2010
Posts: 30
Thanks: 10
Thanked 2 Times in 2 Posts
Default thanks

hey man,
i have not seen mynetworks_style= in main.cf, i dont know if we have different versions or your file was modified but i cant find it

but mynetworks is set on the loopback ip, which should be the home ip
i also tried placing the local ip, the internet ip, commenting out the parts with [ ] ... does not seem to work

no luck so far

thanks for your help and if you got any more ideas keep em coming
Reply With Quote
  #4  
Old 24th November 2010, 23:27
btb btb is offline
Junior Member
 
Join Date: Nov 2010
Posts: 3
Thanks: 0
Thanked 1 Time in 1 Post
Default

My version is a freshly installed ubuntu 10.10, and then i did apt-get install postfix.

In my config i have mydestination = all, maybe try that.

And also try adding

mynetworks_style = host
and
mynetwork = 127.0.0.1, +the ip of the computer you are trying to send mail from(not the mailserver ip), maybe visit www.whatismyip.com to get it

Thats all I can think of trying.
Reply With Quote
  #5  
Old 24th November 2010, 23:42
btb btb is offline
Junior Member
 
Join Date: Nov 2010
Posts: 3
Thanks: 0
Thanked 1 Time in 1 Post
Default

Actually ignore the idea about mydestination=all, i just read the documentation and it says:

The mydestination parameter specifies what domains this machine will deliver locally, instead of forwarding to another machine. So I guess you have it set correctly. I only needed postfix as outbound smtp so didnt care about that part.

But I still think you should try adding mynetworks_style=host and then specifying IP. Its correct that that line is not in the default configuration file, but you can still add it.

The default for that setting according to the docs is:

•Specify "mynetworks_style = subnet" (the default) when Postfix should forward mail from SMTP clients in the same IP subnetworks as the local machine. On Linux, this works correctly only with interfaces specified with the "ifconfig" command.

And please remember that if you are sending mails from your desktop computer through your linux server with postfix, then to my understanding you desktop computers IP also need to be specified in the mynetworks line. At least that is I would try first, and then go from there.

Last edited by btb; 24th November 2010 at 23:46.
Reply With Quote
  #6  
Old 25th November 2010, 00:42
rodobrist rodobrist is offline
Member
 
Join Date: Sep 2010
Posts: 30
Thanks: 10
Thanked 2 Times in 2 Posts
Default

I tried adding in the extra mynetworks_style and/or the IP, but postfix does not even restart with those 2 options

it does not make sense to me that i need the external IP of my remote computer ( as received from http://www.whatismyip.com/) because the email system does not work when using telnet through SSH either (meaning the request comes from its own IP)... I still tried it though

besides , outlook does not talk to postfix, it talks to courier through POP

I really feel as if the issue is in mydestination or perhaps even in my resolv.conf... I don't really feel as if either of the two are correct

resolv.conf:
nameserver 192.168.1.1
domain netgear.com
search netgear.com

I'm quite stumped...
Reply With Quote
  #7  
Old 25th November 2010, 06:16
matty matty is offline
Member
 
Join Date: Apr 2010
Location: Australia
Posts: 85
Thanks: 2
Thanked 12 Times in 11 Posts
Default

Where is the server in comparison to where you are sending email from, network wise? Are you on the same LAN, or are you across the internet somewhere?

Generally, you only need to add your IPs to mynetworks if you're on a LAN (and restart postfix). It's potentially a little more effort if you're across the internet.
Reply With Quote
  #8  
Old 25th November 2010, 06:42
rodobrist rodobrist is offline
Member
 
Join Date: Sep 2010
Posts: 30
Thanks: 10
Thanked 2 Times in 2 Posts
Default

I have sent commands from the shell (SSH) which result in the same error. (to answer your question, the server is far far away in terms of IP)


I am quite positive that outlook is conversing with courier, which relays the message to postfix with an internal IP anyway.


If outlook can send emails locally, I don't see how that is a banned IP anyway.


... I am continually restarting postfix btw so its not that either.

Last edited by rodobrist; 25th November 2010 at 06:45.
Reply With Quote
  #9  
Old 25th November 2010, 06:52
matty matty is offline
Member
 
Join Date: Apr 2010
Location: Australia
Posts: 85
Thanks: 2
Thanked 12 Times in 11 Posts
Default

Creating an access list of authorised senders is good practice to stop your email server being abused by spammers. So, you need to tell postfix who is allowed to send mail through it. The default mynetworks allows localhost, so that's why that works.

Quote:
Originally Posted by rodobrist View Post
I am quite positive that outlook is conversing with courier, which relays the message to postfix with an internal IP anyway.
Nope. You are talking direct to postfix when sending.

Just a quick something to try - configure your email client to check mail before sending mail, or set it to authenticate with your server when sending.

Last edited by matty; 25th November 2010 at 06:54.
Reply With Quote
  #10  
Old 25th November 2010, 07:26
rodobrist rodobrist is offline
Member
 
Join Date: Sep 2010
Posts: 30
Thanks: 10
Thanked 2 Times in 2 Posts
 
Default

wierd

i dont get the error message anymore

but i do not recieve the message in my hotmail account either


... i dont know how to check mail before sending, or to authenticate(i clicked test settings ... if thats what u mean)

im not positive if outlook has check before send functionality
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Forbidden 403; Samba access; config of maildeamon fawkes Installation/Configuration 4 14th January 2010 18:16
localhost postfix/master: fatal: bind 127.0.0.1 port 125: Permission denied g18c Installation/Configuration 4 24th March 2009 17:39
ISP Config hesitation when opening web pages frankb Installation/Configuration 7 15th December 2008 13:06
Verify email setup meekish Installation/Configuration 28 27th October 2006 15:36
Questions in regards to ISP-Server Setup - Ubuntu 5.10 "Breezy Badger" rbrantley HOWTO-Related Questions 16 10th April 2006 18:26


All times are GMT +2. The time now is 17:04.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.