LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-19-2003, 05:06 AM   #1
Swift&Smart
Member
 
Registered: Jan 2003
Location: Hong Kong,China
Distribution: Slackware,OpenSUSE
Posts: 472

Rep: Reputation: 30
Unhappy Postfix configuration nightmare


Helllo,everyone.

I have a working MTA (Sendmail) before.It really works well with my Squirrelmail.However,I do think Sendmail is pretty hard to configure in details and security has been in my consideration.So I shift to Postfix.

Yeah,Postfix is pretty easy to configure and good at security.However,I keep getting this message when I want to send out message via MUA.

The message could not be sent because one of the recipients was rejected by the server. The rejected e-mail address was 'myname@mailaccount.com'. Subject '', Account: 'myhostname', Server: 'myhostname', Protocol: SMTP, Server Response: '554 <myname@mailaccount.com>: Relay access denied', Port: 25, Secure(SSL): No, Server Error: 554, Error Number: 0x800CCC79

It keeps bothering me....Yeah,by the way,I would like to list out some background information.

1.My ISP blocks port 25.

2.I have a router which opens port 25,110.

3.IPTables is off.

4.Most importantly,my postfix configuration setting is as follows:

mail_owner = postfix
mail_spool_directory = /var/spool/mail
mailbox_command = /usr/bin/procmail
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname,$mydomain
mydomain = my domain name
myhostname = my domain name
mynetworks = 192.168.0.5 192.168.0.6
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /etc/postfix/README_FILES
relay_domains = $mydestination,/etc/postfix/relay-domains
relayhost = mail.myisp.com

sample_directory = /etc/postfix/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtpd_banner = $myhostname ESMTP
unknown_local_recipient_reject_code = 450

Indeed,I took a look at various postfix tutorial but the problem persists.

Any suggestion is highly appreciated.
 
Old 12-19-2003, 08:43 AM   #2
clau_bolson
Member
 
Registered: Nov 2003
Location: Argentina
Distribution: Debian Sarge
Posts: 52

Rep: Reputation: 15
I'm sure you can find the answer in the Postfix-users mailing list.
Search
http://news.gmane.org/gmane.mail.pos...r/cutoff=67294
 
Old 12-19-2003, 09:25 AM   #3
Swift&Smart
Member
 
Registered: Jan 2003
Location: Hong Kong,China
Distribution: Slackware,OpenSUSE
Posts: 472

Original Poster
Rep: Reputation: 30
Thanks for your reply,clau_bolson.

Frankly speaking,I don't like their website.Hard to browse....

Anyway,thanks again.
 
Old 12-19-2003, 02:02 PM   #4
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 68
Hi

This line:
myhostname = my domain name

Should read:
myhostname = my host name

To find your host name, open up a terminal and type:
hostname
And it should spit it out. If you don't have one, feel free to set one by:
hostname linuxrules
If you want your hostname to be 'linuxrules'. Do this as root, and the changes will remain until reboot. Depending on your distro, there are a few ways to make the change permanent, so consult your distro's docs for further info on that
Then, once you have the hostname, edit your postfix/main.cf to show the correct hostname. That is all I notice at a quick glance.

Cool
 
Old 12-19-2003, 10:33 PM   #5
Swift&Smart
Member
 
Registered: Jan 2003
Location: Hong Kong,China
Distribution: Slackware,OpenSUSE
Posts: 472

Original Poster
Rep: Reputation: 30
Talking Fixed it!

First off,thanks for your reply,MasterC.I have discovered that you contributed very much regarding mail server setup.I'm impressed.

My problem lies on mynetworks configuration.Basically,I have 2 computers at home.1 for linux server and other for windows XP and set as LAN.I've assigned IP address 192.168.0.5 and 192.168.0.6 accordingly.So,
mynetworks=192.168.0.5/6.However,it didn't work.When I made the mynetworks=192.168.0.5,it's fine again.But I have a question,when my mail server doesn't know where is 192.168.0.6?But 192.168.0.5 do.

Would you mind telling me why?
 
Old 12-20-2003, 02:27 AM   #6
dhoff
LQ Newbie
 
Registered: Jul 2003
Distribution: Suse 8.2
Posts: 5

Rep: Reputation: 0
perhaps you would prefer to set your netmask to 24. You currently have it set to /6 which would mean that the network portion of your addres space is 19? and the rest are nodes. You probably have your network setup to 192.168.0.xxx so a /24 would be appropriate. No?
 
Old 12-21-2003, 12:11 AM   #7
Swift&Smart
Member
 
Registered: Jan 2003
Location: Hong Kong,China
Distribution: Slackware,OpenSUSE
Posts: 472

Original Poster
Rep: Reputation: 30
Fixed it again...

Sorry,dhoff,I forgot something in the documentation.But I got it fixed.Thanks!
 
Old 12-21-2003, 02:11 AM   #8
Swift&Smart
Member
 
Registered: Jan 2003
Location: Hong Kong,China
Distribution: Slackware,OpenSUSE
Posts: 472

Original Poster
Rep: Reputation: 30
Something confused,though

Oops,it's me again.

