I have a WRT54g and a Network Storage with a smb share. I think it were very cool to have a imap server on my Router.
This Server shuld recive Mail from more then one pop3 server. A webfrontend were a nice feature, too.
I want to know: Is thies possible that to wirte such a programm or is exits there allrady a programm for that?
Topic: Imap Server on Wrt54g
The content of this topic has been archived on 9 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.
Why don't you just set up a Linux box in a DMZ and forward the appropriate ports to it? It would be a 1000 times easier, more efficient and just makes sense. Everything you need will be already installed or can be in seconds.
Exactly what Void Man wrote. A Wrt is a router and a single user system, not a server.
Thank for reply.
But I to run a server 24 Hour a day and thies needs electricity and place, which are rare. And it was just a thougt.
So I will bury my Idea.
Your thought is valid. I'm replacing an aged Alpha that pulled nearly $100/month in electricity, with a WRT54, with a remote samba share. It's hosting 2 websites. I'm also working to replace email services as well.
Don't let those nay-sayer's slow down your pursuits. I'd much rathar have one samba server PC, and several little embedded application servers that pull 23W than what I had.
The little guy I've deployed for web has proved it self reliable and stable now, and I have no reason to think it can't provide the low-volume services at home that you and I are wanting. That plus cutting my light bill 40% is not bad.
Bill
You need a multiuser system capable of receiving mail. Why bury it? You don't need an electron sucker like a DEC Alpha for a mail server. Any small footprint low power PC or laptop will due. I'm just saying it would be a huge effort to get something like this to run on a WRT, and for what? You can probably get an old desktop for nothing and it will make a *fine* mail/imap server, and it doesn't have to use a lot of power. You don't even have to have a monitor, keyboar or mouse hooked up to it. It just needs a hard drive, motherboard and NIC. I mean I love seeing people make remote control trucks out of their WRT just as much as the next guy but this is something that would be done for practicality and not the "cool factor". I'm just being practical here. It's amazing what you can do with the WRT but I think what you are asking for here is a little much. Just my personal opinion of course. I would love to see you build a working package.
Given that you already have a machine which is running as a Samba server, why not run your IMAP server on that too?
I could understand if you had a USB-attached hard drive on your OpenWRT box. But in any case, OpenWRT is way underpowered (in terms of ROM and RAM) for an IMAP server. If you're not able to touch the machine running Samba, then I think your best bet is to get an end-of-life laptop and run it on that.
Regards,
Brian.
What about the linksys NSLU2 ?
it is a NAS device with intel PXA270 processor and 32 MB Ram, and usb2.0 port.
this device does run linux, and there are distros for this as well:
http://www.nslu2-linux.org/
but it has still the problem with the lack of CPU horsepower, ie only 133MHz
(can be brought to 266 MHz w/ hardware mod)
i think this might be a better candidate for running such a thingie.
BTW: there is "Maxtor shared storage" on your http://wiki.openwrt.org/TableOfHardware.
this has quite some more cpu-horsepower (300MHz, and also 32MB of RAM).
but is also somewhat more expensive ie €219,- compared to €111,- + € 89,- = € 200,-
but it's support state is unsupported, so thats why i'd stick to the linksys.
Anyway, if i had a router, i'd _NOT_ bload it with things like an imap server, as this might
slow down the real things (routing).
PS: an note to old pentiums: they DO suck some power from the mains. the cpu+surroundings will easily
drain 15Watts, as the Hdd will - this sums to 30W. and as the efficiency of (especially cheap) PC Powersupplys
is damn worse at this output, it will easily drain 60W or more from the mains.
(efficiency usually gets better when you approch the rated power, eg, if it is a 200W power supply,
and you drain 150W, the efficience will climb to 75%)
this integrated devices OTOH require ~10W DC power, and as it's powersupply is rated for this output,
it's efficiency is far better. so it will drain a maximum of 15W from mains. but you need to take into account
the power for the usb hdd
Follow me on this for a bit.. I've had both PC's, Mac's and small mini's (DecStation 5000, Alpha 4100) type systems in my home office for years. One machine would be my fileserver, e-mail, and web, the PC's and Mac's where workstations.
As usually goes, I put the most important "services" on my most reliable, equipment, usually the RISC based systems.
More recently, I've been moving to smaller platforms, as you suggested, running FreeBSD. In fact the Samba server I mentioned is running on a mini-itx FreeBSD box that is also my home Asterisk Switch.
One of the things that has gotten me so interested in the WRT's as embedded processors, is that if you take it out of the Blue and black case, conceptually, it's nothing more than a 200 Mhz ARM processor, useful for any number of things.
Does that fact that it's current implemenation as a router, also limit it's use as such, or apply some inherent boundaries or limitations, because of the current application?
Now, stay with me, if most of the possible applications, ie; web, imap, smtp, etc, are not FP intensive, then putting them onto remote processor's that are basically, simply moving data back and forth across the network. Is that not what a router does, in reality.
Many dedicated systems use processor's much like what's in the WRT, ie; Cisco using PowerPC and ARM chips in
their routers, and phones.
Now, for small low-volume applications like my home website, email server, and such, using 1 PC as an actual file server, with nfs or samba for serving up the shares, to a small farm of WRT's for services.
So, what do I wind up with? 1 PC, the only one to actually have to worry about backing up, which pulls nearly 5 times the power of 1 WRT.
I'm currently testing a WRT in a much larger environment, as a web server using Light httpd. It's performance is actually quite good in a moderate volume web environment. .. BTW, replacing another Alpha 4100...
Obviosuly, having to be careful about cgi's and other spawned processes, but so far things look good, and performance with no load is identical. LightHTTPD is interesting, as it can handle signficant requests, without additional memory load on the server.
The 32M unit's are really the unit's to use for this, as the 16 meg unit's end up burning their cache for apps.
Thought's?
Bill
What about the linksys NSLU2 ?
it is a NAS device with intel PXA270 processor and 32 MB Ram, and usb2.0 port.
this device does run linux, and there are distros for this as well:
http://www.nslu2-linux.org/but it has still the problem with the lack of CPU horsepower, ie only 133MHz
(can be brought to 266 MHz w/ hardware mod)
I'm shopping for one of the slugs. I'm planning to make one a file server for
the WRT's. It's got plenty of horsepower, but the hardware mod looks pretty
easy.
Bill
Now, stay with me, if most of the possible applications, ie; web, imap, smtp, etc, are not FP intensive, then putting them onto remote processor's that are basically, simply moving data back and forth across the network. Is that not what a router does, in reality.
A router does indeed just shove IP packets back and forth. It doesn't keep any state, remembering packets it has already seen. For each packet it does table lookups to decide how to process that packet, based on the content of that packet only.
A POP3 server is a lot more sophisticated than that. It has to maintain TCP sessions for each attached client. It has to parse headers. It has to reformat message bodies (e.g. converting \n to \r\n). An IMAP server adds a whole load more complexity, including indexing and searching of headers.
Squeezing an IMAP server into ~2MB of flash will be tricky, and having it run in 16MB of RAM harder still (i.e. IMAP servers are generally not optimised to run in the absolute minimum possible amount of RAM), even with only one or two clients connecting at a time. The only way to get around this would be to start swapping over NFS, which is unbelievably painful.
Since you already have a mini-ITX PC with a CPU "5 times more powerful" by your admission, but more importantly lots more RAM, in my opinion that's the sensible place to run an IMAP server.
The same applies to lots of client-server applications. For example, it makes sense to run a mysql client under OpenWRT; IMO it doesn't make sense to run a mysql server.
savoy wrote:Now, stay with me, if most of the possible applications, ie; web, imap, smtp, etc, are not FP intensive, then putting them onto remote processor's that are basically, simply moving data back and forth across the network. Is that not what a router does, in reality.
A router does indeed just shove IP packets back and forth. It doesn't keep any state, remembering packets it has already seen. For each packet it does table lookups to decide how to process that packet, based on the content of that packet only.
A POP3 server is a lot more sophisticated than that. It has to maintain TCP sessions for each attached client. It has to parse headers. It has to reformat message bodies (e.g. converting \n to \r\n). An IMAP server adds a whole load more complexity, including indexing and searching of headers.
Squeezing an IMAP server into ~2MB of flash will be tricky, and having it run in 16MB of RAM harder still (i.e. IMAP servers are generally not optimised to run in the absolute minimum possible amount of RAM), even with only one or two clients connecting at a time. The only way to get around this would be to start swapping over NFS, which is unbelievably painful.
Since you already have a mini-ITX PC with a CPU "5 times more powerful" by your admission, but more importantly lots more RAM, in my opinion that's the sensible place to run an IMAP server.
The same applies to lots of client-server applications. For example, it makes sense to run a mysql client under OpenWRT; IMO it doesn't make sense to run a mysql server.
Actually, the router does keep state on Tcp transactions, if you enable Iptables, and are using it in a full state-ful firewall mode. Yes your absolutely right, if I was running an ISP, which I've done two, that's when I'd have my big iron ready with the backplane and memory for thousands of maintained connections. It maintains session data, state and hanldles a fair amount of overhead.
But, that's not the application, in the case of this gentleman and myself, running a couple of imap sessions for my own mailboxes, with plenty of disk space mounted is nothing at all. Yes, I'm already installing packages onto my mounted space...
Courier IMAP is not very ram intensive and is just one that should be easy to port.
The mini-itx uses 5 times the electricity... :-) It's actually pulling 1.8 amps versus the wrt 23 watts.
And I agree completely, using the WRT's as mysql clients, talking to PC server with disks for the server is
reasonable.
But, think about other applications where for example you need a DNS server, for small home domain, and forwarding. For reliabilitiy sake, would the WRT make a good platform for that? A few small zone files would
be perfect example of using a WRT as an "applicance".
Bill
Courier IMAP is not very ram intensive and is just one that should be easy to port.
Did I just hear someone just volunteer?
The mini-itx uses 5 times the electricity... :-) It's actually pulling 1.8 amps versus the wrt 23 watts.
Sure but I thought you said the mini-itx is powered up and providing network-attached storage for the WRT? In that case you're already paying the electricity bill for it. Or are you using a USB-attached hard drive on the WRT?
But, think about other applications where for example you need a DNS server, for small home domain, and forwarding. For reliabilitiy sake, would the WRT make a good platform for that? A few small zone files would
be perfect example of using a WRT as an "applicance".
Yes - doesn't dnsmasq do that already though? Anyway, a DNS server is not the same as an IMAP server
Given that you already have a machine which is running as a Samba server, why not run your IMAP server on that too?
Not a Maschine with a smb share, it´s only a Network Stroage.
What kind of NAS are you using? As sombody previously mentiond the NSLU but also nice machines are the linkstations the might have a little more CPU power with 400MHZ MIPS cpus and can run full debian distros.
http://linkstationwiki.org has lots of infos on these.
Sorry for not anssering, but I was over Chrismas and Newyear not at PC.
I have Maxtor shared storage, but I don#t realy want to put OpenWrt on it because its unsupported.
Today there are plenty of routers capable of running a pop3/imap server like dovecot for example.
So, can somebody with a complile enviroment make a dovecot package ?
(Last edited by VeNoM on 20 Oct 2006, 13:38)
Today there are plenty of routers capable of running a pop3/imap server like dovecot for example.
So, can somebody with a complile enviroment make a dovecot package ?
I have dovecot 1.0.7 running on Kamikaze on WL-500g Deluxe, but I just do not have time to do the port reliably and prepare the package :-(
(besides that, I still have the old build environment)
So, it's just for the information that it is indeed possible and the resulting package works fine.
Ho did you compile dovecot? dod you cross compile or not?
I'm having troubles cross compiling dovecot V1 release 27 for my wrtg4gs but it looks like it does not work properly.
Fabrizio.
I would very much appreciate any help on this. Once I am successful, I will post the full set of commands that work to this thread for all to benefit...
Please note that if you don't add the "modules" option to flexible led strip led strip lighting outdoor LED Light Bars the openswan ipkg/rules, the ipkg is made, but, not the modules package. Obviously, I am missing something here...
Thanks in advance!
well,past
The discussion might have continued from here.