LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-19-2002, 11:31 AM   #1
JimKyle
Member
 
Registered: Dec 2001
Location: Oklahoma City, OK, USA
Distribution: Xubuntu 16.04 LTS
Posts: 214
Blog Entries: 1

Rep: Reputation: 39
Postfix Problem


For some reason, postfix suddenly decided to send all messages addressed to "root" to "nobody" instead of to "jim" (the configuration I defined in the aliases file). This apparently happened after I attempted to correct the configuration files; I've not yet been able to get postfix to relay anything on to the outside world, despite following the instructions posted at http://michaelo.free.fr/linux/mdk8.1/postfix.php3 on achieving this goal.

Can anyone assist me in getting it to work? I don't need to use it for incoming mail since my routing handles that nicely. I just want logcheck and the other security tools to be able to send their reports to me and to send duplicate copies out through my ISP for safety...
 
Old 01-19-2002, 12:13 PM   #2
lfslinux
LFS Maintainer
 
Registered: Jan 2002
Location: Canmore, Alberta, Canada
Distribution: Linux From Scratch
Posts: 372

Rep: Reputation: 30
Re: Postfix Problem

Quote:
Originally posted by JimKyle
For some reason, postfix suddenly decided to send all messages addressed to "root" to "nobody" instead of to "jim" (the configuration I defined in the aliases file). This apparently happened after I attempted to correct the configuration files; I've not yet been able to get postfix to relay anything on to the outside world, despite following the instructions posted at http://michaelo.free.fr/linux/mdk8.1/postfix.php3 on achieving this goal.

Can anyone assist me in getting it to work? I don't need to use it for incoming mail since my routing handles that nicely. I just want logcheck and the other security tools to be able to send their reports to me and to send duplicate copies out through my ISP for safety...
Please show the output of this:

postconf alias_database
postconf alias_maps

Usually it'll tell you it uses the same file for both. Check that file's contents and make sure the alias for root properly (mostly you'll be looking at /etc/postfix/aliases), like so:

#start of root alias definition
root: jim
#end of root alias definition

Run "postalias /etc/postfix/aliases" to recreate the alias database (/etc/postfix/aliases.db) and run 'postfix reload' to reload postfix immediately (if not you'll have to wait up to a few minutes for the new aliases to become active).

See if this does anything for you.
 
Old 01-19-2002, 01:58 PM   #3
JimKyle
Member
 
Registered: Dec 2001
Location: Oklahoma City, OK, USA
Distribution: Xubuntu 16.04 LTS
Posts: 214

Original Poster
Blog Entries: 1

Rep: Reputation: 39
Thanks much!

Here's my captures:

capture of the two commands ->

[root@JKP200 jim]# postconf alias_database
alias_database = hash:/etc/postfix/aliases
[root@JKP200 jim]# postconf alias_maps
alias_maps = hash:/etc/postfix/aliases

clipped from aliases file ->

# Person who should get root's mail
root: jim

That entry was already in the file, but I hadn't run the remaining commands since it appeared that my cron.daily operation would do that for me automatically. However as soon as I finished it up, and posted a test message, it appeared in my own mailbox, so that part now seems to be working.

It doesn't seem to be sending anything externally yet, though. Hard to tell, since SW Bell's DNS is acting up this morning and only responding about one time out of five... I'd really like to copy it out to an external address for safety, if I can make that work.
 
Old 01-19-2002, 02:53 PM   #4
lfslinux
LFS Maintainer
 
Registered: Jan 2002
Location: Canmore, Alberta, Canada
Distribution: Linux From Scratch
Posts: 372

Rep: Reputation: 30
Quote:
Originally posted by JimKyle
It doesn't seem to be sending anything externally yet, though. Hard to tell, since SW Bell's DNS is acting up this morning and only responding about one time out of five... I'd really like to copy it out to an external address for safety, if I can make that work.
The best way of doing it when you're with an ISP is to use your ISP's smtp server. Tell postfix to forward every single message that cannot be delivered locally to your ISP and your ISP will take care of the rest. Some ISP's don't even allow you to act as your own server. I'm with Bell Canada and they have blocked port 25 for outgoing traffic. You have to connect to port 25 of bell's smtp server (that's the only way it'll work). Well, there are always work arounds. It helps if you have a server located somewhere (i've configured linuxfromscratch.org to also listen on port 26 besides 25, so I use that server as my mail relay instead of my ISP. I only use my ISP for the internet connection I don't want to rely on them for anything else. An nimda is ought to strike again and that'll down their servers and my mail would be stuck)

Anyways, the setting to have postfix forward all mail to your isp is by using the relayhost variable in the main.cf file like:

relayhost=smtp.yourisp.com
 
Old 01-19-2002, 03:29 PM   #5
JimKyle
Member
 
Registered: Dec 2001
Location: Oklahoma City, OK, USA
Distribution: Xubuntu 16.04 LTS
Posts: 214

Original Poster
Blog Entries: 1

Rep: Reputation: 39
Adding the "relayhost" line to main.cf was the action that triggered the original problem! The DNS did seem to stabilize somewhat and I was able to test; it does work now to send mail outside. My final question for this subject is "Can I set up two addresses in the root alias, one inside and the other outside? If so, how?"

Again many thanks for getting me on the right track. I knew it had to be some small thing I was overlooking!
 
Old 01-19-2002, 03:32 PM   #6
lfslinux
LFS Maintainer
 
Registered: Jan 2002
Location: Canmore, Alberta, Canada
Distribution: Linux From Scratch
Posts: 372

Rep: Reputation: 30
Quote:
Originally posted by JimKyle
Adding the "relayhost" line to main.cf was the action that triggered the original problem! The DNS did seem to stabilize somewhat and I was able to test; it does work now to send mail outside. My final question for this subject is "Can I set up two addresses in the root alias, one inside and the other outside? If so, how?"

Again many thanks for getting me on the right track. I knew it had to be some small thing I was overlooking!
Ah ya with unstable DNS relayhosts won't work (it can't resolve into IP address). You could get around that, figure out the IP address of your ISP's smtp server and use that as the relayhost. Then at least the mail will get out of your box but will probably get stuck on your ISP for a while until DNS works again (unless their smtp servers run off a seperate DNS server which would be wise).

Yes, you can have multiple destinations for an alias. seperate it with comma's, like so:

root: tim,gerard@linuxfromscratch.org
 
  


Reply



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 send mail problem(In RH9, kernal 2.4.20, postfix 2.1.5) minor Linux - General 6 09-23-2019 10:09 PM
Postfix Problem wfernley Linux - Newbie 3 08-24-2005 10:22 AM
postfix problem ravi_foru Linux - Enterprise 0 07-10-2005 04:11 AM
postfix problem meblost Linux - Software 4 08-31-2004 10:51 PM
postfix problem zzero Linux - Software 13 03-20-2004 12:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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