rodrigosantosbr

Lista de emails com Mailman

Apr 27th, 2021 (edited)
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
sudo apt install -y mailman

Siga as instruções na tela para definir o idioma.

Vamos criar a lista inicial chamada mailman

sudo newlist mailman

Os aliases são criados em /etc/aliases

sudo nano /etc/aliases
sudo newaliases

reinicie o postfix

sudo /etc/init.d/postfix restart

Habilitar a interface web

sudo cp /etc/mailman/apache.conf /etc/apache2/sites-available/mailman.conf

Check that the new Apache config is valid using apache2ctl configtest.

apache2ctl configtest

Assuming there are no errors, you can then tell Apache to pick up the new config

sudo a2ensite mailman.conf
sudo systemctl reload apache2

Para configurar o postfix

Next, edit the Mailman config file /etc/mailman/mm_cfg.py to tell it to use Postfix and SpamAssassin.

MTA='Postfix'
SPAMD_HOST    = 'localhost'
DISCARD_SCORE = 8
HOLD_SCORE    = 4
MEMBER_BONUS  = 0
POSTFIX_STYLE_VIRTUAL_DOMAINS = ['example.com']

To restart mailman

sudo service mailman restart

Configure Postfix

Edit /etc/postfix/main.cf and put in the lines below.

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
virtual_alias_domains = example.com example.net
virtual_alias_maps = hash:/etc/postfix/virtual, hash:/var/lib/mailman/data/virtual-mailman

check your logs: /var/log/mail.log for Postfix, and /var/log/mailman/error for Mailman

Add Comment
Please, Sign In to add comment