Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Mar 2007 21:58:59 +0100
From:      Laszlo Nagy <gandalf@designaproduct.biz>
To:        freebsd-questions@freebsd.org
Subject:   sendmail not working?
Message-ID:  <45F86213.10604@designaproduct.biz>

next in thread | raw e-mail | index | archive | help

  Hi All,

Got a problem with FreeBSD 6.2 (upgraded from 6.1): cron is not sending 
out e-mails. However, it is running:

messias# ps ax | grep cron
 988  ??  Ss     0:01.86 /usr/sbin/cron -s

But, if I write this into the crontab of root:

SHELL=/bin/csh
* * * * * echo "Test"


then I do not get any e-mail. This machine has an ssh tunnel that 
forwards TCP/25 port to another machine. Postfix is installed on this 
machine, but it is not enabled. I believe that sendmail should work for 
local addresses, even if the SMTP server is not listening locally. At 
least, sendmail(8) tells this:

<man 8 sendmail>
       With  no  flags, sendmail reads its standard input up to an 
end-of-file
       or a line consisting only of a single dot and sends a copy of 
the  mes-
       sage  found  there  to  all of the addresses listed.  It 
determines the
       network(s) to use based on the syntax and contents of the addresses.

       Local addresses are looked up in  a  file  and  aliased  
appropriately.
</man 8 sendmail>

Here is a quick test that I did:

messias# sendmail gandalf
Test2
.
messias# mail
Mail version 8.1 6/6/93.  Type ? for help.
"/var/mail/gandalf": 1 message
 >   1 MAILER-DAEMON@messia  Fri Nov 10 12:27  13/664   "DON'T DELETE 
THIS MESSAGE -- FOLDER INTERNAL DATA"
&

I have many scripts that I would like to run from cron. Probably they 
throw errors, but I have no clue what are those errors, because I'm not 
getting mails from cron. What should I do?

Another question: is it possible to setup cron so that it uses a 
different SMTP server for sending e-mails? If so, can I specify this for 
one user only? Well, the obvious solution would be to create a special 
user and create a .forward file, right?

Thanks in advance,

   Laszlo




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?45F86213.10604>