LinuxQuestions.org
Help answer threads with 0 replies.
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 04-23-2003, 09:43 PM   #1
Swift&Smart
Member
 
Registered: Jan 2003
Location: Hong Kong,China
Distribution: Slackware,OpenSUSE
Posts: 472

Rep: Reputation: 30
Postfix basic configuration


Yeah,it's me again. I have been thinking of whether I should use sendmail,postfix or qmail as my mail server.Finally,I've made a decision that I chose postfix.

Postfix,however,there are a few publishers publish this book.So,I would like to have some guidelines or basic configuration knowledge from you guys.

1.If I want to set up a mail server within my Home LAN,what basic configuration should I set within postfix?

2.If my ISP blocks port 25,what strategies should I make in order to bypass this problem?If question no 1 has been fixed.

I hope you guys will give me some hints or suggestions.Thanks.
 
Old 04-24-2003, 06:41 AM   #2
Swift&Smart
Member
 
Registered: Jan 2003
Location: Hong Kong,China
Distribution: Slackware,OpenSUSE
Posts: 472

Original Poster
Rep: Reputation: 30
Anybody?

Anybody has any suggestions?????I am really a newbie about setting up mail server.
 
Old 04-24-2003, 05:03 PM   #3
ritzlmayr
LQ Newbie
 
Registered: Apr 2003
Location: Austria
Distribution: RedHat
Posts: 17

Rep: Reputation: 0
1. hard to say - that always depends on what you want it to do and how your setup looks like. Please give some detailed infos on your needs and setup (did you register an official domain?,...)
2. wich ways are blocked (outbound, inbound, both ways)
 
Old 04-25-2003, 08:47 PM   #4
Swift&Smart
Member
 
Registered: Jan 2003
Location: Hong Kong,China
Distribution: Slackware,OpenSUSE
Posts: 472

Original Poster
Rep: Reputation: 30
Block it anyway

Firstly,thanks for ritzlmayr replying me.

1.Actually,I have a no-ip domain name.And I want to use this domain name to set up my mail server in LAN and WAN.

2.I think my ISP has blocked port 25(Both way,I think).Can I use another port number?Like 8025?

I sincerely want to set it up because many mail service providers do not achieve my expectation(e.g.Speed,space,spam control....)
 
Old 04-26-2003, 03:28 AM   #5
ritzlmayr
LQ Newbie
 
Registered: Apr 2003
Location: Austria
Distribution: RedHat
Posts: 17

Rep: Reputation: 0
1. what exactly do you mean with a "no-ip domain"?
The setup for a mail server is technically pretty simple the only thing you really have to care about is /etc/postfix/main.cf
Under RH8.0 sendmail is the default mail server - so you have to switch this with redhat-switchmail.
If you need help with main.cf I can post some example lines if you want.
2. It is possible to change the default port but:
a) All Mail-programs have to know this, wich means that you have to make sure that every Software in your LAN/WAN wich is used to send mails is capable of changing the port as well.
b) If a) is no problem then you are fine to send mails within your LAN/WAN but you will almost never be able to send/receive mail from the internet. What you would need to accomplish this is a mail relay in the internet wich accepts mails on port 25 and reroutes them to your port (8025 from your example).
 
Old 04-27-2003, 01:45 AM   #6
Swift&Smart
Member
 
Registered: Jan 2003
Location: Hong Kong,China
Distribution: Slackware,OpenSUSE
Posts: 472

Original Poster
Rep: Reputation: 30
Re-route?

First of all,thank you for your quick reply,I really appreciate that.

1.I registered a free no-ip domain 1 year ago.Do you know what's no-ip domain?I think you do know that.It offers machine name freely to the public.e.g. swiftsmart.no-ip.org.And they will trace your ip address(with a software)in order to make this domain name works.By the way,I really want some straightforward tutorial about postfix.I've found many tutorials,but neither of them are easy and straightforward to teach you how to set it up.If you can post some of your example,I do appreciate it.

2a.It's very simple for me to set the MUA in my LAN.I can make it.

2b.Actually,I don't know how to "re-route" to my dynamically port 8025.I think it's very complicated though.

Sorry,I am still a on setting up postfix mail server.
 
Old 04-27-2003, 06:20 AM   #7
ritzlmayr
LQ Newbie
 
Registered: Apr 2003
Location: Austria
Distribution: RedHat
Posts: 17

Rep: Reputation: 0
ok lets start with the easy one
2a) you can do it on your own - perfect
2b) To setup postfix to listen on a different port the following has to be done
First add a line in /etc/services
This line schould look like
smtprr 8025/tcp
wich means smtpReRoute should listen on port 8025/tcp
Next you have to configure /etc/postfix/master.cf
Change the line where it says
smtp inet y/n y/n y/n - - smtpd
to
smtprr inet y/n y/n y/n - - smtpd
y/n - may vary on your machine
finally restart postfix.
Now you have an working MTA on port 8025
As I said it only will work for your LAN/WAN

And now the tricky things. I will try to give easy common examples for the most interesting lines.

1) All Lines are within main.cf
myhostname = swiftsmart.no-ip.org
mydomain = swiftsmart.no-ip.org
mydestination = $myhostname, localhost.$mydomain, $mydomain
mynetworks = x.x.x.x/xx, 127.0.0.0/8, y.y.y.y/32
where x.x.x.x/xx ist your local inet like 192.168.0.1/24
and y.y.y.y is the one ip you got form your ISP

