Access Local Email on Linux Guest From Windows Host

Discussions related to using VirtualBox on Windows hosts.
Post Reply
Ultra24
Posts: 4
Joined: 18. Jun 2017, 00:16

Access Local Email on Linux Guest From Windows Host

Post by Ultra24 »

Hi,

I'm using VB running a LAMP stack (setup via Vagrant) for local web development.

Host: Windows 8.1 x64
Guest: Ubuntu 16.04, with Exim4

One of the things in web dev is to troubleshoot emails (e.g. sending the user his registration email etc) and I'm trying to find a way to access the local PHP emails that are hitting the Linux guest, via the Windows host machine.

The emails on the Linux guest are all being sent to a local account (e.g. vagrant@localhost). I do NOT want to send them over SMTP and internet to a Gmail account, to then fetch them via internet on the host machine. I want this to stay a local affair, not depending on an internet connection. This is all for local testing only.

So preferably I would like to access the local email on the Linux guest machine via an email client (Outlook etc) from the Windows host machine.

How can I achieve that ?

I have Exim4 running on the guest, and I have a local mail server running on Windows (which handled all of this form me when I was doing local web dev in WAMP, without VB). I forwarded port 25 from guest to 25 host, hoping Exim4 on the guest would forward/share the incoming emails to the host mail server. Once the host mail server on Windows has them I can fetch them via Outlook (that was my workflow when working exclusively on Windows in WAMP, without VB).

Is it possible to forward/share emails on the guest to a host machine (without going through internet) ?

Thanks !!!
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Access Local Email on Linux Guest From Windows Host

Post by scottgus1 »

Virtualbox only provides "hardware". It doesn't provide or enable any means to manipulate that hardware that regular operating systems don't have. So to figure out how you would do something between a Virtualbox host and guest, you would figure out how you would accomplish the same task with two physical PCs side-by-side.

If you want to read emails off one PC from another PC, you will need a network between the two. See section 6 in the manual, for Virtualbox networking types. For a completely independent network between host and guest that can run even though your are mobile and not connected to any physical or Wi-Fi network, use Host-Only. If you also want internet in the guest in any situation where the host can get internet, put a second network adapter in the guest and set it to NAT.

Once you get the network(s) set up, and you find that you can ping* host and guest from each other, then you can do with the OS's whatever they or the programs installed on them allow. (* ping is sometimes turned off from the OS firewall.)
Ultra24
Posts: 4
Joined: 18. Jun 2017, 00:16

Re: Access Local Email on Linux Guest From Windows Host

Post by Ultra24 »

scottgus1,

while this is all good info (and I was aware of that already), do you have any direct suggestions how to achieve what I want to achieve ?

I'm aware that this is technically possible, I'm asking how one would approach what I'm asking in my OP ;-)
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Access Local Email on Linux Guest From Windows Host

Post by scottgus1 »

No. This is a Virtualbox forum, not a LAMP forum or a Vagrant forum. Google is your next step.

In fact, since you are working on a Virtualbox guest handled by Vagrant, you would need to go to the Vagrant forum for any help, since Vagrant runs their guests differently from how official Virtualbox does it and we don't know what they do, so we can't help with Vagrant guests. You'd have to uninstall Vagrant and demonstrate any issues you get by running the Virtualbox guests using official Virtualbox before we would know how to help.
Ultra24
Posts: 4
Joined: 18. Jun 2017, 00:16

Re: Access Local Email on Linux Guest From Windows Host

Post by Ultra24 »

there are no issues.

I'm asking for general suggestions how to share/forward incoming local emails on the guest VM to the host.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Access Local Email on Linux Guest From Windows Host

Post by socratis »

Ultra24 wrote:I'm asking for general suggestions how to share/forward incoming local emails on the guest VM to the host.
You should rephrase your question:
"how to share/forward incoming local emails from computer A to computer B."
There, I fixed it for you...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Ultra24
Posts: 4
Joined: 18. Jun 2017, 00:16

Re: Access Local Email on Linux Guest From Windows Host

Post by Ultra24 »

yeah, the reason why I wrote Linux guest to Windows host is, because there are always various ways how to approach a given challenge - but the OS is another obstacle for some of these approaches.

For example, if it was Linux to Linux, I could simply read the email file (from guest) in Thunderbird on the host machine. Done. I've not found a Windows email client that reads Linux mail archives.

Naturally, a preferred way would be to directly forward the emails as they arrive on the guest to the host via local traffic...

Any suggestions ?

Thanks !
Last edited by socratis on 19. Jun 2017, 19:40, edited 1 time in total.
Reason: Removed unnecessary verbatim quote of the whole previous message.
erdeslawe
Volunteer
Posts: 241
Joined: 8. Jul 2015, 10:23

Re: Access Local Email on Linux Guest From Windows Host

Post by erdeslawe »

I believe the guys were trying to point out, quite subtly, that as a VirtualBox User Forum hosted by Oracle, it is not considered appropriate for it to diversify into providing wider computer advice/support on user 'problems' not specifically related to the use of VirtualBox.

Sorry, but you probably need to ask your question elsewhere if the responses of far haven't provided sufficient hints. Perhaps start with the suggestion already made by Socratis, i.e. Google "how to share/forward incoming local emails from computer A to computer B.", or similar
Post Reply