Yahoo Mail Forwarder
Forward Yahoo Mail to another Account
By James Toebes http://james.toebesacademy.com
Fedora 20 LXDE/32Bit iso file.
Virtual Hosting Server (currently using VirtualBox, phpVirtualBox with a Centos6 host).
Yahoo Mail Account
Second (Destination) eMail Account with IMAP access.
Since it will be virtual, isolated, single purpose machine, Security is minimal.
Start by building a virtual machine
- New Machine
- Name: MailForwarder
Version: Fedora 32
- Use default of 768. If tight on memory for your Host server, use smaller.
- Create a virtual hard drive now
- Dynamically Allocated
- Default of 8 GB. If you have a very large mailbox, increase it.
- tart the Virtual machine, it should ask for Disk, browse to and select the ISO file for Fedora LXDE.
- Start the machine.
- When it boots to desktop, select install to hard drive.
- Select English, Continue (Unless you prefer another language, Klingonese?)
- Select Hard Drive, then done.
- Switch LVM to Standard Partition. It is a vm.....
- Continue. It will take the main menu a few seconds before you can continue.
- Begin installation.
- While installing, Go ahead and set the root password. Don't bother with account creation.
- When done shutdown.
- From VirtualBox Manager, after shutdown, select settings.
- Under Storage, select the DVD Drive, then click the disk icon, remove disk from drive.
- After Applying settings, start the Virtual Machine.
Start Machine, Add Needed Components
- Click Create a User Account.
Check: Make this user an Administrator
Uncheck: Require a password to use this account.
- After completing the user configuration, click Finish Installation
- Click the MailForwarder user then Enter for the password.
- You wont be logging in often, so disable history saving.
- Start a terminal (3rd icon on left at botton).
- sudo yum -y update
- sudo yum -y install thunderbird
- sudo cp /etc/lxdm/lxdm.conf /etc/lxdm/lxdm.conf.orig
- sudo vi /etc/lxdm/lxdm.conf, edit or add the line autologin=mailforwarder
- cp /usr/share/applications/mozilla-thunderbird.desktop ~/.config/autostart/thunderbird.desktop
- Edit the file ~/.config/autostart/thunderbird.desktop. Remove %u from end of exec line.
I.e. vi ~/.config/autostart/thunderbird.desktop
cursor down and over to the space in front of %u
press x 3 times to delete the space and %u
type :x to exit and save
Configure Mail Account and Forwarder
- Application menu => Internet => Thunderbird
- Add your Yahoo Account (Skip and use mu existing). Fill in your yahoo email address and password.
- Use IMAP and NOT SMTP for account type.
- When done adding, use Alt-F => New => Existing email account.
- Add your second (Destination) account. Use IMAP for account type.
- If you want the mail in another folder other than Inbox, create that folder under the Inbox folder in the second email account.
- Press Alt-T then Filters to pull up the filter list.
- Ensure Yahoo Mail account is selected then Click New.
- Name: MailForward
Match All Messages
Click Move to Folder. Select DestinationAccount => Inbox => Select this folder.
If you created a folder in step 6, select that folder for moving.
Click OK, then Run Now.
- The first run may take some time as it moves the email.
Configure Auto Maintenance
- Launch a terminal
- sudo crontab -e
- add (i to insert)
# * * * * * command to be executed
# - - - - -
# | | | | |
# | | | | +----- day of week (0 - 6) (Sunday=0)
# | | | +------- month (1 - 12)
# | | +--------- day of month (1 - 31)
# | +----------- hour (0 - 23)
# +------------- min (0 - 59)
#autoupdate on sunday. Reboot at 1 am.
0 0 * * 0 yum -y update
0 1 * * 0 reboot
- save and exit. esc to exit insert mode :x to save and exit
- Reboot to verify login and autostart works.
- Shut down when done.
Move to virtual server
- From VirtualBox Manager. Select File => Export Appliance.
- Highlight the VM then click Next
- Select OVF version 2. Note the file name and location (change if you want) then Next.
- Fill in any information you like then Export.
- When export is completed, copy file to the virtual server host.
- Log into PHP Virtual Box on the virtual server.
- Select File => Import Appliance
- Use the Folder Icon, Browses and select the file you uploaded. Select Next
- Review the import settings. Select Import.
- Wait a few minutes for the import to complete.
- Start The Virtual Machine
That's all. Your mail will now appear in your Destination account. You should not have to touch the VM again except for an occasional health check. Your a Good SysAdmin Right? Now Enjoy!