Koozali.org: home of the SME Server

delivering mail by CRON?

Patrick Schepers

delivering mail by CRON?
« on: January 30, 2002, 03:30:19 AM »
I'm using SME 4.1.2 for internet access and as e-mail server.

I retrieve the mail by ETRN.

Is it possible to deliver the mail to my ISP only by CRON at fixed times p.e. every hour.

I've looked at diald.conf and diald.filter but I can't figure it out.

Thanks

Ed Form

Re: delivering mail by CRON?
« Reply #1 on: January 30, 2002, 04:24:26 AM »
Patrick Schepers wrote:
>
> I'm using SME 4.1.2 for internet access and as e-mail server.
>
> I retrieve the mail by ETRN.
>
> Is it possible to deliver the mail to my ISP only by CRON at
> fixed times p.e. every hour.
>
> I've looked at diald.conf and diald.filter but I can't figure
> it out.

This is a very important question for UK users of the e-smith/Mitel products. A lot of smaller users have no choice here other than the use of paid-per-call dialup access. With the standard setting of delivering mail immediately telephone charges can run up to big sums of money. The best arrangement of all would be send only when online to download mail. I've asked several times if this is possible but no one ever replies.

This one factor is the single reason that I am not buying these products for more of my clients.

Ed Form

guestHH

Re: delivering mail by CRON?
« Reply #2 on: January 30, 2002, 12:04:07 PM »
Hi,

I'm not a crack at this but I was thinking

1. Copy the current working fetchmail to a new name (e.g. /etc/getmail)
2. Disable e-mail retrieval in the manager
3. Schedule a cron job calling the new getmail

How about that?

guestHH

Filippo Carletti

Re: delivering mail by CRON?
« Reply #3 on: January 30, 2002, 12:18:52 PM »
I think it has been discussed previously here. Search the archives.

Patrick Schepers

Re: delivering mail by CRON?
« Reply #4 on: January 30, 2002, 01:18:52 PM »
Filippo Carletti wrote:
>
> I think it has been discussed previously here. Search the
> archives.

Yes I've searched the archives intensive but according to me not one satisfieing solution is mentioned. Or overlooked I something

Thanks for reaction

Patrick Schepers

Peter

Re: delivering mail by CRON?
« Reply #5 on: January 31, 2002, 12:30:17 AM »
One way we have used in the passed is to put a time swirch to your external modem power switch. Have your e-smith settings to every hour for mail pick up. On line for a short duration and not weekends. Get your time switch to turn off over night then on in the morning again not weekends. You get lots of reports that your e-mail did not work but its when you have turned off the modem. This way you should only be online for approx 3 mins every hour to pick up your mail

Patrick Schepers

Re: delivering mail by CRON?
« Reply #6 on: February 01, 2002, 12:21:46 AM »
guestHH wrote

1. Copy the current working fetchmail to a new name (e.g. /etc/getmail)
2. Disable e-mail retrieval in the manager
3. Schedule a cron job calling the new getmail

How about that?

RequestedDeletion

***********************
This will trigger just getting mail. SME can do this for me.
I ment I want to trigger DELIVERING MAIL once a hour or so

Thanks for your reaction (bedankt)

Groetjes/Greetings

Patrick Schepers

Ed Form

Re: delivering mail by CRON?
« Reply #7 on: February 01, 2002, 01:07:26 AM »
guestHH wrote:
>
> I'm not a crack at this but I was thinking
>
> 1. Copy the current working fetchmail to a new name (e.g.
> /etc/getmail)
> 2. Disable e-mail retrieval in the manager
> 3. Schedule a cron job calling the new getmail

It's not retrieval that's the problem. That can be cotrolled with the facilities int he system manager.  It's sending that cannot be controlled. As far as I can tell, if you send a mail to the spools it is sent immediately. For UK conditions we need to make the send operation a timed event also.

Any one got any ideas? It could be worth quite a lot of beer!

Ed Form

Ed Form

