Linux - SoftwareThis 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.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
i have been configuring and googling and searching and reading for 2 days, and i can't get postfix to work correctly. i am clueless about something obviously, but i can't figure out what i'm doing wrong.
right now, users can send and receive mail to each other on each host, but not to users on other hosts in the local domain (it just "disappears" -- has me suspicious, but at least it's not bouncing anymore ). users can also send mail to the web, but not to my mail account from my ISP (that bounces, saying firstname.lastname@example.org doesn't exist). wtf? i am totally confused.
here's what i can remember of my configuration (i just can't face that main.cf file again right now ) - it's the same on each PC (except for the hostname obviously):
and the rest i think is pretty much default. i didn't set a relay host b/c i'm not sure what to do there. i just don't get why users on one machine can't send to users on the other, or how i can keep my local network hostnames and domain and still send/receive mail through the ISP. does the ISP need to be a relay host or be added to the networks line? am i missing something to do with the router? do i need to set up aliases or something? help appreciated.
Post up the result of:
postconf -n (been a while, my appology if that is incorrect)
This should show you the settings for your main.cf that we are interested in. You relay for the domains you host. Mail "vanishing" is always a hard one to pin down. Rejection notices and errors are always much better. Here's one way to give you some ideas on where to start:
Open up an xterm, and tail your log:
tail -f /var/log/messages (or whever your logs are being sent, this depends on your distro usually)
Then, fire up your mail client, and send an email, seperated by ~10 minutes to each location that you are having problems with. Then, send an email to the location that you are not having problems with, and compare the logs from each occurance.
with the relay set, the mail disappears. when the relay is not set, the mail disappears when addressed to "email@example.com," but i get this message when i send to "firstname.lastname@example.org." i'll just leave it at that for this post, and post the tail of the log in a minute. thx
Received: by moe.thedomain.net (Postfix)
id 8A5967403; Mon, 1 Dec 2003 18:09:14 -0500 (EST)
Date: Mon, 1 Dec 2003 18:09:14 -0500 (EST)
From: Mail Delivery System <MAILER-DAEMON@thedomain.net>
Subject: Undelivered Mail Returned to Sender
Content-Type: multipart/report; report-type=delivery-status;
Final-Recipient: rfc822; email@example.com
Diagnostic-Code: X-Postfix; Name service error for
- - 1/1: Mail Delivery System Undelivered Mail Returned to Se -- (72%)
type=A: Host not found
# For loopbacking.
127.0.0.1 homer.thedomain.net homer
bart is my laptop (win98se) and is out of the loop for now. if i can't even get this going on linux, i don't want to mess with windoze. i'll figure that out later.
yeah, the ISP (road runner) thing is weird, and i don't know what to make of it. possibly they are blocking "unknown" addresses for anti-spam reasons? whereas anything sent through them but not to them is passed along?
So are you running your own DNS then as well? Or are you normally just using your ISP's?
And, I'm sure you know, but after making any changes to postfix:
postfix reload (unless this is on Gentoo, and was emerged then of course:
/etc/init.d/postfix restart ). I'm pluggin away at this site, which seems VERY in depth, and about to fall asleep, feel free to paruse yourself, maybe the answer is there. Otherwise, I'll check back tomorrow and continue reading and see if I can help any more.
Good Luck, and I don't know if this was covered, but if it's a postfix problem, I'd wager it somewhere in mydestination and/or relay_domains (or possibly relayhost???) directives.
Originally posted by MasterC So are you running your own DNS then as well? Or are you normally just using your ISP's?
i don't understand your question, so i'm starting to think i have a fundamental misunderstanding of how all this works. my resolv.conf was:
and that was working fine for internet, samba, print sharing, mail through ISP, etc. i guess the router assigns IPs, is that right? those number assignments always seemed to be the same (based on the physical port, i assumed), so to make things easier with samba, ssh, etc. i just added them to the /etc/hosts file on my 2 linux machines, along with a name for each one. does just doing that that make me a DNS?
anyway, trying to get mail to work, i changed "nameserver 192.168.0.1" in my slack box to "search mydomain.net," and that allowed mailing using just the username (or any variation of just user, hostname, domain, or FQDN). but i still can't mail between computers, or now to the internet. i guess i'll keep plugging away at it. i assume i'm doing something wrong not having to do with postfix specifically, but with some other setting somewhere (edit: actually, i take that back, i don't assume that at all - it might be postfix). i'll just have to figure out where the glitch is -- probably something really basic that i have overlooked b/c of the gaps in my networking knowledge.
the ironic thing is that when i first installed linux a few months ago, and literally knew *nothing* about it, i set up sendmail on red hat and got it to work with the ISP in about half an hour, sending to the internet, etc. i just couldn't figure out how to collect my mail, so i disabled it, being worried about security, also. mostly i just did it as an experiment. now 4 or 5 months later and having set up samba, ssh, and iptables next, i can't get simple postfix to work. argh!
Last edited by synaptical; 12-02-2003 at 12:18 PM.
It's possible that I'm wrong here, but do you obtain an IP from your ISP via DHCP? If so, then, here's my understanding:
In comes the IP to the router (what router btw?) it stores the IP, and assigns local/private IP's to the local machines (either via DHCP itself, or you set static IP's which is what you should be doing on servers). However, the DNS information (/etc/resolv.conf) should be populated with your ISP's DNS server information. Something like the following:
That's similar to my old setup, and is easy for me to remember Anyway, the nameserver entries should be actual IP's of your ISP's nameservers (these are normally obtained via DHCP, so you may either want to, just once, either call your ISP and ask em what the nameserver IP's are, OR (what I do) directly connect 1 box, set it up for DHCP, obtain the info, write it down, disconnect it directly, hook it back up to the router, and now, on each box, supply the nameserver information in /etc/resolv.conf accordingly) and the search should be, well whatever is provided by your ISP (if anything).
Now, just to re-iterrate, be sure to have the Private IP's be static IP's, outside the range of IP's that are dynamically (DHCP) assigned by your router. For example, I have my router setup to assign IP's via DHCP in the range of 192.168.1.100-192.168.1.254 So I set my static IP's below the .100 mark, well below to easily decipher the difference from the IP's.
Because you are going to have static private IP's at the boxes, you will need to be certain you have the correct DNS info in /etc/resolv.conf because it will not be updated each time they talk to the router (no DHCP), hence the work mentioned above. Once you get it all sussed, you may have yourself a working network, at that point, you will certainly want to look at your port forwarding in your router's setup. Forward port 25 to the main "mail server" box, this should be a static IP (which if it's not apparent yet: You need static IP's with servers so the traffic can consistently go to the same location).
Once you get this all sussed, restart postfix, and ping somebody to see that everything is working properly. Then try to send yourself some email.
oh! i thought the nameserver should be the *router* address, and the individual IPs assigned by the router should be whatever number the router assigned to each machine. so for example, if the router (192.168.0.1) assigns machine 1 an IP of 192.168.0.100, then that was the machine's IP, and i could then assign a name to that and everything was hunky dory behind the router.
but if i understand what you are saying, i should re-assign an IP to machine 1 that is *not the same* as what the router provides, and then just make sure my router is set up to handle that since it won't be assigning through DHCP anymore. since i believe my router (d-link 604, btw) is now set up to provide from 192.168.0.100-200, i should assign something like 192.168.0.2-99, or maybe 192.168.100.100-xxx, etc.
and yes, i obtain an IP from my ISP, the number of which i never messed around with b/c i thought once it got to the router, everything was taken over from there through the 192.168.etc scheme. so now i believe you are saying i have to find the server from which that number is coming and put that IP in the resolv.conf along with the "search my.ISP.com" line.
very much appreciate your detailed explanation. let me make some changes -- probably won't get to it until early this evening -- and i'll post an update when i test things out and hopefully get it going. thx!
You're welcome, let me clarify some of that:
Your assigned IP is not what goes in resolv.conf Instead, that's where your DNS server's IP's go. Your DNS servers IP's are assigned ALSO via DHCP from your ISP. These are automatically obtained and stored during bootup/negotiation with your ISP. Since your router is obtaining the DHCP information from your ISP (that's called your WAN) your local machines don't have the luxury of obtaining that information as well. So instead, you have to manually enter the information in /etc/resolv.conf for your ISP's DNS servers. To get this information, you connect 1 box directly to your DSL/cable modem and obtain the DHCP information (the IP is irrelevant for the time being, we are after the DNS info for now) for the DNS's. In order for this to happen successfully though, on the box you hook up you will need to enable DHCP and disable any static IP assignments. If this is slackware:
in /etc/rc.d/rc.inet1 you will comment every line except "USE DHCP=yes"
If this is Gentoo, you will:
And comment all lines except:
Then, once you have the information, write it down, and now go back, comment the DHCP lines, and uncomment the static assignment for IP and gateway. I have gentoo pulled up right now on putty, here's what it might look like when you are ready to assign static IP:
# Global config file for net.* rc-scripts
# This is basically the ifconfig argument without the ifconfig $iface
iface_eth0="192.168.1.25 broadcast 192.168.1.255 netmask 255.255.255.0"
#iface_eth1="126.96.36.199 broadcast 188.8.131.52 netmask 255.255.0.0"
# For DHCP set iface_eth? to "dhcp"
# For passing options to dhcpcd use dhcpcd_eth?
# For adding aliases to a interface
# NB: The next is only used for aliases.
# To add a custom netmask/broadcast address to created aliases,
# uncomment and change accordingly. Leave commented to assign
# defaults for that interface.
# For setting the default gateway
Remember, that's just an example, your gateway is actually 192.168.0.1
Ok, moving on...
Assigning static IPs:
You will want to assign IP's lower than your range usually. So, your range is 100-200, so something like: 192.168.0.25 would be appropriate. Then, forwarding to that IP should work much better
Your router doesn't assign the static IP, instead during bootup IP negotiation your box will tell your router it's IP and your router will "remember" that (for port forwarding).
If you have any more questions or aren't sure about something I've said wrt setting up your network, post back
hey there MasterC - - i didn't jump ship i just got super busy last week and couldn't get back to this. i've got to deal with some snow this weekend, but i'll try your suggestions asap and post back if i have any problems. just wanted to thank you for the help.