Even though installing and configuring a full-fledged mailing list software, such as Mailman, is not a very difficult task to do, for really simple use-cases one can get a away with by just adding an email alias and tweaking few settings of the MTA. This post shows how I did it with Exim4.
Create a directory where you want Exim4 to archive your mailing list:
mkdir /var/exim4lists chown Debian-exim:Debian-exim /var/exim4lists # uid and gid of your Exim4.
Define delivery addresses for your mailing:
cat >>/etc/aliases <<EOF mylist: /var/exim4lists/mylist, bob, alice EOF
This will deliver all mail sent to email@example.com to /var/exim4lists/mylist, firstname.lastname@example.org and email@example.com.
Write a simple filter file, which adds Reply-to: firstname.lastname@example.org -header:
cat >/etc/exim4/filter <<EOF # Exim filter if first_delivery and $header_to: is "email@example.com" then if $header_Reply-to: is not "" then # Save the original Reply-to -address. headers add "X-Original-Reply-to: $header_Reply-to:" endif headers remove "Reply-to" headers add "Reply-to: firstname.lastname@example.org\n" # Reply to the list by default. endif EOF
Now all replies to mails delivered via the mailing list will be sent back to the mailing list by default.
Tell Exim4 where the filter can be found and allow Exim4 to write to files by inserting the following lines into the main configuration settings in /etc/exim4/exim4.conf.template:
system_filter = /etc/exim4/filter SYSTEM_ALIASES_FILE_TRANSPORT = address_file
Update the configuration of your running Exim4-process(es):
invoke-rc.d exim4 restart