All about email, a Freelancers Wiki guide
Sending it, forwarding it, receiving it. This is not a guide to how to set up your email client (although there are links at the end). It’s more “why” and “what” than “how”. There’s a glossary at the end.
1. You can set your “from” address to be anything you like.
Yes, even “firstname.lastname@example.org”. This is the address that replies will be sent to (unless you specify a separate “reply-to” address in your email “client” (program such as Outlook Express)). Note that the terms of service for most ISPs state that forging email addresses with intent to mislead is against the rules and will get your account pulled. Almost inevitably, spam emails have a forged sender address.
2. Most email clients allow you to set up different “((EmailRoles|accounts))” or “((EmailRoles|identities))” or “mailboxes” with different “from” addresses. This is really useful for organising your email.
3. In order to send email you use an “SMTP server”.
This will generally be the SMTP server provided for you by your ISP. In other words, if you are connected to the net by NTL, then you will set your client’s outgoing mail server to be smtp.ntlworld.com. Generally speaking you will not be required to set up a username / password for your ISP’s SMTP server.
To prevent spammers using the server, they check that you are connected to their network. For example, if you are on a Freeserve dial-up, you can’t use BT’s email servers to send mail, and vice versa.
If you are technically competent, and want more control, and have a fixed IP address and the ability to modify your own DNS, you can run your own SMTP server. It’s not something to undertake lightly, mind you, and you’ll need to make sure that:
1. Your ISP’s terms and conditions allow it.
2. Your server is not open to exploits, such as being used as an open relay by spammers.
It is possible to run your own server without a fixed IP- you need a dynamic DNS service like dyndns. But it’s a lot simpler with a fixed IP.
The third alternative is an SMTP server provided by, for example, UKservers: smtp.ukservers.net. In this case you *do* need a username and password to use it. You may have to specify a different port number to the default, as some ISPs prevent you connecting to SMTP servers other than their own. (This is to try and prevent spam). Typically this will be port 225 instead of the default port 25. [See below for more on ports and IP addresses].
4. Note that you only use one SMTP server at a time.
Somewhere for each domain (“joethetaxi.co.uk”) there is a machine that handles mail for that domain. This is often *not* the same machine as the webserver for that domain.
This is pointed to by an “MX record” (MX stands for “Mail eXchanger”) in the DNS for that domain. There may be one or many MX records for a domain, each one has associated with it a priority- the highest priority (which, confusingly, is the lowest number) machine should be the one that will actually accept and process the mail. Lower-priority machines will accept mail and forward it on; this may be useful if the connection to the highest priority machine is unreliable or part-time.
If the machine accepts the email (it might reject it if it doesn’t recognise the username, for example) it can do various things with it. It can hold on to it for collection (see below), it can pass it on to a server for collection from that machine, or it can “forward” it to a completely different email address.
Note that if email@example.com’s email is forwarded to firstname.lastname@example.org, it will still say “To: email@example.com” when it arrives.
1. You can receive email from as many different accounts as you want. In each case you will need to have a username and password. It doesn’t matter where or how you are connected to the net.
2. The username is often the same as the first part of one of your email addresses. For instance, Joe Bloggs is an NTLworld customer. His username is “joe.bloggs” and password is “44rdv4rk23”. His email client has an “NTL” account set up that has the username / password as above, the “hostname” or “server name” is “pop.ntlworld.com” and the port number is 110, the standard port for POP email. POP is a bit like SMTP – it’s a protocol (“language”) but instead of sending email, it’s for receiving it. There’s other protocols for collecting email such as IMAP, just so’s you know.
Joe’s main email address is firstname.lastname@example.org. However Joe has another NTL email address – email@example.com. This is collected in the same way and at the same time as email sent to his “normal” NTL address.
3. Joe also has a website at www.joethetaxi.co.uk. All mail sent to joethetaxi.co.uk is forwarded (as above) to firstname.lastname@example.org.
Joe has set up his email client to save his email into different folders based on what it says in the “To:” bit. In other words, mail to “email@example.com” ends up in his “joe the taxi” folder. When he replies to it, it has “firstname.lastname@example.org” as the “from address”.
(Note for Outlook users: if you’re using accounts rather than folders to sort your mail, i.e. you have more than one account that is set up to collect email from the one source, only one of them should be set up to actually collect the mail. If more than one account tries to collect mail at the same time, things get mighty confused).
Ports and IP addresses and DNS
An IP address (something that looks like “126.96.36.199”) is a bit like a postcode – it’s a pretty specific location but it’s not very informative. That’s why we still use streetnames and townnames on envelopes – they are like the “www.example.com” that you type into a web browser.
DNS (Domain Name System) is the process by which human-friendly addresses (“www.mit.edu”) get turned into machine-friendly ones (“188.8.131.52”). (Try it – put that number into the location bar of a browser and see what you get!)
A port is like the name of the person that’s written on the envelope. If you want to talk to the webserver at a particular address, you talk to port 80. If you want to send mail, port 25. And so on.
MX records are part of the DNS, and will specify what server will accept mail for a domain.
There is also a system called SPF (Sender Permission Framework) that acts like caller-ID for domains; this has had limited take-up so far, but the more people use it, the harder life will be for spammers. Essentially, the SPF record for a domain says which server(s) may legitimately send mail for that domain. Mailservers that implement SPF will check that the sending server matches the SPF record. A full discussion of SPF can be found at www.openspf.org, but here are a couple of examples. Let’s assume that the domain “example.com” has mailservers called mail1.example.com and mail2.example.com which may be used to both send and receive email. The MX records might say:
MX 10 mail1.example.com
MX 20 mail2.example.com
And the SPF record might say:
TXT v=spf1 mx ptr -all The “mx” term means that the machines matching the MX records for the domain are allowed to send mail. The “ptr” term means that if the IP of the sending machine resolves (via PTR record) to a machine with an “A” record for the domain, it will be allowed to send mail. The “-all” means that all other senders fail.
If “~all” is used instead, this is a “soft fail”, which means that SPF is essentially saying that it’s not a definite forgery, but is not guaranteed. What happens then depends on the receiving server’s policy. It’s mostly used in transition, while implementing SPF.
SPF has a complex syntax, with macros and includes and redirects; it can be as simple or as complex as you like.
Setting up Outlook, Outlook Express, Mac Mail
A few words on using Gmail via POP3
It’s very useful to have an online backup, and be able to access your email while out and about, from the laptop or whatever – plus Gmail has great spam filters! However, for various reasons, a lot of us find that we need to use our standalone email client, and collect email via POP3 whilst retaining that online/backup facility. This is how I did it.
The basic principle is:
- set up a gmail account.
- forward all mail to it (setting in my control panel)
- collect all mail from it (via POP)
Now the neat bit is that I only collect spam free mail (need to check the gmail account spam box from time to time for false positives.) Gmail has excellent spam filters built in – but if anything does get through, log in to the Gmail interface and ‘report as spam’ and it soon learns not to let any more from that address through.
And since Gmail can be set to archive all mail collected via POP I now have a permanent archive storage facility. I also get a pretty decent search on it…
The beauty of it is, you continue to use email@example.com to send and receive from your local mail program – I would recommend Thunderbird, but Outlook and the many others available will do. Gmail acts as an archive and spam filter (and webmail if you’re away from home/office) but no-one need be aware you are using it – seamless and transparent ;-)
Setting up Gmail to collect via POP3
First, we need to set up POP3 in Gmail. Log in and go to Settings>Forwarding and POP
- Disable forwarding
- Enable POP for all mail
- Keep copy in Gmail
There are instructions for configuring your email client on the page below that, but basically go into Tools>Account Settings and set your chosen account to:
You will also need to set Use secure connection (SSL) which by default is on Port 995 and tick the leave messages on server box.
Finally, you need to log in to your domain control panel and set firstname.lastname@example.org to point to the Gmail address.
Send yourself a test message – you will see it appear in the Gmail interface online, then collect mail from Thunderbird/Outlook, enter your Gmail password (tick remember this) and it should appear locally too!
I think that makes sense.
- Or email client. Program such as Outlook.
- In our DNS example, “mit.edu” is the domain.
- Domain Name System See above.
- a machine’s name. In our DNS example, “www” is the hostname.
- Internet Protocol.
- Internet Service Provider. E.g. Freeserve, BTinternet, NTL etc.
- Simple Mail Transport Protocol. Yes, it really is Simple. If it wasn’t so Simple, we wouldn’t all get so much spam.