Re: delivering mail by CRON?
« Reply #8 on: February 01, 2002, 01:12:19 AM »
Peter wrote:
>
> One way we have used in the passed is to put a time swirch to
> your external modem power switch. Have your e-smith settings
> to every hour for mail pick up. On line for a short duration
> and not weekends. Get your time switch to turn off over night
> then on in the morning again not weekends. You get lots of
> reports that your e-mail did not work but its when you have
> turned off the modem. This way you should only be online for
> approx 3 mins every hour to pick up your mail

This is also not a solution. You can turn off the retrieve routines in the manager panel, but what you cannot do is make the mailer daemon send out your mail according to a schedule - it always sends the moment the mail hits the spool. That's what results in excessive telephone costs.

It's nice to see a little discussion of this important point. ~(:oD)

Any chance of comments fromt he e-smith/mitel team? The lack of this facility is a sales killer in the UK.

Ed Form

Patrick Schepers

Re: delivering mail by CRON?
« Reply #9 on: February 01, 2002, 02:13:28 AM »
Is it an option to disable temporarely the forwarding daemon SMTPFWDD?
(I'm still using SME 4.1.2.)

guestHH

Re: delivering mail by CRON?
« Reply #10 on: February 01, 2002, 02:32:38 AM »
Patrick,

That's what I was thinking about reading the remaing answers in this thread.

In short, if you don't want it to  be delivered, stop the delivering guy and put it off automatic and call in his services by a scheduled CRON job.

One thing though, I don't know how SMTPFWDD and fetchmail work together  i.e. if fetchmail gets mails, will it deposite them 'until the end of times' before 'anybod (SMTPFWDD) will pick them up ??

Anybody can comment on this, or is this a typical case of rt....ual?

Regards,

RequestedDeletion (gegroet Patrick ;-) doei, doeg, houdoe,adiee, hoie?)

Patrick Schepers

Re: delivering mail by CRON?
« Reply #11 on: February 01, 2002, 02:54:18 AM »
I was even thinking shutting down diald by a cron job, but this isn't a good thought because if you enable diald my internetservice (e-smith-squid) won't work either.

stephen noble

Re: delivering mail by CRON?
« Reply #12 on: February 01, 2002, 05:21:32 AM »
> charges can run up to big sums of money. The best arrangement
> of all would be send only when online to download mail. I've
> asked several times if this is possible but no one ever
> replies.

dungog.net/sme/howto/isp.html
also dungog-ispconnection provides these as options:
* e-mail notification to admin and logging when a connection is made.
* sending mail doesn't bring up the link, ie it's queued.

this is one of many possible solutions

GORDON R. made the best suggestion which i unfortunatly lost
qmail can be toggled to not deliver mail remotely by
creating and removing a file something like

/var/qmail/local/remote/stopthebloodymail

regards
stephen noble

Kevin Manderson

Re: delivering mail by CRON?
« Reply #13 on: February 01, 2002, 12:33:14 PM »
Hi

Try sourceforge.net and search for emailrelay - looks like a possible answer.

http://sourceforge.net/project/showfiles.php?group_id=32691&release_id=66202

I haven't tried it but it looks like what you are after. Run it on a different port and tweak the clients on your local machines. You could (maybe??) redirect port 25 on your internal ethernet to the emailrelay port but leave port 25 on the external - no idea if that would work or not.

What would be interesting would be to modify the code so it did a store, watch the link and when up pass the stored e-mail to qmail to deliver. Get the best of both worlds :-}

regards
kevin

Filippo Carletti

Re: delivering mail by CRON?
« Reply #14 on: February 01, 2002, 01:27:44 PM »
> Is it an option to disable temporarely the forwarding daemon
> SMTPFWDD?

smtpfwdd accepts incoming mail, incoming means coming into the mail server, from both the lan and the net.
If you disable it, mail will be rejected.

To use qmail with a dialup connection djb wrote serialmail (http://cr.yp.to/serialmail.html)