scnr.net

It's not possible? Says who?

Archive for October, 2015

Simple local catch-all mail server

without comments

You don’t need “real” mail delivery on your machine?

But you want to receive e.g. status mails from cron?

You want to get all mails originating from localhost, regardless of the recipient, so you can detect services and programs gone rogue?

Try OpenSMTPD. There’s a package for Arch Linux, here’s the manual and here’s my config (/etc/smtpd/smtpd.conf):

# To accept external mail, replace with: listen on all
listen on localhost
 
# map any recipient to my user account
table catchall { "@"="johnlate" }
 
# "listen on localhost" should already take care of this
reject from ! local
 
# apply catchall mapping
accept for any virtual <catchall> deliver to mbox
 
# default rule, if I ever change the catch all mapping
reject for any

Written by johnLate

October 20th, 2015 at 1:08 am

Posted in Uncategorized