Unfortunately,I got a problem regarding mynetworks again.I've read the documentation,and I set mynetworks=192.168.0.0/24,which means that the initial 3 IP 192.168.0 is my network.And the last one is my hosts,1-254.However,my windows XP box can't send mail.The reason is Relay access denied.What's wrong with my setting???
 
Old 12-21-2003, 04:01 AM   #9
Swift&Smart
Member
 
Registered: Jan 2003
Location: Hong Kong,China
Distribution: Slackware,OpenSUSE
Posts: 472

Original Poster
Rep: Reputation: 30
Sorry,I've got something to compliment my message.I found that my problem lies on /etc/hosts.I think my linux computer doesn't realize that there are a Windows XP box in LAN,which makes my mail server sent a relay access denied to my XP's MUA.

However,how do I fix it?Any ideas are appreciated!
 
Old 12-22-2003, 02:46 AM   #10
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 68
Well, how are you routing it to your mail server? Are you using POP3, IMAP or do/did you have it setup differently all together? If you explain your network a bit better and it's setup, I might be able to draw a better picture in my mind to further assist

Cool
 
Old 12-22-2003, 10:32 AM   #11
Swift&Smart
Member
 
Registered: Jan 2003
Location: Hong Kong,China
Distribution: Slackware,OpenSUSE
Posts: 472

Original Poster
Rep: Reputation: 30
First off,thanks for your reply MasterC.I will answer your questions one by one.

I have installed POP3 and IMAP.However,I will only use IMAP.The package is called imap-2000c rpm for RedHat.I have enabled IMAP and my webmail is running fine. The problem lies on my Windows XP box.It has a IP address 192.168.0.6.My server doesn't recognize its existence!And it said "Relay access denied" when I use XP box to send a mail via my server.

Did I provide enough information for you to help me?Please let me know.I am appreciative for your help.
 
Old 12-22-2003, 11:54 AM   #12
PDR60
Member
 
Registered: Aug 2003
Location: Oakland, TN
Distribution: Debian, Kubuntu
Posts: 257

Rep: Reputation: 30
If your Isp is blocking port 25 then your MX resolution will never get there. SMTP is needed for mail. It uses port 25 and dns will always default your MX record to port 25. If your ISP is blocking it there is probably a reason. I had the same problem with Road Runner. The access lists in their routers will not pass port 25 trafficExcept to thier internal servers). The solution was to buy the first level of business class that cost a wopping $15 more. My download speed jumped from 1.2Mb to over 2.4MB and upload is 768K. Thats cheap for that much gain. I also had them configure all ports open. That solved the problem.
 
Old 12-22-2003, 12:23 PM   #13
Swift&Smart
Member
 
Registered: Jan 2003
Location: Hong Kong,China
Distribution: Slackware,OpenSUSE
Posts: 472

Original Poster
Rep: Reputation: 30
Thanks for your input,PDR60.Although my ISP blocks port 25,I have passed all my outgoing mail to ISP mail server.Moreover,if it caused the problem,then why can I use webmail to receive and send mail?So,I do think this is not the root of the problem.

Anyway,thanks a lot for reading many messages.
 
Old 12-22-2003, 10:30 PM   #14
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 68
Hmm, that brings up a good point. Not necessarily my advice, but to clarify what PDR60 is saying:
If your ISP is blocking port 25, then you cannot communicate via an MUA. However, for webmail setups (such as Squirrelmail) you are communicating with your server via port 80 (http requests, sent internally to your machines port 443 - IMAP). So in essence, you don't need an open port 25 if you do the webmail interface, but if you step outside that, and try to communicate via port 25, it's blocked.

Might be the case Stranger things have happened.

Cool
 
Old 12-23-2003, 12:00 AM   #15
PDR60
Member
 
Registered: Aug 2003
Location: Oakland, TN
Distribution: Debian, Kubuntu
Posts: 257

Rep: Reputation: 30
Quote:
Originally posted by Swift&Smart
Thanks for your input,PDR60.Although my ISP blocks port 25,I have passed all my outgoing mail to ISP mail server.Moreover,if it caused the problem,then why can I use webmail to receive and send mail?So,I do think this is not the root of the problem.

Anyway,thanks a lot for reading many messages.
Thats not correct. Webmail clients use IMAP which is port 141. Not 25. Port 443 is for HTTPS. You will never get mail on port 25 unless the access list on your ISP's router is opened( I worked for an ISP for 2 years). It has nothing to do with your end. You can configure till the cows come home. If the ISP side of your connection is blocking port 25, Game over!!!! There are services that offer dynamic smtp. Folks like www.changeip.com can overcome your problem by "proxying" your mail. Not a very elegant solution but it will work for low volume. However, If you are going to spend the money for dynamic smtp you Might as well just up your service to get your connection with all ports open

Thats your best bet. Just get the correct connection.

Last edited by PDR60; 12-23-2003 at 12:03 AM.
 
  


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
Postfix configuration help. mdpolaris Linux - Software 7 10-06-2006 03:31 AM
Tomcat + Servlets configuration nightmare lethalinjection Programming 2 11-04-2003 09:18 PM
postfix configuration argh2005 Linux - Software 3 08-31-2003 04:33 PM
postfix configuration argh2005 Linux - Networking 0 08-30-2003 11:35 PM
Postfix Configuration Graanco Linux - Software 2 07-06-2002 02:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:12 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration