LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions
User Name
Password
Linux - Distributions This forum is for Distribution specific questions.
Red Hat, Slackware, Debian, Novell, LFS, Mandriva, Ubuntu, Fedora - the list goes on and on... Note: An (*) indicates there is no official participation from that distribution here at LQ.

Notices


Reply
  Search this Thread
Old 09-09-2011, 09:29 AM   #1
sburnay
LQ Newbie
 
Registered: Sep 2011
Location: Lisbon, Portugal
Distribution: Ubuntu, CentOS & SUSE
Posts: 29

Rep: Reputation: Disabled
CentOS - Postfix - cron tasks don't send mail


<<< CentOS - Postfix - cron tasks don't send mail >>>

Hi!

I've configured a CentOS 5.6 to perform Proxy (squid), FTP (VSFTPd) and Mail-Relay (Postfix).

I can successfully send mails via telnet and/or sendmail command to my relay hosts.

Problem is, mails are not being sent when cron tasks take place.

here is my /etc/crontab specifying the MAILTO=root directive
Code:
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/

# run-parts
01 * * * * root run-parts /etc/cron.hourly
10 0 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly
17 15 * * * root run-parts /etc/cron.spa

And here is part of my /etc/aliases which makes all mails to root
Code:
be sent to myUser@myRelayDomain
# Person who should get root's mail
#root:          marc
root:           myUser@myRelayDomain

If there is aditional information required for the solve, I'll provide it to you.

With my best regards,
sburnay
 
Old 09-09-2011, 11:27 PM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
If you become root and type 'mail' are there any emails shown ?
 
Old 09-12-2011, 04:35 AM   #3
sburnay
LQ Newbie
 
Registered: Sep 2011
Location: Lisbon, Portugal
Distribution: Ubuntu, CentOS & SUSE
Posts: 29

Original Poster
Rep: Reputation: Disabled
When I type mail I'm prompted with a list of 6 mails, the last one, from septembre 5:

Quote:
[root@spa-proxy ~]# mail
Mail version 8.1 6/6/93. Type ? for help.
"/var/spool/mail/root": 5 messages 5 unread
>U 1 logwatch@localhost.l Thu Sep 1 04:02 166/4583 "Logwatch for localhos"
U 2 root@localhost.local Thu Sep 1 04:42 27/1013 "Cron <root@localhost>"
U 3 logwatch@spautores.p Fri Sep 2 04:02 286/12589 "Logwatch for spa-prox"
U 4 logwatch@spautores.p Sat Sep 3 04:02 56/1876 "Logwatch for spa-prox"
U 5 logwatch@spautores.p Sun Sep 4 04:02 56/1875 "Logwatch for spa-prox"
& quit
Held 5 messages in /var/spool/mail/root
It sugests that something I've done Septembre 6 made the system not to send those mail notifications.

Any ideas?
 
Old 09-12-2011, 07:45 AM   #4
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
When did you edit /etc/aliases ? .. did you run the 'newaliases' command afterwards ?
 
Old 09-12-2011, 09:45 AM   #5
sburnay
LQ Newbie
 
Registered: Sep 2011
Location: Lisbon, Portugal
Distribution: Ubuntu, CentOS & SUSE
Posts: 29

Original Poster
Rep: Reputation: Disabled
Solved!

Quote:
When did you edit /etc/aliases ? .. did you run the 'newaliases' command afterwards ?
Yes, I did, those aliases have been updated.

I solved the issue.

The problem was regarding the fact that I've edited crontab with nano instead of just using 'crontab -e'.

It still is a strange bug/feature from (at least) this CentOS distro, from what I've seen in other troubleshooting, whet you go to 'nano /etc/crontab' you are not editing the same file as when you do a 'crontab -e'

P.S.: how do I marl the post/thread as solved?

Thank you very much for the time and dedication

Last edited by sburnay; 09-12-2011 at 09:46 AM. Reason: missing data
 
  


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
Postfix send mail problem(In RH9, kernal 2.4.20, postfix 2.1.5) minor Linux - General 6 09-23-2019 10:09 PM
Can't send/receive mail using Postfix/Dovecot on CentOS 5 sh4ka Linux - Newbie 4 04-20-2011 08:12 AM
[SOLVED] Postfix - I can send mail from my computer; but others can't send to me... djuhl30 Linux - Server 8 10-12-2009 02:34 PM
Postfix - allowing only certain users to send mail to a mail ID rahmathullakm Linux - Server 3 02-07-2009 11:05 AM
Postfix : mail cannot send to send outside ( can send/receive locally) bobbinsupport Linux - Networking 3 12-15-2007 10:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions

All times are GMT -5. The time now is 12:47 PM.

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