Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Email problems: vixiecron, sendmail, real email
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
CPUFreak91
Tux's lil' helper
Tux's lil' helper


Joined: 25 Feb 2005
Posts: 110
Location: Mars

PostPosted: Mon Mar 13, 2006 2:03 am    Post subject: Email problems: vixiecron, sendmail, real email Reply with quote

I want vixiecron to email me the results of cron jobs, figure out how to check root email and lastly forward that email to my gmail acount.

I've googled, checked the wiki, the docs, man pages, info pages... I'm stumpted! I can't figure out how to do any of those steps.

Please help. I have no experience with *cron and sendmail.
_________________
All Your Base Are Belong To Us!!! chown -r us ./base
"After three days without programming, life becomes meaningless.'' -- Tao of Programming Book 2
Back to top
View user's profile Send private message
Philantrop
Retired Dev
Retired Dev


Joined: 21 Dec 2004
Posts: 1130
Location: Germany

PostPosted: Mon Mar 13, 2006 6:51 am    Post subject: Reply with quote

1. Mailing any cron job output to root(@localhost):

Just add the following line to your /etc/crontab or uncomment it:

MAILTO=root

2. Checking root's (or any user's) mail:

emerge mail-client/mailx

Then, as the user:

/bin/mail

mailx is a textmode mail user agent.

3. Forwarding mail:

You can either forward mail using mailx or you can try one of the solutions below if your sendmail supports it:

a) Setup an alias for root in /etc/mail/aliases (man aliases). root: someone@gmail.com
b) Create a .forward file in root's home. Its content should just be your gmail address: someone@gmail.com

There are quite a few more methods for forwarding mail but those above are the easiest to implement.
Back to top
View user's profile Send private message
CPUFreak91
Tux's lil' helper
Tux's lil' helper


Joined: 25 Feb 2005
Posts: 110
Location: Mars

PostPosted: Tue Mar 14, 2006 4:03 am    Post subject: Reply with quote

Philantrop wrote:
1. Mailing any cron job output to root(@localhost):

Just add the following line to your /etc/crontab or uncomment it:

MAILTO=root


That was already configured :(

Quote:
2. Checking root's (or any user's) mail:

emerge mail-client/mailx

Then, as the user:

/bin/mail


I always get: No mail for root
I have several cron jobs running.

Quote:
3. Forwarding mail:

You can either forward mail using mailx or you can try one of the solutions below if your sendmail supports it:

a) Setup an alias for root in /etc/mail/aliases (man aliases). root: someone@gmail.com
b) Create a .forward file in root's home. Its content should just be your gmail address: someone@gmail.com


man aliases does not exist.
I will see if the .forward works or not

I don't know how to configure sendmail (man pages and google don't work) so I have no idea why emailing root with mutt gives me this error: sendmail: Cannot open mail:25
(yes, the sendmail daemon is running).

Thanks,
CPUFreak91
_________________
All Your Base Are Belong To Us!!! chown -r us ./base
"After three days without programming, life becomes meaningless.'' -- Tao of Programming Book 2
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum