Download Latest Version mail2shell-1.9.0.tgz (72.8 kB)
Email in envelope

Get an email when there's a new version of Mail2sh

Home
Name Modified Size InfoDownloads / Week
mail2shell-1.9 2025-04-23
mail2sh-1.5 2025-03-11
mail2sh-1.4 2025-02-19
README.md 2025-04-23 3.3 kB
LICENCE.txt 2025-03-11 1.7 kB
Totals: 5 Items   5.0 kB 0

Changelog

[1.9.0] - 2025-04-10

Changed

  • Project renamed from Mail2sh to Mail2shell for better visibility. Few people associate "sh" with shell today!

Added

  • MIME email format support: flowed, attachments, text/plain, application/pgp-encrypted, application/octet-stream, multipart/mixed...
  • GnuPG encrypted email support Requirements:
  • Create private/public key pair for the Mail2shell service account
  • Share the public key with authorized Mail2shell users
  • Sign their public keys from the Mail2shell account
  • <!> With GnuPG, "site user password" authentication becomes optional
  • Authentication occurs via GnuPG by validating the user's email
  • However, users must still be listed in Mail2shell.conf with reply-to and site login password fields to:
    • Determine which shell user to execute commands as
    • Verify email addresses in responses sent by Mail2shell

<!> Signed emails are not yet supported, only encrypted emails.

  • IP[0-...] variables
  • IP0 contains the last IP found in email "Received" headers (typically the sender's IP)
  • Useful for firewall rules allowing source computer access
  • <!> 127.0.0.1 addresses are filtered and never appear in $IP.* variables. See ips_local option.

  • FILE[0-...] variables

  • Represents attached files, accessible as $FILE1, $FILE2, etc. during command execution
  • Files can be attached to emails and processed during execution

<!> $FILE0 ALWAYS contains the message with identification/commands, while others handle attachments

  • Command-line configuration: ./mail2shell file=email.eml nosent level=128...
  • Apache-style config file support
  • Execution report with STDOUT/STDERR redirected as attachments (return_stdout=1)
  • Mail quota: email size limitation (quota_mail=SIZE)
  • Configurable unknown user response
  • Default (response_unknown=0) silently ignores unauthorized attempts

[1.5] - 2025-03-15

  • Fixed warnings and errors related to Perl updates. mail2sh was quickly developed with rough Perl code ;)

[1.4] - 2004-07-22

  • Replaced binary mail2sh file with source code.

[1.3] - 2003-08-29

  • Added reply-to-sender functionality when no reply-to field is specified in the config file. If reply-to is configured for the site, all responses will be sent to the email address provided as argument instead of the sender. This prevents unauthorized use of mail2sh...

[1.2] - 2002-08-21

  • Added bless directive in mail2sh.conf. Overrides single_user restriction for users/sites containing bless in their config section. When single_user on is enabled but a user has bless, mail2sh will execute commands using the site's login instead of the user_default account... bless creates an exception to single_user on for privileged users...

[1.1] - Undated

  • Added single-user mode support without requiring installation changes. Two new directives force mail2sh to use a specific account (e.g. guest) for shell command execution: single_user on user_default login_name
  • See /usr/share/doc/example/etc/mail2sh.conf.single_user for configuration example.

[1.0] - Undated

  • Initial release
Source: README.md, updated 2025-04-23