On Sat, Jan 26, 2019 at 09:23:37PM +1000, Stuart Longland wrote: > Hi Gilles, > On 25/1/19 11:29 pm, Gilles Chehade wrote: > > On Fri, Jan 25, 2019 at 11:15:47PM +1000, Stuart Longland wrote: > >> First and foremost is the issue of backscatter-prevention. I would like > >> OpenSMTPD to validate the addresses passed to it before accepting them > >> for relay to my primary MX.??? > > > > How you do it depends on which version you are running. > > > > before 6.4: > > > > accept [...] recipient <table> [...] > > > > > > after 6.4: > > > > match [..] rcpt-to <table> [...] > > > > > > where table is a table containing a list of recipient addresses for that > > rule to match. > > That looks as if it'll do nicely. I'll do some research into how the > table is formatted??? but I'm guessing of the two formats supported, the > array form `table mylist { value1, value2, value3 }` would be the form > to use here? >
yes, if you use a static table: table foobar { a@b.c, b@c.d } if the table is a file, then one address per-line, see table(5). > >> Second is about how to define custom mail transports. Rather than using > >> SMTP/SSL like I am now, I'd like the emails destined for relay to my > >> server, to be encrypted using a RSA key, (well, AES, then RSA encrypt > >> the AES key) then either: > >> - scp'd to a special spool directory on my Linux server??? OR if it > >> happens to be down, > >> - placed in a special directory on the VPS for my server to later ciphon > >> down using `rsync --remove-source-files` over SSH. (Basically, a bit > >> like UUCP.) > >> > > > > no custom mail transports in smtpd. > > > > a way to achieve what you want is to write a custom mda, and this is > > actually how i did it to achieve a use-case similar to yours in the > > past. > > No problems, I'll have a closer look at how the MDA stuff works then. :-) > > Really it's an `rmail` work-alike that I'll probably wind up writing, > we'll see how it goes. > mda is basically a program that reads input from stdin and exits with the proper status to report to the mta that delivery was successful, whatever happens in between is up to you. -- Gilles Chehade @poolpOrg https://www.poolp.org tip me: https://paypal.me/poolpOrg