Ask a Question related to Ubuntu, Design and Development.
-
Sebastian Stein #1
How to set email address for cron?
Cron is generating some messages on my Ubuntu system. However, the messages are
always mailed to root@domain. I have set domain in my postfix configuration. Is
there a way to tell cron where to send the messages instead?
Sebastian
Sebastian Stein Guest
-
Email address in a form
I have a form where people enter their e-mail address into a required field. What i am trying to do is when the user clicks submit and it sends the... -
email address??
I have the following code for email <strong><font color="#000000"><a href="mailto:mail@leaktechinc.com"></a></font></strong> How do add... -
Hiding Email address
Is there code out there to truly hide email addresses from view source or spiders(crawlers etc). TIA Aaron -
email - reply address
After configuring internet access and email accounts using pop3 connector, everything worked fine except for the reply address on the emails. My... -
Getting email address.
When my Users enter their information into my trouble call database, is there a way to get their email address automatically rather than them... -
Jeffery Michael Thompson #2
Re: How to set email address for cron?
This is quoting Seth Holmes from a previous thread in this newsgroup. "
You should allow yourself as a user of cron and run it as yourself. It will
e-mail alerts to the user account. If you want those alerts sent elsewhere,
you can set up an aliase in /etc/mail/aliases (or /etc/aliases depending on
your configuration). You could also set up the root account to do this with
by sending all root e-mail to you. But doing things as root when not
required as a "Bad Thing(tm)".
In addition, if you have a specific job you are running and you want the
output sent to a specific e-mail, you can pipe it through mailx and have it
sent to you.
0 7 * * * ls -laR / | mailx -s "Your directory tree" [email]address@domain.com[/email]
And for real simplification, you can use the MAILTO environment variable.
MAILTO=address@domain.com
This will mail on cron output to [email]address@domain.com[/email]. This goes in the
crontab file (which you edit with crontab -e).
This can all be found in the crontab man pages. Just some of it is in in
page 5 so you'd have to do
man 5 crontab
HTH
HAND
-- Seth H Holmes
"
Jeff Thompson
Jeffery Michael Thompson Guest
-
Sebastian Stein #3
Re: How to set email address for cron?
Jeffery Michael Thompson <ninthwave@atspeakeasy.dotnetnospam> wrote:
Tried this. In /etc/aliases I have> You should allow yourself as a user of cron and run it as yourself. It will
> e-mail alerts to the user account. If you want those alerts sent elsewhere,
> you can set up an aliase in /etc/mail/aliases (or /etc/aliases depending on
> your configuration).
root: admin@localhost
and admin is the account I'm working with.
Yes, I didn't do this.> You could also set up the root account to do this with by sending all root
> e-mail to you. But doing things as root when not required as a "Bad
> Thing(tm)".
In /etc/cron.daily/aide I have:> In addition, if you have a specific job you are running and you want the
> output sent to a specific e-mail, you can pipe it through mailx and have it
> sent to you.
>
> 0 7 * * * ls -laR / | mailx -s "Your directory tree" [email]address@domain.com[/email]
>
> And for real simplification, you can use the MAILTO environment variable.
>
> MAILTO=address@domain.com
MAILTO="${MAILTO:-admin@localhost}"
Still, it doesn't work.
Sebastian
Sebastian Stein Guest
-
Seth H Holmes #4
Re: How to set email address for cron?
On 2006-02-10, Sebastian Stein <seb_stein@gmx.de> wrote:
You have to add it to the crontab file.>>> MAILTO=address@domain.com
> In /etc/cron.daily/aide I have:
>
> MAILTO="${MAILTO:-admin@localhost}"
>
> Still, it doesn't work.
crontab -e
That will allow you to edit the crontab file.
--
Seth H Holmes
Seth H Holmes Guest
-
Sebastian Stein #5
Re: How to set email address for cron?
Seth H Holmes <sholmes@nottellingyouthiseither.com> wrote:
It still doesn't work. It is really driving me crazy. Please also note that the> On 2006-02-10, Sebastian Stein <seb_stein@gmx.de> wrote:
>>>>>>> MAILTO=address@domain.com
>> In /etc/cron.daily/aide I have:
>>
>> MAILTO="${MAILTO:-admin@localhost}"
>>
>> Still, it doesn't work.
> You have to add it to the crontab file.
>
> crontab -e
>
> That will allow you to edit the crontab file.
cron job for aide is started automatically by the system. The aide script is
put into /etc/cron.daily/. This time I added MAILTO=admin@localhost to
/etc/crontab. Still nothing changed.
Sebastian
Sebastian Stein Guest
-
Seth H Holmes #6
Re: How to set email address for cron?
On 2006-02-14, Sebastian Stein <seb_stein@gmx.de> wrote:
Where does mail for admin@localhost get delivered? Consider removing> Seth H Holmes <sholmes@nottellingyouthiseither.com> wrote:>>> On 2006-02-10, Sebastian Stein <seb_stein@gmx.de> wrote:
>>>>>>>> MAILTO=address@domain.com
>>>
>>> In /etc/cron.daily/aide I have:
>>>
>>> MAILTO="${MAILTO:-admin@localhost}"
>>>
>>> Still, it doesn't work.
>> You have to add it to the crontab file.
>>
>> crontab -e
>>
>> That will allow you to edit the crontab file.
> It still doesn't work. It is really driving me crazy. Please also note that the
> cron job for aide is started automatically by the system. The aide script is
> put into /etc/cron.daily/. This time I added MAILTO=admin@localhost to
> /etc/crontab. Still nothing changed.
@localhost.
--
Seth H Holmes
Seth H Holmes Guest
-
Sebastian Stein #7
Re: How to set email address for cron?
Seth H Holmes <sholmes@nottellingyouthiseither.com> wrote:
To the admin user's mailbox. For example, I'm as user admin send an email to>>> It still doesn't work. It is really driving me crazy. Please also note that the
>> cron job for aide is started automatically by the system. The aide script is
>> put into /etc/cron.daily/. This time I added MAILTO=admin@localhost to
>> /etc/crontab. Still nothing changed.
> Where does mail for admin@localhost get delivered? Consider removing
> @localhost.
admin@localhost using mutt. Immediately after sending I receive this email in
my inbox. I already checked this several times.
Maybe I should contact the author of the aide Ubuntu package. How can I find
out who prepared the package?
Sebastian
Sebastian Stein Guest
-
Unregistered #8
How to set email address for cron?
Just figured it out!!! -- for me at least
the file /etc/mailname had a single entry (the machine name)
I have replaced that with my domain name (i.e. mydomain.com) - all is now working
I hope that info helps someone else out thereUnregistered Guest



Reply With Quote