For a first test this should be enough. Postfix should now as a mail server for your domain. Now you have to create lokal users on the machine like mybuddy
his e-mail would be mybuddy@swiftsmart.no-ip.org
With two configured MUA´s you can test deliveries.
One thing you should always do when configuring with postfix. In shell call the command
tail -f /var/log/messages
this will give usefull information on the mail server


I would say give it a shoot.
 
Old 04-27-2003, 06:23 AM   #8
ritzlmayr
LQ Newbie
 
Registered: Apr 2003
Location: Austria
Distribution: RedHat
Posts: 17

Rep: Reputation: 0
typo in the above statement
instead of
tail -f /var/log/messages
it should be
tail -f /var/log/maillog
 
Old 04-29-2003, 03:50 AM   #9
Swift&Smart
Member
 
Registered: Jan 2003
Location: Hong Kong,China
Distribution: Slackware,OpenSUSE
Posts: 472

Original Poster
Rep: Reputation: 30
In-depth explanation

Sorry for my late reply.I will definitely give it a shoot because your in-depth explanation is sooooo good to me.Thanks for your help.
 
Old 05-01-2003, 08:12 AM   #10
Swift&Smart
Member
 
Registered: Jan 2003
Location: Hong Kong,China
Distribution: Slackware,OpenSUSE
Posts: 472

Original Poster
Rep: Reputation: 30
Unhappy Can't even start postfix!!!

It's been rough and tough for me to configure a mail server.From sendmail to postfix,neither success.

I have followed your step to configure master.cf and main.cf.It's fine after configuring master.cf.However,when I finished the configuration of main.cf,the postfix can't even restart,stop or start!!! By the way,my ISP doesn't give me a static IP address,but they do give me a dynamic one.I want to ask whether I set something wrong about the ISP IP address?The one which you pointed out from last message.Do you have any idea?I am a complete newbie about postfix.

Thanks again.
 
Old 05-01-2003, 08:49 AM   #11
ritzlmayr
LQ Newbie
 
Registered: Apr 2003
Location: Austria
Distribution: RedHat
Posts: 17

Rep: Reputation: 0
I have to ask you for more information. When you try to start psotfix what is the output in /var/log/maillog. What do you get on stdout. Any messages in /var/log/messages?
Your external ip configured in the way I described it would make it possible to have mails sent "from" this IP (useful for webmail etc.). Your server will run without it.
As I said you have to provide more Information.
 
Old 05-03-2003, 03:21 AM   #12
Swift&Smart
Member
 
Registered: Jan 2003
Location: Hong Kong,China
Distribution: Slackware,OpenSUSE
Posts: 472

Original Poster
Rep: Reputation: 30
Problems,on-going problems

In maillog,there are error messages.

May 3:fatal: chdir(/usr/libexec/postfix myhostname=xchange.no-ip.biz mydomain=xchange.no-ip.biz): No such file or directory

In message log:

May 3 15:33:33 xchange modprobe: modprobe: Can't locate module sound-slot-0
May 3 15:33:33 xchange modprobe: modprobe: Can't locate module sound-service-0-0

Indeed,it's really very hard for me to figure out what's that mean.

Thanks again.
 
Old 05-03-2003, 03:48 AM   #13
ritzlmayr
LQ Newbie
 
Registered: Apr 2003
Location: Austria
Distribution: RedHat
Posts: 17

Rep: Reputation: 0
Interesting. I would recon that you post your main.cf and master.cf. I will check it on one of my machines. You can also send them to me through e-mail (swiftsmart@rc0.at). Don't be scared about the e-mail I created it just for that case and it will be deleted afterwards.

regards
 
Old 05-03-2003, 09:06 AM   #14
markus1982
Senior Member
 
Registered: Aug 2002
Location: Stuttgart (Germany)
Distribution: Debian/GNU Linux
Posts: 1,467

Rep: Reputation: 46
postconf -n should be enough here to get us started in order to solve your problems!
 
Old 05-03-2003, 10:22 PM   #15
Swift&Smart
Member
 
Registered: Jan 2003
Location: Hong Kong,China
Distribution: Slackware,OpenSUSE
Posts: 472

Original Poster
Rep: Reputation: 30
Here you go

After typing postconf -n,the message is shown below:

alias_database = hash:/etc/postfix/aliases
alias_maps = hash:/etc/postfix/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix myhostname=mydomain.no-ip.biz mydomain=mydomain.no-ip.biz
debug_peer_level = 2
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain mynetworks = 192.168.0.1/10, 127.0.0.0/8
newaliases_path = /usr/bin/newaliases.postfix
readme_directory = /usr/share/doc/postfix-1.1.11/README_FILES
sample_directory = /usr/share/doc/postfix-1.1.11/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop


Thanks.
 
  


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
Basic configuration check knoxlinuxuser Linux - Newbie 3 02-25-2005 07:07 AM
Enlightenment basic configuration jdier Linux - Software 0 12-27-2004 11:10 AM
Need help with basic sendmail configuration aznluvsmc Linux - Networking 1 12-03-2004 10:55 AM
basic config for postfix dienerk Linux - General 1 10-25-2004 02:52 AM
The basic configuration of fetchmail whepin Linux - Networking 5 01-05-2002 04:19 PM

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

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