diff --git a/howto/multiple-smarthosts b/howto/multiple-smarthostsnew file mode 100644index 0000000..5e1f718-- /dev/null++ b/howto/multiple-smarthosts@@ -0,0 +1,28 @@h1. How to send email using two smarthosts, easy and reliable wayRecently I needed to use two email addresses, both for sending and receiving mail. I could use "mutt":http://www.mutt.org for everything, but I prefer separating receiving mail, reading it and sending into three separate programs. So, I tried to configure "exim4":http://www.exim.org, which I have already been using for sending mail via one smarthost, for that, but it's bloated piece of crap, the only sane way of interacting with which is debian configuration, which does not support multiple smarthosts.So I tried several MTAs until I found "opensmtpd":https://www.opensmtpd.org/. It still uses some kind of homebrew config system but it's quite okay. So here's approximately how do you send mail via appropriate smarthost, based on sender address:bc.. # /etc/opensmtpd.conflisten on localhosttable aliases file:/etc/aliasestable sender1 { myfirstaddress@host1 }table sender2 { mysecondaddress@host2 }table secrets db:/etc/mail/secrets.db# local mta functionalityaccept for local alias <aliases> deliver to mboxaccept for any sender <sender1> relay via tls+auth://mail1@host:587 auth <secrets>accept for any sender <sender2> relay via tls+auth://mail2@host2:587 auth <secrets>p. To fill /etc/mail/secrets.db with your passwords, create /etc/mail/secrets with something like:bc. mail1 user1:password1mail2 user2:password2and run @mkmap /etc/mail/secrets@."myfirstaddress@host1" and "mysecondaddress@host2" are your emails, "tls+auth://mailX@hostX:587" are your SMTP connection details (see @man smtpd.conf@ for details), userX:passwordX are your SMTP credentials.