Fetchmail, Sendmail and oversized emails

There’s a tendency for lusers to try to email anything these days. If you though a few Gig of outgoing mail queue was enough you haven’t come across the luser who decided to email the contents of a CD (uncompressed) to all her friends. Quite what they’d have made of their iPhone trying to download it I’ll never know.

Sendmail has a method for limiting emails to a sensible size. As a reminder, inside host.example.com.mc you need to add:

# The following sets the maximum message to 5Mb - otherwise it's infinite
define(`confMAX_MESSAGE_SIZE', `5242880')

Then run “make” and “make install” and “make restart”. This will generate the sendmail.cf (and any hashmaps) before restarting. The bit you always forget when changing .mc files is the “make install”. This is all for FreeBSD – Linux types, please do it your own way.

So this is great – anyone sending an over-sized email is bounced from their server, and local users submitting email will be similarly clipped into the world of sane and sensible (if you regard something as large as 5Mb as sensible for an email).

But I came across one interesting issue recently and it could happen to you, too, if you’re using fetchmail.

For those who haven’t come across it before, fetchmail pulls emails from a POP3 box and delivers them to local users – dropping them into your local MTA by default. This is reasonable, as everything then goes through the spam filtering, procmail and anything else you have defined. It’s really useful for legacy situations where someone’s ended up with a POP3 box somewhere and you need to integrate it with the rest of their mail.

Fetchmail does plenty more besides, and has a config file to match the functionality. Presumably as a reaction against the complexity of the sendmail.cf syntax, this one tries to operate in plain English. I’ve never quite figured out the full syntax, but it’s designed to be “flexible” and figure out what you’re trying to say. Personally I don’t think it succeeds in being any more friendly then sendmail.cf in spite of being on the other end of the spectrum.

Anyway, the fun comes when fetchmail downloads an over-sized email from the POP3 box and delivers it locally via Sendmail. Sendmail will reject it, and send a bounce back to the original sender. So far, so good but f Sendmail is running as a cron job every five minutes, the luser gets a bounce back every five minutes because the outsized mail is stuck in the POP3 box. Opps! It may serve them right, but they shouldn’t be allowed to suffer for too long.

Please generate and paste your ad code here. If left empty, the ad location will be highlighted on your blog pages with a reminder to enter your code. Mid-Post

Fortunately one of fetchmail’s many options allows you to control the maximum download size, if you could figure out the syntax. It’s available as a command-line option –l , but if you prefer to keep things in the .fetchmailrc file (the best plan) you’ll need to proceed as per the following example. They keywords are “limit” and “limitflush”.

  • local-postmster-account is the login for your local postmaster – undelivered emails go there.
  • pop3.isp.co.uk – mail server with the POP3 box
  • users-domain.co.uk – Domain name who’s email ends up in POP3 box above
  • pop3-username, pop3-password – what you use to log into the POP3 box
  • Tom, Dick and Harry are local mailboxes, with tom being the default.
    set postmaster local-postmster-account

    poll pop3.isp.co.uk proto pop3 aka users-domain.co.uk no envelope no dns:
    user "pop3-username", with password "pop3-password",
    limit 5242368 limitflush to

    dick
    "dick@users-domain.co.uk " = dick
    "richard@users-domain.co.uk " = dick

    harry
    "harry@users-domain.co.uk " = harry

    tom
    "tom@users-domain.co.uk" = tom
    "*@ users-domain.co.uk " = tom

    here

    This isn’t intended as a tutorial in writing .fetchmailrc files – only an example of the use of limit and limitflush.

    So what’s going on? The limit keyword must be part of the poll statement, and is followed by the size (in bytes) of the maximum email to be retrieved. In the example it’s 512 bytes less than the 5Mb used in Sendmail (I feel I need a bit of slack on a boundary condition; it may be okay if they’re identical but I why push your luck?)

    Please read the fetchmail documentation for full details (although it’s light on examples). With just the “limit” keyword in use, over-sized mails will be left I the POP3 box. The following “limitflush” keyword will silently delete over-sized emails so they don’t bother you again. You may not want to do this! If you don’t, someone will have to retrieve or delete the emails form the POP3 box manually.

    Note that putting a limit on the download will prevent the bounce messages going to the original sender as it won’t get as far as sendmail.

Billing problems 1899.com

1899 and 18866 are two apparently linked low-cost telecoms companies. They’re so-named because that’s the prefix used to route through them.

Now some time ago I started using their services and wrote a couple of articles recommending them, with the proviso that you shouldn’t expect any kind of customer service. The company appears to be based in Switzerland and they don’t want to talk to anyone. But they’re legit. The only thing I said back then was to pay by credit card and get consumer protection. If you don’t mind this, they do deliver. Or did deliver.

After many years I had to change my credit card number, so I filled in the billing change for both companies. 1899 took no notice, and after several months tried to bill the old card – and was rejected. I made sure they had the right one, and told them to try again, but they wouldn’t. When I eventually got through to someone apparently from 1899 they said it was their policy not to try a card a second time and asked me to send the money using an international transfer, after which they’d start billing the card again. I don’t think so. This could have been anyone’s bank account, and if genuine it’s a very strange way to do business – as well as costing me £20 for the transfer. Apart from which, they weren’t trying to charge the old card again – it was a new number. That’s the point!

Their terms of business say you need to pay by credit card – no problem, they can charge the card.

They didn’t.

I wrote back saying charge the card, or if you really don’t want to, you can have cash. This is an offer to pay using legal tender – if they refused they won’t have a leg to stand on if they want the money any other way. I assumed they’d see sense.

They didn’t.

This went back and forth. I made it clear – charge the card (recommended), take the cash or I’ll see you in court. It’d be interesting to meet these guys if they went for one of the last two options.

It’s over a year now. I still owe them for the calls, and haven’t heard anything about it. It’s annoying that I owe them money. The service doesn’t work any more (unsurprisingly). I can manage without it. 18866 still works (that half of the company is using the correct card).

So do I still recommend 1899 and 18866? Well I suppose I do, but as I said in my original articles, it’s fine when it works but don’t expect any sane or sensible customer service if it doesn’t.

Oil war or humanitarian mission?

I’ve woken up today to hear we’re in yet another war to protect oil supplies, this time in Libya.

What’s actually happening is that a bunch of dodgy people are trying to take control from the existing a dodgy government by force of arms. The UN (a label of convenience) is weighing in on the side of the anti-government faction that controls the oil fields (or did yesterday, things are moving fast). The excuse is that they’re protecting civilians.

Now this is something of a civil war. There are four groups involved. Firstly there are the government forces. They’re not civilians and it’s their job to protect the state. If we had an armed uprising in the UK (such as the IRA), the state army is there to protect the government. The Libyan army likewise.

The second group are the anti-state “army”. Actually they’re not an army; they’re several groups of civilians with guns and bombs. The state army is defending the state against them, as would be expected. Is the UN protecting these “civilians” from the state army? It looks like it; or more specifically the UN is providing military support to this groups, against the government.

The third and fourth groups are the pro and anti-government civilians. By siding with the anti-government lot (simplistically, those in the east) you could argue that you’re protecting those civilians, but as you’re not (apparently) protecting the pro-government civilians in Tripoli from the rebels, it’s a very thin argument.

All governments in the region are dodgy (Israel is the only real democracy as we know it). The rebels are dodgy. It’s a dodgy place, and there are dodgy people around. It’s the way things are, and we should be leaving them alone. Otherwise we’re imposing our version how things should be on someone else. But unfortunately a lot of these places are financed by the oil we’re dependent on buying from them, which is what makes Libya a special case (along with Iraq).

Pretending that it’s a “no fly” zone for humanitarian reasons, basically siding with the rebels, is a scandal. If we’re going to war we should be honest about the reasons, not making them up after the event (like Blair and Bush). And if they think they’re backing the right horse with military support and they’ll be rewarded later, they know nothing about the culture in that region. I’m not even sure they’ve backed the right horse; Gaddafi’s government doesn’t roll over easily.

Cameron on Gaddafi – it’s personal

I’ve just watched David Cameron being interviewed about the situation in Libya. He’s saying things like “Stop Col. Gaddafi”, and “Col. Gaddafi is brutalising his people”, referring to Libya’s stated compliance with a ceasefire.

This is worrying. Col. Gaddafi isn’t attacking civilians, repressing his people or doing any of the other things David Cameron and Barak Obama are accusing him of. HE is sitting in an office. Elsewhere in Libya there are people with differing interests fighting each other. It’s called a civil war.

When our politicians refer to such problems in terms of a specific personality, such as Col. Gaddafi, Saddam Hussein or even Adolf Hitler we’re in for trouble. It’s not one person creating the situation, but a sizeable group of people with a vested interest. They’re missing the point. Or more likely, they’re hoping we’ll miss it.

Alternative Voting

I’ve just had a very nice chap on the ‘phone asking me if the AV campaign could count on my support in the forthcoming referendum. I told him that would be premature.

AV is attractive, but so is the existing, tried and tested system that has done us fairly well for nearly a century. Prior to that we had a similar system, except that women weren’t allowed to vote. This was probably wrong, but made sense at the time as women haven’t always been as clued up as in modern times (which was definitely wrong). Going back further we’ve had systems where (crudely put) only the best educated in society have had a vote, to various extents.

The idea that democracy is good, and therefore more democracy is better, doesn’t really hold water. Democracy was popularised by the ancient Greeks in Athens, but even back then they could see the problems (Plato’s Republic is an interesting read, and Socrates was a smart guy with a solid handle on it).

The good thing about democracies is that they allow you to boot out a bad government, which is why we must keep them. But do they get you a good government? I’d say, based on the evidence, that the more democratic you get, the worse the worse decisions the government is likely to take.

The AV camp keep pointing to Australia as a working example. If this is the best they can come up with, we’re in big trouble. Just take a look at Australian politics in action and you’ll see what I mean.

Another of their arguments, to quote the Electoral Reform Society, is that it “Penalises extremist parties, who are unlikely to gain many second preference votes.” They don’t back this up with research, so here’s an anecdote about the BNP (argue amongst yourselves as to whether they’re what was being talked about).

In the 2010 elections, talking to voters (especially in the less well-off and looser-tongued areas) the subject on the BNP came up. “They make a lot of sense and I’d vote for them if I thought it would do any good…” was a message I got quite frequently, in spite of the pariah status imparted to the BNP by the media. This was followed by “but I don’t want Gordon Brown to get back in.”

And there’s the rub. The AV camp believes people will vote positively with AV: vote for who they really want. What they don’t realise is that, at present, a lot of people are voting against who they don’t want, more than anything else.

So how will “extremist” parties fair under AV? Pretty well, I suspect. People would have voted for the BNP with their first choice, and against Gordon Brown with their second. The Electoral Reform Society idea that extremists will be disadvantaged needs some justification.

It’s not just me that thinks this, however. Take another minority extremist party, the Greens (they want to do some pretty extreme things with the economy); what do they reckon? Well their conference voted to back AV and they’re actively campaigning for it. If the Electoral Reform Society is correct then surely the Greens would be wiped out. That scenario doesn’t seem to bother them overly.

On the other hand, the sake-up that minority parties could bring might be just what we need as a society. Remember, you don’t need end up with an MP from such a party, but the realistic threat they might get in is bound to influence the policies of the main parties. For example, in the general population there is a majority to bring back hanging (never mind the issues involved with multiculturalism). The educated liberal elite in the main parties are always putting the brakes on the death penalty when the idea comes up, but if AV really does give the people a purer voice, things may get interesting on this any many other issues.

No Fly zone in Libya is a bad idea

EU Foreign Ministers are planning a No Fly zone for Libya to protect anti-government protesters, and Russia has decided to stop selling the Libyan government arms. No one should have been selling arms in that part of the world, but “no fly” zone?

Let’s be clear – a no fly zone involves either words (which won’t work) or attacking Libya to enforce it.

The Libyan government is fighting armed protesters/rebels and fighting back. It’s their prerogative. A no-fly zone would obviously help the rebels because they don’t have an air force. The UK government is doing various things to ingratiate itself with the rebels, probably because they’re close to the oil fields. But is this wise?

Gaddafi’s lot are as odious as they come, but we now seem to have an agreement to leave them alone and they’ll leave us alone. Blair decided this in 2004, visiting the Mad Dog in Tripoli and making peace (forgiving him); to their credit the Conservatives weren’t so keen. But is anyone stopping to think what the rebels might be like? Based on previous experience, they won’t be terribly friendly if they win.

This is something the Libyan people need to decide. If we get a “no fly” zone it means attacking Libya and taking sides in what could turn out to be a civil war. We should be careful what we wish for.

Seven Blunders of the Internet World

I’ve been involved with web hosting since the early 1990’s, and every week some hopeful bright spark comes to me with a great idea about making a fortune as an Internet entrepreneur. Whilst I hate to rain on anyone’s parade, a quick reality check is in order. Just because Amazon can make a fortune selling books on-line, doesn’t mean they can. Amazon got there first and they’ve got a slick, well organised operation. In short they can buy the books cheap, store them efficiently and, most importantly, stuff them into envelopes and post them quickly and cheaply. This doesn’t mean it’s impossible to compete with Amazon, but they were there first and have a massive advantage. If you decided to by a Cessna and try to compete with American Airlines on the London to New York run everyone would (rightly) say you were nuts, so why should it be a surprise to learn the same applies on-line.

Whatever you do, remember the ease of starting up on the Internet works for you and the competition. You need a unique selling point; a barrier to entry that only you can cross. If you don’t have one you’re competing with the rest of the world.

Here are seven popular but doomed ideas I’ve seen time after time…

  1. Auction Sites. eBay’s doing well, but they’re a bunch of *****s so you want a slice of the action. Unless you’re selling something very specialised (i.e. that eBay can’t handle) then you’re wasting your time. Why should anyone list items with you when you can’t match eBay’s user base? Whatever you think of eBay’s business methods, items auctioned to millions of potential buyers are going to fetch a better price and sellers know that.
  2. Social Networking Sites. So you want to be the next Facebook? Ask yourself why anyone would network their social life through you when there are bigger networks on Facebook (for home users) and LinkedIn (for professionals). Google is, I believe, planning to muscle in. They’re going to find it tough, but they’ve got almost limitless funds they can afford to speculate with, and their developers know exactly what they’re doing (well their top ones do). They’ll still need one hell of a good unique selling point.
  3. Blogging sites. Get someone to provide the content while you rake in the advertising revenue. How many mugs do you think you’ll find? People can either run their own site (and keep the advertising revenue) or use Blogspot.
  4. Directories. If your bright idea is to create a directory of business and get them to pay for a listing, I have to tell you it’s been done. If every business paid to be in every such directory they’d go bust in no time – they’re wise to it. They know that people will find them through Google, not you. There are ways this can sort-of work with advertising support but you’ll be lucky if they cover hosting costs this way.
  5. On-line shops. These do work if there’s a real shop behind them. If you’re plan is to buy a copy of Actinic or download a free copy of Zencart or one of the dozens of on-line shops, put something up and see who bits, forget it.

    Selling on-line you’re competing on price, order-fulfilment and uniqueness of stock – if people can get it cheaper and quicker somewhere else, they probably will. If you’re selling “unique” artefacts such as antiques or objet de art you’re competing with eBay or the artisans producing them, who would need a good reason not to set up their own web site and sell direct. If you’re thinking producers will pay for you to list them, ask yourself why they’d pay you rather than eBay or Amazon, where they’ll get far more exposure.

  6. Web Design Company. Great idea! Download some web template generator for Joomla and make a fortune creating web sites for… well your friends, family and then what? The problem is that there is very little barrier to entry and the market is flooded with the unemployed (and possibly unemployable) looking for a work-from-home job without getting their hands dirty. The real web design companies have real programmers and cater for customers with specialist needs. If you’re thinking of using Joomla you’re not in that league. Sorry.
  7. Internet multi-level marketing seller. Anyone can be a web hosting company, telephone company, ringtone provider or what-have-you – it’s easy! Just sign up to an affiliate programme, choose your branding and sell, sell, sell – along with thousands of others selling exactly the same thing. If it was easy to sell the provider would be selling direct, wouldn’t they?

    All of the above are tried and failed businesses. If you’ve got a plan that doesn’t fall foul of any of the above it’s either completely crazy or it might just work – in which case give me a call. There are some ideas that might just work, but I’m hardly going to reveal them here

Sally Bercow

I’m riding home on the tube with my complimentary copy of the Evening Standard, looking at a photo of Sally Burcow (New Labour activist wife of the Speaker) wearing “nothing but a sheet”, accompanied by an interview concentrating on how “sexy” the office of Speaker and politics in general cab be.

This is either part of a plot to deliberately discredit her nominally Tory husband, or perhaps she really is that naive. If it’s the latter, you’d have thought he’d know better, at least.

Actually, I don’t think John Berco needs any more discrediting – it’s time for him to go.

Incidentally, it’s not the choice of sheet that bothers me personally, it’s the nature of the interview.

Egypt – be careful what it wish for

Obama (and the British government, to an extent) seem to have the knives out for President Mubarak at the moment. It’s called populism, and theyre trying to make themselves popular with certain sections of the middle east. Mubarak seems to have been a pretty good ruler given the standards in the region, but he’s got the skids under him already so they’re toadying up to his opponants.

Of course, when meddling in the internal affairs of another country they need an excuse. In Iraq it wasn’t regime change, it was weapons of mass destruction. In Egypt the best they can come up with is democracy. The Egyptions deserve democracy and Mubarak isn’t letting them have it. He’s given them peace and stability, but apparnetly democracy is more important.

I’m not so convinced. Failing third world countries are seldom helped by it. Where they have it, it’s left over from colonial days and tends to be used to get a new dictator in place, often with disasterous results. Look at the exmaples – Rodeshia, India, Pakistan, Ivory Coast – pick a third world country and try to find ways democracy has helped. I’ve been trying hard and I can’t think of any exanples. How about Russia? They threw off the corruption that developed under communism and replaced it with…? Okay, there’s East Germany – they’re probably better off in all respects.

Mubarak and his clan are hardly squeeky clean, but its a matter for the people of Egypt and the west is never thanked for interfering , but we never learn. Our leaders might find themselves stuck with embaressing “friends”, and the people of Egypt may end up blaming them.

Scrapping fuel duty is the right thing – a greenie writes

George Osborne is listening to those who want to scrap the fuel duty increase that New Labour said was a good idea. Any tax that can be called green was fashionable to the New Labour Islington set and therefore considered a good idea.

It’s hardly a secret that I’m somewhat anti-car. There are far too many of them, most used for frivolous purposes and government policy has always pandered to the motoring lobby rather than good sense. However, motoring taxes are not the way forward. Why? Because the only people they affect are the poor, people in rural areas and those for whom motorised transport is a necessity. Blair and Brown thought it a good wheeze to tax the poor back on to bicycles.

Taxing cars based on fuel consumption or engine size is also anti-poor. The rich can and do buy new cars frequently, and therefore avoid the effect of the taxes. It also encourages car production, wasting natural resources (although promoting jobs/votes in the motor industry). Those using second-hand cars are the ones that suffer. If you can’t afford a new lower-energy car you’re hit with the taxes; if you can, you’re not. If you make do with an old car, helping the environment by not scrapping it but repairing and reusing it, you get taxed for your trouble.

Perhaps the poor don’t deserve to use a car. That appears to Blair/Brown/Milliband’s idea. I wonder how they’d like it if their cleaner couldn’t get to work, or the nurses at the hospital or the teaching assistants at the schools in the affluent areas in which politicians live, but the low-paid workers have to commute to. Its good to see a Conservative chancellor forgoing a good chance to make a quick buck in the name of being green and looking after the people.