Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
I am receving emails from logwatch but when I setup my own mail script using mutt, the script succeeds but no email is received.
Any ideas what the difference is between the two mail methods?
I am receving emails from logwatch but when I setup my own mail script using mutt, the script succeeds but no email is received.
Any ideas what the difference is between the two mail methods?
1st step:
check /var/log/maillog to see if any mail was ever sent out. logwatch sends email to root user.
are you doing the same?
1st step:
check /var/log/maillog to see if any mail was ever sent out. logwatch sends email to root user.
are you doing the same?
I did that but there are only 10 lines in there using tail -f.
Anyway to view the whole logfile?
I changed the MailTo command in the logwatch.conf to an actual email address.
I did that but there are only 10 lines in there using tail -f.
Anyway to view the whole logfile?
I changed the MailTo command in the logwatch.conf to an actual email address.
change mailto in crontab too. by default it sends to the root user
Script and test as per: http://www.syntaxtechnology.com/?p=83
Have changed MAILTO in /etc/crontab as well but that's separate from this SystemEmail script.
Comes up with this in the log.
Aug 11 16:23:51 localhost postfix/postdrop[11861]: warning: unable to look up public/pickup: No such file or directory
Aug 11 16:24:15 localhost postfix/postdrop[11895]: warning: unable to look up public/pickup: No such file or directory
. Do you have mutt installed?
2.) There is a variable at the top of the script. Did you change it from example@example.com to your address?
Code:
EMAIL="example@example.com"
3.) What distro are you attempting this from? I assume CentOS from the information under your username, but I just wanted to make sure.
4.) When running either
Code:
./SystemEmail start
or
./SystemEmail stop
what is the output of
Code:
echo $?
If the return code is zero, does root receive a returned email with failure reason?
mylog.log contains nothing this morning.
Is it possible the crontab didn't write to it using this code?
The sarg reports ran correctly...just nothing after that...
I ran this and just received a new prompt but no email as yet.
---------------------
When I run this directly from the command line, it goes into some kind of editor?????
mutt -s "TEST" email@myactualemailaddress.com
Also, the logs said something about:
postdrop: warning: unable to look up public/pickup: No such file or directory
But logwatch uses sendmail doesn't it?
Like I said, the command works, just not when run from crontab?! Strange
Same error as before:
Aug 12 11:44:22 localhost postfix/postdrop[2894]: warning: unable to look up public/pickup: No such file or directory
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.