4 messages in net.sourceforge.lists.courier-usersRe: [courier-users] smart-host using ...
FromSent OnAttachments
Michelle KonzackApr 19, 2007 9:42 am 
Gordon MessmerApr 19, 2007 11:03 am 
Michelle KonzackApr 20, 2007 7:49 am 
Gordon MessmerApr 20, 2007 10:37 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] smart-host using courier-mtaActions...
From:Gordon Messmer (yiny@eburg.com)
Date:Apr 20, 2007 10:37:06 am
List:net.sourceforge.lists.courier-users

Michelle Konzack wrote:

ISP +-----+ // +-----+ mx.freenet.de (5)| L |(4) // (3)| S |(1) port 587 <------| A |<--------//------| E |-----> | P | // | R | GSM | T | // | V | EDGE/IMODE fetchmail ------>| O |------//-------->| E |<----- or (6)| P |(7) // | R |(2) MX of my domain +-----+ // +-----+

(1) Should only allow messages from <linu@freenet.de> to use my cellphone and use <mx.freenet.de:25> (DOES NOT WORK CURRENTLY)

I'm not sure how you'd do that. I don't think Courier has provisions for routing based on the source address. The only thing that comes to mind would be a separate installation of Courier that ran SMTP on a port other than 25. If you wanted to send mail out through the GSM connection, you'd select that SMTP server in your mail client.

(2) Is "fetchmail" and fetch ONLY <linu@freenet.de> over my cellphone using GSM/EDGE. (WORKS)

(3) Is now done by adding the "esmtproute" :[192.168.0.75] where the IP is the FIXED IP of my Laptop if I am in my local network and now I have several 100 message in the queue from my Laptop... (IT JUST WORKS but the retrys/delays nust be changed to look all 15 minutes for the Laptop if not availlable for 7 days and then send fail message)

(4) Should accept ANY messages coming from my server 192.168.0.69

(5) If an internet connection is detected, send all queued messages using

(6) Is "fetchmail" sucking down nearly 160 accounts over THE NET. I use "procmail" to save it into ${HOME}/Maildir on the laptop and move it (7) with a script (if I am back in the local network) to the server.

You haven't given the names of the hosts involved, so I'll have to make some up. I think this is relatively simple, but I haven't tested it, so I could be wrong. What'd I'd suggest is:

server configuration:

/etc/courier/locals: server.mk.net

/etc/courier/esmtproutes: : [192.168.0.75]

laptop configuration:

No "locals" or "hosteddomains".

/etc/courier/esmtproutes: server.mk.net: [192.168.0.69] : mx.freenet.de,587

/etc/courier/esmtpauthclient mx.freenet.de <login> <passwd>

The default smtpaccess should be fine on both hosts. Any message which comes in to the server for "server.mk.net" addresses will be delivered to a local user. All other messages will be sent to the laptop, when it is available.

Any message that comes into the laptop's queue for "server.mk.net" addresses will be delivered to your server, when it's available. All other messages will be routed to mx.freenet.de, using authentication.

I'm not sure if you need a script to stuff your messages into a Maildir, and later push them out to the server. It might be simpler not to. Consider reconfiguring the laptop so that courierd doesn't run at boot. Start courierd manually when you connect to the internet to send out queued messages, then shut it down again and run fetchmail. Let fetchmail put the messages in courier's queue, using SMTP or "sendmail". Later, when you're reconnected to your own network, run courierd again to send queued messages for your domain to your server.

See the "esmtproutes" section of the courier(8) man page.

Yeah, I know, but with this I have some trouble, since

1) "esmtproutes" is only for the receiving domain not for the sending

No, that's backward. "esmtproutes" is used to decide how to route outbound messages.

Which mean, COURIER does not remember, which messages it has gotten from my Server and should be posted to THE NET and the messgaes I have fetched or gotten from the MX to the local server?

I was thinking courier know what to do, since:

If I write a message @HOME, my SERVER spool it and "esmtproutes" it to the LAPTOP, it is clear, that the LAPTOP is searching for the <mx.freenet.de> to send it out...

If I get a message over my MX, it should be clear, that the LAPTOP should "esmtproutes" it to the SERVER in my local network...

Does this not work?

Well, courier only routes mail based on its destination, not where it came from.

A.b) I have (on my laptop) setup /etc/courier/esmtpauthclient with mx.freenet.de:587 <user_name> <passwd> But it seems not to work, even if I send a messages local from mutt. (currently I am using again "ssmtp")

I'm not sure if port specifications are valid there. Maybe someone else does.

What *does* seem to happen on outbound deliveries?

It does not accept the 587 which I must use since the french ISP <www.free.fr> and some others are blocking port 25. There is something like no route or such...

If I understand things rightly, you'll specify the port in esmtproutes, but not esmtpauthclient. Courier will use the username and password specified for that host, regardless of what port it connects to.