Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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...
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).
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.
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:
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!
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:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.