How to make postal addon collect mail the other way

You're referring to the Postal addon in Factorio, which allows you to automate the collection of mail. By default, the addon collects mail from the mailbox and delivers it to the player's character. However, you can modify the addon to collect mail in the opposite direction, i.e., from the player's character to the mailbox. Here's a step-by-step guide to achieve this:

Method 1: Using a custom script

  1. Open the Factorio console by pressing Ctrl + Shift + C.
  2. Type lua_addon and press Enter to enter the Lua console.
  3. Paste the following script:
    
    local postal = require("postal")

local function collect_mail_fromplayer() local player = game.player local mail = player.mail for , item in pairs(mail) do if item.name == "mail" then local mailbox = postal.get_mailbox() mailbox.insert(item) end end end

game.player.mail_changed.connect(collect_mail_from_player)


This script will collect mail from the player's character and insert it into the mailbox.

4. Press `Ctrl + Enter` to execute the script.

**Method 2: Using a custom entity**

1. Create a new entity (e.g., a robot or a car) and place it near the mailbox.
2. Open the entity's settings and add a `postal` module.
3. In the `postal` module, set the `collect_mail` option to `true`.
4. Set the `mail_source` option to `player` to collect mail from the player's character.
5. Save the entity's settings.

**Method 3: Using a custom train**

1. Create a new train and place it near the mailbox.
2. Open the train's settings and add a `postal` module.
3. In the `postal` module, set the `collect_mail` option to `true`.
4. Set the `mail_source` option to `player` to collect mail from the player's character.
5. Save the train's settings.

In all cases, the script or entity/train will collect mail from the player's character and insert it into the mailbox. Note that you may need to adjust the script or entity/train settings to fit your specific setup and requirements.