Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 06 Jan 1998 23:23:31 -0600
From:      Glenn Johnson <gljohns@bellsouth.net>
To:        Kwoody <kwoody@citytel.net>
Cc:        freebsd-questions <freebsd-questions@freebsd.org>
Subject:   Re: mail question. 
Message-ID:  <199801070523.XAA04069@gforce.bellsouth.net>
In-Reply-To: Your message of "Tue, 06 Jan 1998 15:31:57 PST." <Pine.BSF.3.91.980106093503.3658A-100000@mybsd.net> 

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> How do I make it so that when I send a mail via pine and my connection is 
> not up to wait until a connection is up then send any mail in the queue? 
> 
> I know sendmail -q will do that but how to make sendmail queue mail 
> instead of sending it right away? I get mail via a little script with 
> fetchmail so just putting in a sendmail -q in it will process the queue I 
> know that.
> 
> Mostly this bugs me when I'm dialed in repling to mail. If i have pine 
> setup to use the bsd machine as the smtp server, I can send mail and it 
> gets queued then when the connection is up a sendamil -q works fine. Also 
> when in this configuration i cannot send any mail to anyone else that is 
> in my ISP's domain (citytel.net) I get a user unknown error from pine.
> Why would that be?
> 
> But change pine to use my ISP as the smtp server, try to send any mail 
> while I'm dialed in pine times out with an unknown server error cause ppp 
> cant dial out. (cause I'm dialed in) and it does not queue mail.
> 
> And at the moment a sendmail -bp does not work. I issue the command and 
> sendmail just seems to hang, though a ctrl-c stops it. there is nothing 
> in /var/spool/mqueue.
> 
> I guess what I'm saying is I want to use my ISP as the smtp server in 
> pine, but have it queue mail until such a time a connection is up and I 
> can process the queue with a sendmail -q in my script. I would like to 
> use this so it works both in a dialup and when I'm sitting at the 
> machine.
> 
> Is this possible? Do I need to change sendmail.cf? After experimenting 
> with a few different ways, I have finally figured out what i want to do 
> and how to word it but not acutally how to put it all together.
> 
> thanks!
> Keith
> 
> 
> 
> 
Well, I only use pine occasionally and so am no expert in all of its settings, 
so you may need to read the help notes and check your settings there. But I 
believe what you want to do is tell sendmail to defer its mail delivery. You 
can do this by setting the default delivery mode to deferred, ie., you 
probably have the following line in /etc/sendmail.cf:
	
	O DeliveryMode=background
Change this to:
	
	O DeliveryMode=deferred

In /etc/rc.conf, you will want your sendmail_flags line to read:

	sendmail_flags="-bd"

To have your mail queue processed when your link comes up (I am assuming you 
are using "iijppp") you would add the following to your /etc/ppp/ppp.linkup:

	" !bg /usr/sbin/sendmail -q"

To have your mail delivered after fetching it you could use the postconnect 
command of fetchmail in your .fetchmailrc,. ie.,

	 postconnect "/usr/sbin/sendmail -q"

Hope this helps.
-- 
Glenn Johnson
gljohns@bellsouth.net





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