From owner-freebsd-questions@FreeBSD.ORG Wed Mar 14 20:59:02 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4118516A401 for ; Wed, 14 Mar 2007 20:59:02 +0000 (UTC) (envelope-from gandalf@designaproduct.biz) Received: from designaproduct.biz (135-shost.hostoffice.hu [195.228.74.135]) by mx1.freebsd.org (Postfix) with ESMTP id 0332B13C46E for ; Wed, 14 Mar 2007 20:59:01 +0000 (UTC) (envelope-from gandalf@designaproduct.biz) Received: from [172.16.0.43] (localhost [127.0.0.1]) by designaproduct.biz (Postfix) with ESMTP id 6CADD1DD422 for ; Wed, 14 Mar 2007 16:52:19 -0400 (EDT) Message-ID: <45F86213.10604@designaproduct.biz> Date: Wed, 14 Mar 2007 21:58:59 +0100 From: Laszlo Nagy User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) MIME-Version: 1.0 To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit Subject: sendmail not working? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2007 20:59:02 -0000 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: 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. 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