Skip to content

Simple mailing list on Debian in 3 simple steps

E-mailFew days ago I launched simple low-traffic mailing list using naive /etc/aliases method, but got the following error: <example1@onet.pl> (expanded from <example@myserver.com>): host mx.poczta.onet.pl[213.180.147.146] said: 554 5.7.1 <example1@onet.pl>:= Recipient address rejected: Spf check: fail (in reply to RCPT TO command) If you think for a moment the reason for error it's obvious. My server tried to forward e-mail using original From address.Onet.pl checked TXT record (using SPF standard) for my server domain myserver.com and noticed it's not allowed to send e-mails from me.

In order to make things work properly one have to rewrite envelope From field properly. Mailing list managers usually do that properly (/etc/aliases is not enough).

I wanted to make minimal and fast deployment of SMTP-only mail list manager. I selected smartlist because of it's simplicity. Firstly you have to install the software: # apt-get install smartlist Then you have to redirect two e-mail addresses: mylist@myserver.com and mylist-request@myserver.com to smartlist program (flist): # cat >>/etc/aliases <<EOF mylist: "|/var/list/.bin/flist mylist" mylist-request: "|/var/list/.bin/flist mylist-request" EOF newaliases After that anyone can subscribe to the list using mylist-request@myserver.com.

If you want to initially populate mailing list (the mailing list is closed for example) it's very easy: # su list $ cd cd /var/list/mylist $ cat >> dist <<EOF abc@example.com def@appale.com EOF