Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Sep 2000 09:53:39 -0400
From:      Bob Johnson <bobj@eng.ufl.edu>
To:        ryan@sasknow.com
Cc:        questions@freebsd.org
Subject:   Re: sendmail and cron
Message-ID:  <39CB6463.57095FA1@eng.ufl.edu>

next in thread | raw e-mail | index | archive | help
> Date: Thu, 21 Sep 2000 17:29:49 -0600 (CST)
> From: Ryan Thompson <ryan@sasknow.com>
> Subject: sendmail and cron
> 
> Hey everybody,
> 
> Anything wrong with a cron job that runs sendmail -q at specific
> intervals?  Or must I invoke the daemon with -q[time]?

The only problem I've ever run into is that if your outgoing 
mail generates some sort of error at the receiving host, 
it cannot get an error message back to you if you don't 
have sendmail listening for incoming connections.  I'm not 
sure if proper use of sendmail's masquerading or other config 
features would solve this.  If you are going to also run 
sendmail -bd without the -q option so you have a daemon 
running for incoming mail, then this won't be a problem.  

> 
> I'd like to use cron(8) to gain some flexibility with time settings (i.e.,
> not necessarily regular intervals).
>

If the only things generating outgoing mail are assorted scripts, 
they can invoke sendmail directly, instead of running it as a 
separate cron job.  E.g.  the periodic stuff in /etc/crontab.

It might be prudent to include the -q to check for anything that 
didn't get delivered on the first try.  So if your question is 
"should I run sendmail -q once in a while just in case something 
got stuck in the queue?" I'd say it's a fine idea.

I think you will find that by default, any invocation of 
sendmail to send a message will attempt to deliver the 
message immediately by default, and leave it in the queue 
only if it is unsuccessful.  This means that if you are 
trying to control the frequency of modem dialing (or 
something similar) you need to take this into account.  

> I don't forsee any problems, but I'd be glad to hear any thoughts.
> 

Well, those are my thoughts.  I'm not a sendmail guru, so 
some of them may be wrong.

> Thanks,
> 
> - - Ryan

- Bob


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?39CB6463.57095FA1>