This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

mail

Old posts that have not been replied to for several years.
Locked
g
gk^
Halfop
Posts: 70
Joined: Sun Jul 28, 2002 6:23 am
Location: Stockholm, Sweden
Contact:

mail

Post by gk^ »

How can I make the autobotchk mail me at bot@foo.com if the bot has gone down?
I tried -mail bot@foot.com instead of -noemail, but it didnt work.. Anyone?
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

The simplest method, will be to set up redirection for your shell e-mail, than doing anything else.

E-mail is not sent by the botchk script.

E-mail is sent by the cron demon. It does this by senidng anything sent to STDOUT, in a e-mail to, to your username on the shell.

As such, you can redirect all e-mails sent to your shell, to another address. How this is done, you are best speaking to your shell provider, to see how this can be aranged.
g
gk^
Halfop
Posts: 70
Joined: Sun Jul 28, 2002 6:23 am
Location: Stockholm, Sweden
Contact:

Post by gk^ »

So it isnt possible to do it with crontab then? Couse I am my shell provider, and I dont know how to forward emails. And I would like to do this with crontab. . Thank you for all your help
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

The autobotchk script, is designed to create a "botchk" script, tailered to your bot, it then inserts a line in your crontab to load it. Nothing more.

The botchk script, will check if the bot is running. If not, load it, if so, simply exit the script.

The crond program, which runs the script at specific times, will e-mail any output the scripts produce, to the mailbox setup you userX on that shell. userX is the username of persons crontab it is working on.

As noted, e-mail redirection on the shell will forward it on.

It is the crond doeing the e-mailing, not the botchk, or autobotchk script.

The -noemail option, simply redirects the test to nowhere, instead of into the buffer that is used to make the e-mail.

Another method, as well as mail re-direction, is to setup the botchk script to redirect output into a specific file, a second crond script will then detect if the file exists, if so, that script is designed to send mail to other addresses.

This is all beyond the scope of this forum.
S
SiD3WiNDR

Post by SiD3WiNDR »

Run

Code: Select all

crontab -e
and put a line

Code: Select all

MAILTO="foo@bar.com"
at the top (above your botchk statement(s)).

This should work.

man crontab though, not really eggdrop material...

T
Locked