[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: email tail output



On 18/06/12 14:40, Umarzuki Mochlis wrote:
> hi,
> 
> a newbie question:
> 
> from what i heard that mail command does not need to have mail service
> running, right?
> 
> so i tried below command from my laptop just to check if i can put
> similar command in crontab later then i wouldn't have to log in to a
> server just to check if a process failed
> 
> $ tail /var/mail/user | mail -s "system mail on `date +%F`" user@domain.com
> 
> but the email does not arrive at user@domain.com. Is there any
> possibility that the mail could be blocked because i could not find it
> in mailq?
> 

I may be misunderstanding your requirements.

As I understand it, the mail command doesn't need the MTA running _at
the time_, since it just puts the message in the queue. But you'll need
to run an MTA at some point to pick it up and deliver it. If you don't
want to do that, you'll need a mail program that connects directly to a
remote SMTP server.

Richard


Reply to: