Transfer emails to new hosting? - email

A client is moving from their old hosting to mine. They have a few email accounts on the old hosting and I want to move all the emails on the old hosting to mine. How can I do this? If I download them with POP can I then upload them to the new hosting?

The answer depends on the mail server that you are using. Yes, you can download all the mail messages with POP3, but the upload to your mail server will depend on the type of mail server. I am not aware of any mail servers that provide a tool to import mail messages.
Most mail servers store the email message in a file, and you can certainly drop the files in the folder where they are stored, but that does not mean that it will be visible, you will have to deal with how the mail server index those files.
I suggest looking at the specifications for your mail server.

If you access both accounts with IMAP (most hosts support this now) instead of POP, you can literally drag and drop the messages between folders/inboxes for the two email accounts.
Also, depending on the type of hosting they're moving from/to, you may be able to use a feature of your new server's control panel to do the importing...unless you're doing it manually on a vanilla VPS or dedicated. There are still options, but you'd need to confirm here how your new server is setup and what the old server looks like.
If you're only talking about a couple of accounts with a few folders each, you may just want to consider IMAP as your path of least resistance. The transfer will primarily depend on your own Internet connection, as most hosting companies have connections faster than yours.
Lastly, if both servers share a similar format for the mailbox, you might want to just rsync the email over to the new server (assuming you have root access on both servers) to the proper email directory. Depending on the email box format, you may be able to simply run a server command to "convert" the mailbox to the format your server is expecting.

Related

Why 2 different servers (incoming and outgoing) in mail servers?

I have a basic question about mail servers. Usually any general server (not necessarily mail servers) handle all kinds of related requests i.e. both direction interaction with client (like sending and receiving msg to and from client) but in case of mail servers, there are 2 different servers -- one for outgoing messages called outgoing server following SMTP protocol and another for incoming messages called incoming server following POP3/IMAP protocol. Why so? . For that matter couldn't the 2 protocols be accommodated in one single protocol to handle both direction message flow. Also, typically are these 2 servers hosted on same machine in a general business?
Because the protocols are old. In the old Unix tradition, and ignoring UUCP for now:
SMTP came first, to transfer mail between sites, and mail was read locally on the server/network using a text mode client when logged in. There was no need to fetch mail, you used the 'mail' command, and it accessed your local mail spool (a file containing your mail, sitting on the file system, that the SMTP server appended to).
Later on, came the development that people wanted to read mail on their own hosts so a protocol was invented to serve that. The POP server would read that same spool file, and allow you to download all your messages to your intermittently connected client computer. SMTP was reused for sending mail because it already existed and was easily adapted for that purpose.
These days, there are usually three servers of note: SMTP submission server, SMTP transmission server, and IMAP. The submission server is where end users of the service submit their e-mail to be forwarded onto the final host, for example the Google server a Gmail user submits their email to (on port 465 or port 587, usually, with authentication). The transmission server is responsible for delivering and receiving email between sites (eg. when Yahoo and Gmail exchange mail for their customers with each other, on port 25). And IMAP is used by an end user to fetch their email.
These three services, on large sites, are generally served by separate servers on separate hosts. On very large services, like Gmail, they are separate pools of servers.
On a small business host, they were often just one machine.
There are newer and more integrated protocols. For example, both EAS and EWS have mail fetch and submission contained in the same protocol.
Personally, I regret that almost nobody uses UUCP anymore :)
The separation of shipping, management and collection of mail has a historical, philosophical and design basis.
This is in line with the spirit of the Unix world: "do one thing but do it right" and "make everything as simple as possible".
How complex the issue of e-mail is and how much technology it covers, read here:
https://en.wikipedia.org/wiki/Email
and then see the relevant RFCs in the footnotes for details.
It is difficult to implement a monolithic program that takes into account all the nuances of e-mail and at the same time
keeping it simple (Simple in SMTP). Such a monolith would be a nightmare to develop, maintain and administer,
and the post office has changed many times since the 1970s.
As for the second question, there is no reason to use the same physical machine, but there are also no contraindications other than the amount of resources available.

What happens to incoming email when an SMTP server is present but no IMAP/POP3 or backend store is present?

Lets say i install an smtp server but no backend store where emails can be stored. I do not install any imap/pop3 server either.
What would happen to received email?
EDIT : I am talking about emails for virtual users and not local operating system users
Unix/Linux system by default store incoming messages to local email domains in per OS account mailbox-files usually /var/mail/username. Some command line tools (e.g. mail) allow access to "system mailbox (file)"
I'm not 100% sure what the question means...
In a mail/interop context the answer to this is: This is a local matter. A mail (IMAP/SMTP) server has to store mail somewhere when it's received, and it has to read it somewhere when it's accessed (IMAP/POP/JSONthings), but how it's stored is deliberately not specifed. The standards cover how you talk to the servers via the internet. How they talk to their disk is not. Put differently, internet matters are standardised, local matters are left completely up to the software used.

Possible to use server for collecting and distributing mail

We currently have POP3 mail accounts where I am and try as I might to convince my manager that we should be using hosted IMAP or Exchange he won't budge because of the cost. The staff are mostly out of office so there is no domain server here, however, we do have a dedicated server and I wondered whether I could use this to collect the mail and distribute it from there in some way.
Effectively what I'm trying to do is ensure mail is stored somewhere other than the end users machine because backups are user dependant at the moment. With hosted Exchange or Exchange on this server would be simple but my manager won't shell out for it. I have seen free mail servers called MailEnable and Axigen but unsure if they will do the job. Sorry if this seems like an easy or stupid question but never needed to do this before.
I am assuming due to the reference to Exchange that you are on Windows.
If you have an old box lying around that works, you could install linux on it and then choose from a number of different imap servers. Dovecot and Courier are both good choices and I have worked with them before.
You could use fetchmail to then pick up the mailboxes and then deliver to the imap boxes or get them deliver directly.
Setting up such a linux server for email was one of the first things I ever did on Linux. While initially daunting, once you get the hang of it, it is pretty straightforward and there are plenty of resources out there to help.
Ubuntu is probably the easiest to get used to. CentOs is also a reasonable choice.
You shouldn't be running your own server if you aren't willing to administer your own server, and they are not easy to configure if you don't know what you are doing (e.g., you mess up and you are exploited for spamming).
Look into a service like mailgun. In my application we are using them for forwarding to REST endpoints as well as onto another SMTP server.
Competitors that wound up not meeting my needs but may meet yours include Dyn, email yak, Sendgrid, etc. etc.
Why not just setup the mail clients to store their mail files on a standard network drive or share? I follow that this situation is pretty silly in your view - 100% because of the ridiculous constraints that you are being asked to work within: I would similarly find the solution I am suggesting ridiculous generally; but under the circumstances, it seems like a simple answer to your problem - replacing distributed mail storage and backup with centralized storage and backup.
Don't POP3 email clients have the option keep a copy on the server? Mine certainly does. See second tick box on the pic.
You can then periodically take a back up of all the emails from the server to stop it getting clogged up.

Retrieve back old messages from POP3 server in Thunderbird

I am using Thunderbird as an email client for a POP3 server. Recently, I formatted my hard disk drive to change the OS from Windows XP to Windows 7. Consequently, I lost all my local emails. I also don't remember whether or not I had the server settings "Leave messages on server Until I delete them". Is it possible to retrieve back those old messages ?
Manoj,
You need to contact your email hosting provider to see what's possible on their end. Many don't keep permanent copies of emails. Once a customer downloads the email and deletes it, it is gone. Even if they make daily backups, it's possible that than an email arrived during the day and you downloaded it and deleted it before a backup ever happened.
If these messages are very important to you, you may have some hope of extracting them from your hard drive, depending on how the formatting worked. You can study options for forensics tools or contact a professional data recovery service.
As tripleee said in the comment, all the messages from server were automatically fetched when I set up a new Account. Luckily, it looks like I had the "server settings" to " "Leave messages on server Until I delete them". Thanks tripleee.

Send emails through VB6 if no email client

I have a VB6 app which is used by a large number of clients.
I need to allow the clients to be able to send emails to me. In the past I have done this using Microsoft MAPI controls. However, not all of them have an email client installed, since they use webmail instead.
Is there any other method anyone can recommend which would allow them to do this?
SMTP
You can use CDO for Windows to do this if we make a few assumptions:
Your users are all on Win2K or later.
The users will never be behind a firewall blocking SMTP or proxying all SMTP port use to a corporate server.
You have an SMTP server that you have an account you can let the user-mails be sent with.
You embed the server's address and account credentials in your program.
Sometimes using an SMTP server listening on an alternate port will address the second issue, but often such an alternate port is even more likely to be blocked.
SMTP is Dying
Abuse over time has made SMTP less and less viable for automated/assisted user contact. There are just too many variables involved in trying to open some sort of "clear channel" for SMTP communication as people work harder to fight spammers and such.
Today I would be much more likely to use either WebDAV or a Web Service for this. Both use HTTP/HTTPS which is more likely to get past firewalls and usually get by most proxy servers as well. WebDAV is often more "slippery" at this than Web Services, which more and more proxies are bocking. You can also use something more RESTful than SOAPy since the traffic "smells more like" user browsing to proxy servers.
WebDAV is a Clean Option
There are even free WebDAV providers offering 2GB of storage with a main and a guest user. The guest account can be given limited rights to various folders so some folders they might post your messages to, other folders they might get data from (read only folders), etc. For a paid account you can get more storage, additional users, etc.
This works well. You can even use the same hosting for program version files, new version code to be downloaded and installed, etc. All you need on your end is an aggregator program that scoops up user posted messages and deletes them using the main user/pw.
You still need to embed user credentials in your program, but it can be a simpler matter to change passwords over time. Just have the program fetch an info file with a new password and an effective date and have the program flip the "new" password to "current" once run on that date or after.
WebDAV support in Windows varies. From WinXP SP3 forward you can simply programmatically map a drive letter to a WebDAV share and then use regular file I/O statements against it, and unmap the letter when done. For more general use across even Win9x you can build a simple WebDAV client on top of XMLHTTPRequest or use a 3rd party library.
Web Services Have Higher Costs
Just to start with you have server-side code to write and maintain, and you have to use a specific kind of hosting. For example if you built it using PHP you need a PHP host, ASP an ASP host, ASP.Net an ASP.Net host, etc.
Web Services can also be more problematic in terms of versioning. If you later update your program to provide different information in these user contact posts you have to make another Web Service as well as changing both the application and the aggregator. Using WebDAV you can just make a "new format" folder on the server and have the new program post the data there in the new format. Your aggregator can simply pull from both folders and do any necessary reformatting into your new local database/message repository format.
This is merely an incremental additional effort though and a Web Service might be the way to go, even if it is just something written like an HTML Form GET/POST acceptor.
Although this question is for VBA you may find it of interest. Sending Emails using VBA without MAPI