-
Notifications
You must be signed in to change notification settings - Fork 0
Inter‐object email with llEmail()
To enable object emailing inter-sim, an IMAP server will need to be setup. SMTP is not required.
apt-get install courier-imap
By default it listens on ipv6, not ipv4. We can fix that:
sudo vim /etc/courier/imapd
Change ADDRESS=0 to ADDRESS=0.0.0.0
You should block port 143 and 993 on your firewall, only opening it to localhost and optionally to any other simservers you own.
To disable the SSL version of Courier:
sudo service courier-imap-ssl stop
sudo systemctl disable courier-imap-ssl
For Let's Encrypt support, see https://github.com/nicolas-dutertry/letsimap.
To disable the non-TLS version of courier:
sudo service courier-imap stop
sudo systemctl disable courier-imap
You'll probably want a dedicated (linux) user account just for lsl mail. This user will also need a Maildir folder:
sudo adduser lslmail
(follow instructions)
su lslmail
maildirmake.courier ~/Maildir
or
maildirmake ~/Maildir
exit
It is useful to have a mailclient to inspect any messages objects send, at least while setting up the mailsystem. Alpine doesn't work well with Maildir, but Mutt does:
sudo apt-get install mutt
Then, create the file /etc/Muttrc.d/maildir.rc with the following contents:
set mbox_type=Maildir
set spoolfile="~/Maildir/"
set folder="~/Maildir/"
set mask="!^\\.[^.]"
set record="+.Sent"
set postponed="+.Drafts"
mailboxes ! + `\
for file in ~/Maildir/.*; do \
box=$(basename "$file"); \
if [ ! "$box" = '.' -a ! "$box" = '..' -a ! "$box" = '.customflags' \
-a ! "$box" = '.subscriptions' ]; then \
echo -n "\"+$box\" "; \
fi; \
done`
macro index c "<change-folder>?<toggle-mailboxes>" "open a different folder"
macro pager c "<change-folder>?<toggle-mailboxes>" "open a different folder"
(taken from https://wiki.debian.org/Mutt)
Now you can run mutt to use the inbox
Assumes a non-TLS Courier on localhost, with no SMTP server (outbound email disabled):
[Startup]
emailmodule = DefaultEmailModule
[EMail]
enabled = true
enableEmailToExternalObjects = true
enableEmailToSMTP = false
IMAP_SERVER_TLS = false
IMAP_SERVER_HOSTNAME = 127.0.0.1
IMAP_SERVER_PORT = 143
IMAP_SERVER_LOGIN = lslmail
IMAP_SERVER_PASSWORD = yourpassword