14 releases (stable)

Uses new Rust 2021

1.4.0-rc.5 Dec 2, 2022
1.4.0-rc.4 Dec 1, 2022
1.3.4 Oct 20, 2022
1.3.0 Sep 7, 2022
1.0.1 May 16, 2022

#13 in Email

Download history 4/week @ 2022-08-17 22/week @ 2022-08-24 22/week @ 2022-08-31 50/week @ 2022-09-07 11/week @ 2022-09-14 3/week @ 2022-09-21 20/week @ 2022-09-28 22/week @ 2022-10-05 1/week @ 2022-10-12 37/week @ 2022-10-19 4/week @ 2022-10-26 5/week @ 2022-11-02 1/week @ 2022-11-09 16/week @ 2022-11-16 12/week @ 2022-11-23 49/week @ 2022-11-30

78 downloads per month

GPL-3.0-only

625KB
11K SLoC


What is vSMTP ?

vSMTP is a next-gen Mail Transfer Agent (MTA), faster, safer and greener.

  • It is 100% built in Rust.
  • It is lighting fast.
  • It is modular and highly customizable.
  • It has a complete filtering system.
  • It is actively developed and maintained.

Faster, Safer, Greener

While optimizing IT resources becomes an increasing challenge, computer attacks remain a constant problem.

Every day, over 300 billion emails are sent and received in the world. Billions of attachments are processed, analyzed and delivered, contributing to the increase in greenhouse gas emissions.

To meet these challenges, viridIT is developing a new technology of email gateways, also called vSMTP.

Follow us on viridit.com

Filtering

vSMTP enable you to create complex set of rules to filter your emails using vSMTP's scripting language (vsl) based on Rhai. You can:

  • inspect / modify the content of incoming emails.
  • forward and deliver emails locally or remotely.
  • connect to databases.
  • run commands.
  • quarantine emails.

and much more.

// -- database.vsl
// here we declare our services.
// connect to a database with the csv format.
export const greylist = csv(#{
  connector: "/db/greylist.csv",
  access: "O_RDWR",
  refresh: "always",
  delimiter: ',',
});
// -- main.vsl
// here we declare our rules for filtering.

import "database" as db;

#{
  // hook on the 'mail from' stage. (when the server receives the `MAIL FROM:` command)
  mail: [
    rule "greylist" || {

      let sender = mail_from();

      // is the user in our greylist ?
      if db::greylist.get(sender) == [] {
        // it does not, we add the address to the database, then deny the email.
        db::greylist.set([ sender ]);
        // close the connection with a built in "451 - 4.7.1" error code.
        deny(code_greylist)
      } else {
        // it is, we accept the email.
        accept()
      }
    }
  ],
}

Check out the api folder to get a view of what you can do with vsl.

Benchmarks

Comparison between Postfix 3.6.4 & vSMTP 1.0.1 performances, performed on a Ubuntu 22.04 LTS running with an AMD Ryzen 5 5600X 6-Core Processor.

Check out the benchmarks readme to get reproducible examples.

Documentation

In this repository, the "develop" branch is the branch that we work on every day to provide new features. If you want to check examples for the latest vSMTP versions, switch to the "main" branch, where our latest releases are delivered.

For documentation please consult the vBook, the online reference and user guide for vSMTP. Documentation for the "develop" branch is also available in the vBook at https://vsmtp.rs/next

To stay tuned, ask questions and get in-depth answers feel free to join our Discord server. You can also open GitHub discussions.

Roadmap

vSMTP is currently under development and not yet ready for production use.

The next releases "1.3.x" focuses on SQL databases support & DMARC. You can find more information about the project agenda in Milestones.

Check out updates history in Changelogs.

A guideline about contributing to vSMTP can be found in the contributing section.

Commercial

For any question related to commercial, licensing, etc. you can contact us on our website.

License

The standard version of vSMTP is free and under an Open Source license.

It is provided as usual without any warranty. Please refer to the license for further information.

Dependencies

~33–70MB
~1.5M SLoC