16 messages in net.sourceforge.lists.courier-usersRe: [courier-users] Re: courier-mta a...
FromSent OnAttachments
Michelle KonzackSep 30, 2003 4:12 pm 
Jeff JansenOct 1, 2003 2:02 am 
Michelle KonzackOct 1, 2003 5:09 pm 
Sam VarshavchikOct 1, 2003 7:35 pm 
Michelle KonzackOct 2, 2003 1:38 am 
Anand BuddhdevOct 2, 2003 3:32 am 
Jeff JansenOct 2, 2003 3:42 am 
Jeff JansenOct 2, 2003 4:11 am 
Anand BuddhdevOct 2, 2003 5:44 am 
Jon NelsonOct 2, 2003 6:52 am 
Gordon MessmerOct 2, 2003 9:14 am 
Jeff JansenOct 2, 2003 10:29 am 
Michelle KonzackOct 3, 2003 3:37 am 
Michelle KonzackOct 3, 2003 4:09 am 
Jeff JansenOct 3, 2003 7:08 am 
Michelle KonzackOct 3, 2003 10:39 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [courier-users] Re: courier-mta and dialupActions...
From:Jeff Jansen (ivb_@sil.org)
Date:Oct 3, 2003 7:08:46 am
List:net.sourceforge.lists.courier-users

On Friday 03 October 2003 10:35, Michelle Konzack wrote:

The problem is, that my Dial-Out Box and courier-mta are two different machines in my Network...

I have two Dial-Out-Boxes: one is a CISCO-Router and the other is a Linux-Box.

To get your suggestion working, I can not use Dial-In-On-Demand... Thats realy bad.

Sorry, I missed that part. I thought we were talking about the same machine. So you want all the mail to sit there until your cron job triggers courier to send it and which time your demand dialing will kick in and mail will get sent out?

I think you're going to have to resort to a script hack to make that work with courier. Anand's idea of changing the MAXDELS variable, restarting courier and then flushing the queue would work. In that case nothing would get sent until you ran the script. Then you'd have to reset the variable to 0 when you were done sending.

I think I would use an iptables rule to stop courier sending out until the I wanted it to. So something like this:

====================================== #!/bin/sh

/sbin/iptables -D OUTPUT -p tcp -m tcp -o eth0 --dport 25 -j REJECT /usr/lib/courier/sbin/courier flush

while (`sleep 60`); do PS=`/bin/ps -axww | egrep -c "courieresmtp [0123456789]" ` if [ $PS == 0 ]; then break fi done

/sbin/iptables -I OUTPUT -p tcp -m tcp -o eth0 --dport 25 -j REJECT ======================================

(You'll have to put in your own network interface if it's not eth0.) This will delete the iptables rule which blocks outbound smtp, run courier flush, then watch the processes until there are no more courieresmtp processes sending, and then reinstate the rule to block outbound smtp.

But you're right. There's no configurable way in courier to not send any mail but then easily flush the queue.