Giter VIP home page Giter VIP logo

Comments (6)

jluttine avatar jluttine commented on June 13, 2024 3

Done: https://github.com/moggers87/salmon/wiki/Configuring-the-mail-server

from salmon.

moggers87 avatar moggers87 commented on June 13, 2024 2

Looks good! However, I'd recommend removing transport_maps and relay_recipient_maps and replacing them with relay_transport = lmtp:127.0.0.1:8823 to make your config more readable. It keeps everything in one file and you'll only have to update one line if you change or add additional domain names in future.

Would you like to add this to the wiki? It'll probably be quite useful for other users.

from salmon.

jluttine avatar jluttine commented on June 13, 2024 1

Pheeew! I think I finally got it working! (At least I think so.)

I use Postfix as a SMTP mail gateway on the same server as Salmon LMTP is running.

For Salmon, I use relay settings according to my ISP SMTP settings and receiver settings host="0.0.0.0" and port=8823.

For Postfix, I don't use any local mail boxes, just forward email to Salmon. Also, I don't use Postfix to send email to the internet, I use my ISP for that. Here are the relevant bits:

In /etc/postfix/main.cf:

# Disable local delivery
mydestination =
local_recipient_maps =
local_transport = error: local main delivery disabled
# Hostname from the MX record
myhostname = mail.example.com
# Relay all @example.com emails to Salmon
transport_maps = hash:/etc/postfix/transport
relay_domains = example.com
relay_recipient_maps = hash:/etc/postfix/relay_recipients
# Obviously, the file contains lots of other configurations too
# ....

/etc/postfix/transport:

example.com lmtp:localhost:8823

/etc/postfix/relay_recipients:

@example.com x

EDIT: Also, need to open port 25 from firewall (and configure port forwarding if behind router).

As I'm not familiar with email servers and this was the first time I'm configuring anything like this, it's possible that there's something (terribly) wrong. Feedback is most welcome.

from salmon.

jluttine avatar jluttine commented on June 13, 2024

Hmm.. Could I put Salmon SMTP receiver in front of the LMTP receiver, that is, have two separate Salmon processes running? That might be quite simple. I'd just need to figure out how the SMTP receiver should forward the emails to the LMTP receiver.

EDIT: Not sure though whether it would solve the bug about not handling multiple recipients..

from salmon.

moggers87 avatar moggers87 commented on June 13, 2024

The Lamson docs are no longer available, but I'm fairly certain that they strongly recommended deploying in the same fashion as Salmon.

Salmon's SMTP receiver does not implement anything like TLS or connection limiting, so keep that in mind. It will work, but don't open an issue later about your server crashing or someone has been reading your mail ;)

As for documenting how to setup Postfix, I don't want that in the documentation as Postfix is itself quite badly documented and it's too easy to misconfigure it and create an open-relay. I'll open up the wiki on this repo and see if I have time to start a page on Postfix config.

from salmon.

jluttine avatar jluttine commented on June 13, 2024

Ok, thanks! Those are the reasons I wouldn't want to set up Postfix.. :) Maybe some others are easier? Exim or dovecot? How have you set this up yourself?

Regarding documentation, for instance with Django, there is documentation on how to set up the parts that are relevant to Django in uwsgi and nginx/apache/... configuration. I think it would be nice to have some instructions like "put this and this configuration to this value and it should work with Salmon" or "these are the configurations values you need to set and you might want to disable this and this if you're just using this as a gateway in front of Salmon alone".

from salmon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.