Mailman-users search results for query "user unknown in local recipient table"
mailman-users@mailman3.org- 29 messages

MM3 Postfix FROM header issue
by Stephen J. Turnbull
eboltz(a)lhtservices.com writes:
> When I check the /var/log/mail.log without the
> sender_canonical_maps setting enabled,
The meaning of "canonical" here is that this is the original and
universally acceptable accept-no-substitutes-or-aliases version of the
sender's address. If you don't want to see it *literally everywhere*
in the header of a message coming out of Postfix, you shouldn't put it
in a canonical_map.
> then the initial email sender is either rejected because 'Recipient
> address rejected: User unknown in virtual alias table'
Postfix is configured to relay only local senders to anywhere, or
remote senders to local recipients and to relay_domains. This means
that the list address doesn't look like a local address (I think it's
a bad idea to set myhostname=localhost!) and it isn't in relay_domains
(not sure why that might be if the postfix_domains file is present as
a compiled .db), so the last try is virtual address (Postfix's way of
delivering a possibly remote recipient address to a local recipient).
You should use postconf to check that all of the my* variables are
set sanely.
> or '550-From header sender domain not verified (example.com)
> 550-On your sending Verified senders page
> 550 verify the sender domain or email to be allowed to send'
Not sure where the "example.com" is coming from. If that is being set
by the remote smtpd (smtp2go?), and isn't a hard-coded string,
something's wrong either with your Postfix configuration or your test
email -- that should be the envelope sender domain, which should be
your host. The example.com domain actually exists, and I'm sure it
doesn't allow you to send email!
As others mention, you probably need to have a valid SPF record in
your DNS for your host as well.
> Here is my main.cf setup
Check that both the .txt (produced by Mailman) and .db (produced by
/usr/sbin/postmap) files exist for the postfix_lmtp and
postfix_domains maps. The function that produces the .txt source is
supposed to call postmap to generate the compiled .db database, you
shouldn't need to do it by hand. But that's the only Mailman-specific
reason for the "not in virtual address table" message. Postfix itself
only looks at the .db file, it will not compile or even read the .txt.
> transport_maps = hash:/var/lib/mailman3/data/postfix_lmtp
> local_recipient_maps = hash:/var/lib/mailman3/data/postfix_lmtp
> relay_domains = hash:/var/lib/mailman3/data/postfix_domains
Make sure there are no Mailman mailing lists in the aliases file.
> alias_maps = hash:/etc/aliases
> alias_database = hash:/etc/aliases
As mentioned, this is not a good idea:
> myhostname = localhost
Steve
1 year, 5 months

Re: mail for lists.ccalternatives.org loops back to myself, then Recipient address rejected
by Stephen J. Turnbull
Christian Stalberg via Mailman-users writes:
> Main.cf had
>
> transport_maps =
> hash:/opt/mailman/mm/var/data/postfix_lmtp
> local_recipient_maps =
> hash:/opt/mailman/mm/var/data/postfix_lmtp
> relay_domains =
> hash:/opt/mailman/mm/var/data/postfix_domains
This configuration produced the error message:
/etc/postfix/main.cf and restarted Postfix -Now a new error message:
<Deepadaptation(a)lists.ccalternatives.org>: host
lists.ccalternatives.org[192.46.218.224] said: 550 5.1.1
<Deepadaptation(a)lists.ccalternatives.org>: Recipient address
rejected:
User unknown in local recipient table (in reply to RCPT TO command)
Is that correct?
> I then changed local_recipient_maps to
>
> transport_maps =
> hash:/opt/mailman/mm/var/data/postfix_lmtp
> local_recipient_maps = proxy:unix:passwd.byname $alias_maps
> hash:/opt/mailman/mm/var/data/postfix_lmtp
> relay_domains =
> hash:/opt/mailman/mm/var/data/postfix_domains
And this produces the same error, is that correct?
I don't think this can affect the Mailman lists, because there should
be no configuration related to them in proxy:unix:passwd.byname or
$alias_maps. If you don't need them for non-Mailman processing, don't
add them.
> I then restarted postfix & mailman. When sending a message to the list I am
> still getting the same error I had before
The problem seems to be that the "Deepadaptation" list addresses are
not in the postfix_lmtp file.
Try
1. run the "mailman aliases" command, then
2. run the "postmap" command.
These are usually run automatically, but it is the first thing to try
if you have having this kind of trouble.
The second thing, maybe you have to get the spelling (including
upper/lower case) exactly right on the list name. Is the
Deepadaptation list's mailbox spelled exactly "Deepadaptation" with
exactly those upper- and lowercase letters in your Mailman list
configuration? (Case differences are very unlikely to be the problem,
however.)
2 years, 11 months

Confirmation email bounces because of listname+something@example.com
by thor.rustad@gmail.com
I'm sure this is a small configuration error, but I have followed the instructions for mailman3 and postfix. Basically mailman works fine, but confirmation emails, when answered by the subscriber or would-be subscriber, fails because 'listname' (after the '+something' is stripped off) is not a local user.
Also see my post to the postfix group:
http://postfix.1071664.n5.nabble.com/address-extension-fails-for-mailman-td….
Mind you, the postfix local_recipient_maps=regexp:/path/postfix_lmtp will correctly match any of the lists, but once the
<+something> is added to the listname, it fails.
Note that I have configured a subdomain, klubb.domain.com, for my mailing lists.
First, my postfix.cf:
recipient_delimiter = +
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
append_dot_mydomain = no
readme_directory = no
smtpd_tls_cert_file=/etc/letsencrypt/live/mailer.example.com/cert.pem
smtpd_tls_key_file=/etc/letsencrypt/live/mailer.example.com/privkey.pem
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_helo_restrictions = permit_mynetworks, permit_sasl_authenticated
smtpd_sender_restrictions = permit_mynetworks, reject_non_fqdn_sender, reject_unknown_sender_domain
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated,
smtpd_tls_security_level = may
smtp_tls_security_level = may
smtp_tls_loglevel = 2
smtpd_tls_loglevel = 2
smtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated, defer_unauth_destination
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 172.19.199.0/24 <public.ip>/32
myhostname = mailer.example.com
mydomain = example.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = mailer.example.com
mydestination = klubb.$mydomain, localhost.$mydomain, localhost, $myhostname, $mydomain
relayhost =
mailbox_size_limit = 0
inet_interfaces = all
inet_protocols = all
compatibility_level = 2
transport_maps = regexp:/opt/mailman/core/var/data/postfix_lmtp
local_recipient_maps = regexp:/opt/mailman/core/var/data/postfix_lmtp
relay_domains = regexp:/opt/mailman/core/var/data/postfix_domains
unknown_local_recipient_reject_code = 550
owner_request_special = no
propagate_unmatched_extensions = canonical, virtual, alias, forward, include
Here is the line in postfix mail.log where the valid listname+token is rejected:
NOQUEUE: reject: RCPT from mail-lf0-f43.google.com[209.85.215.43]: 550 5.1.1 <abcliste-confirm+79ecdc9fe57e086b8e1335299ef5255d156b72db(a)klubb.example.com>: Recipient address rejected: User unknown in local recipient table; from=<me(a)mydomain.com> to=<abcliste-confirm+79ecdc9fe57e086b8e1335299ef5255d156b72db(a)klubb.example.com> proto=ESMTP helo=<mail-lf0-f43.google.com>
Any help will be appreciated.
7 years, 8 months

Confirmation email bounces because of listname+something@example.com
by Thor Atle Rustad
I'm sure this is a small configuration error, but I have followed the
instructions for mailman3 and postfix. Basically mailman works fine, but
confirmation emails, when answered by the subscriber or would-be
subscriber, fails because 'listname' (after the '+something' is stripped
off) is not a local user.
Also see my post to the postfix group:
http://postfix.1071664.n5.nabble.com/address-extension-fails-for-mailman-td…
.
Mind you, the postfix local_recipient_maps=regexp:/path/postfix_lmtp will
correctly match any of the lists, but once the
<+something> is added to the listname, it fails.
Note that I have configured a subdomain, klubb.domain.com, for my mailing
lists.
First, my postfix.cf:
recipient_delimiter = +
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
append_dot_mydomain = no
readme_directory = no
smtpd_tls_cert_file=/etc/letsencrypt/live/mailer.example.com/cert.pem
smtpd_tls_key_file=/etc/letsencrypt/live/mailer.example.com/privkey.pem
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_helo_restrictions = permit_mynetworks, permit_sasl_authenticated
smtpd_sender_restrictions = permit_mynetworks, reject_non_fqdn_sender,
reject_unknown_sender_domain
smtpd_recipient_restrictions = permit_mynetworks,
permit_sasl_authenticated,
smtpd_tls_security_level = may
smtp_tls_security_level = may
smtp_tls_loglevel = 2
smtpd_tls_loglevel = 2
smtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated,
defer_unauth_destination
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 172.19.199.0/24
<public.ip>/32
myhostname = mailer.example.com
mydomain = example.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = mailer.example.com
mydestination = klubb.$mydomain, localhost.$mydomain, localhost,
$myhostname, $mydomain
relayhost =
mailbox_size_limit = 0
inet_interfaces = all
inet_protocols = all
compatibility_level = 2
transport_maps = regexp:/opt/mailman/core/var/data/postfix_lmtp
local_recipient_maps = regexp:/opt/mailman/core/var/data/postfix_lmtp
relay_domains = regexp:/opt/mailman/core/var/data/postfix_domains
unknown_local_recipient_reject_code = 550
owner_request_special = no
propagate_unmatched_extensions = canonical, virtual, alias, forward, include
Here is the line in postfix mail.log where the valid listname+token is
rejected:
NOQUEUE: reject: RCPT from mail-lf0-f43.google.com[209.85.215.43]: 550
5.1.1 <
abcliste-confirm+79ecdc9fe57e086b8e1335299ef5255d156b72db(a)klubb.example.com>:
Recipient address rejected: User unknown in local recipient table; from=<
me(a)mydomain.com> to=<
abcliste-confirm+79ecdc9fe57e086b8e1335299ef5255d156b72db(a)klubb.example.com>
proto=ESMTP helo=<mail-lf0-f43.google.com>
Any help will be appreciated.
Thor
7 years, 8 months

Re: Newbie question 2: Rewriting issue for bounced emails
by William Oliver
On Sat, 2021-12-25 at 13:34 -0800, Mark Sapiro wrote:
> On 12/25/21 12:42 PM, William Oliver wrote:
> >
> > Is there a "make-the-freaking-virtual- map-database" command in
> > mailman3, or is this postfix thing? Should I just touch the thing
> > and
> > create an empty file? I'm a little scared to... The error message
> > makes me think that it should be populated with something...
>
>
> Did you add an Alias Domain (different from the Mail Host domain) to
> the
> entry for your domain? This is what triggers the creation of
> postfix_vmap.
>
Well, I hope youi had/have/will have a great holiday. I just finished
our dinner and I am now amusing myself by pretending to enjoy the
Hallmark movies my wife is watching and debugging my mailman3
installation when she's not looking. It was either "The twelve cats of
Christmas" or "Die Hard." I put my foot down and said we were watching
Die Hard. So of course we are watching a movie about 12 kittens in a
fire truck.
In any case, I added a line for "virtual_alias_domains" in my main.cf
for postfix. But it doesn't do anything, apparently, except generate
another error line (see the syslog output below). So, just for a lark,
I created an empty /opt/mailman/mm/var/data/postfix_vmap file and ran
postmap on it to create a postfix_vmap.db file.
Now, it no longer complains about there not being a postfix_vmap.db
file. Instead it complains about it being empty. Here's what my
mailmanweb.log has to say:
smtplib.SMTPRecipientsRefused: {'redacted(a)libertyfp.org': (550, b'5.1.1
<redacted(a)libertyfp.org>: Recipient address rejected: User unknown in
virtual alias table')}
I redacted the name because this is supposed to be the admin account --
and it fails on login.
So, here's syslog:
Dec 25 19:08:49 libertyfp postfix/smtpd[44664]: connect from
localhost[::1]
Dec 25 19:08:49 libertyfp postfix/trivial-rewrite[44670]: warning: do
not list domain libertyfp.org in BOTH virtual_alias_domains and
virtual_mailbox_domains
Dec 25 19:08:49 libertyfp postfix/trivial-rewrite[44670]: warning: do
not list domain libertyfp.org in BOTH virtual_alias_domains and
virtual_mailbox_domains
Dec 25 19:08:49 libertyfp postfix/smtpd[44664]: NOQUEUE: reject: RCPT
from localhost[::1]: 550 5.1.1 <redacted(a)libertyfp.org>: Recipient
address rejected: User unknown in virtual alias table;
from=<redacted2(a)libertyfp.org> to=<redacted(a)libertyfp.org> proto=ESMTP
helo=<mail.libertyfp.org>
Dec 25 19:08:49 libertyfp postfix/smtpd[44672]: connect from
localhost[::1]
Dec 25 19:08:49 libertyfp postfix/trivial-rewrite[44670]: warning: do
not list domain libertyfp.org in BOTH virtual_alias_domains and
virtual_mailbox_domains
Dec 25 19:08:49 libertyfp postfix/smtpd[44672]: NOQUEUE: reject: RCPT
from localhost[::1]: 550 5.1.1 <redacted(a)libertyfp.org>: Recipient
address rejected: User unknown in virtual alias table;
from=<root(a)localhost.local> to=<redacted(a)libertyfp.org> proto=ESMTP
helo=<mail.libertyfp.org>
Dec 25 19:08:49 libertyfp postfix/smtpd[44672]: disconnect from
localhost[::1] ehlo=1 auth=1 mail=1 rcpt=0/1 rset=1 quit=1 commands=5/6
where "redacted2" is the name in settings.py for
EMAIL_HOST_USER and DEFAULT_FROM_EMAIL
and "redacted" is the address for "Mailman Suite Admin"
I don't know where "root(a)localhost.local" comes from.
OK, it didn't work when I just had virtual_mailbox_domains defined, and
it didn't work when I had both defined, so I commented out
virtual_mailbox_domains and just left virtual_alias_domains.
That didn't help, either, though it got rid of the warnings in syslog:
Dec 25 19:43:33 libertyfp postfix/smtpd[55192]: connect from
localhost[::1]
Dec 25 19:43:33 libertyfp postfix/smtpd[55192]: NOQUEUE: reject: RCPT
from localhost[::1]: 550 5.1.1 <redacted(a)libertyfp.org>: Recipient
address rejected: User unknown in virtual alias table;
from=<redacted2(a)libertyfp.org> to=<redacted(a)libertyfp.org> proto=ESMTP
helo=<mail.libertyfp.org>
Dec 25 19:43:34 libertyfp postfix/smtpd[55199]: connect from
localhost[::1]
Dec 25 19:43:34 libertyfp postfix/smtpd[55199]: NOQUEUE: reject: RCPT
from localhost[::1]: 550 5.1.1 <redacted(a)libertyfp.org>: Recipient
address rejected: User unknown in virtual alias table;
from=<root(a)localhost.local> to=<reacted(a)libertyfp.org> proto=ESMTP
helo=<mail.libertyfp.org>
Dec 25 19:43:34 libertyfp postfix/smtpd[55199]: disconnect from
localhost[::1] ehlo=1 auth=1 mail=1 rcpt=0/1 rset=1 quit=1 commands=5/6
Here's my postfix configuration:
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
always_add_missing_headers = yes
command_directory = /usr/sbin
compatibility_level = 2
daemon_directory = /usr/lib/postfix/sbin
data_directory = /var/lib/postfix
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd
$daemon_directory/$process_name $process_id & sleep 5
default_destination_concurrency_limit = 15
default_destination_recipient_limit = 30
header_checks = regexp:/etc/postfix/header_checks
home_mailbox = Maildir/
inet_interfaces = all
inet_protocols = all
local_recipient_maps = proxy:unix:passwd.byname $alias_maps
hash:/opt/mailman/mm/var/data/postfix_lmtp
mail_owner = postfix
mailq_path = /usr/bin/mailq
mydomain = libertyfp.org
myhostname = mail.libertyfp.org
mynetworks = 127.0.0.0/8 10.0.0.0/24
mynetworks_style = host
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases
owner_request_special = no
relay_domains = hash:/opt/mailman/mm/var/data/postfix_domains
sendmail_path = /usr/sbin/postfix
smtp_tls_mandatory_protocols = !SSLv2, !SSLv3
smtpd_banner = $myhostname ESMTP
smtpd_recipient_restrictions = permit_mynetworks,
permit_auth_destination, permit_sasl_authenticated, reject
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_tls_cert_file = /etc/letsencrypt/live/libertyfp.org/fullchain.pem
smtpd_tls_key_file = /etc/letsencrypt/live/libertyfp.org/privkey.pem
smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
transport_maps = hash:/opt/mailman/mm/var/data/postfix_lmtp
unknown_local_recipient_reject_code = 550
virtual_alias_domains = libertyfp.org
virtual_alias_maps = hash:/opt/mailman/mm/var/data/postfix_vmap
virtual_gid_maps = static:20000
virtual_mailbox_base = /home/vmail
virtual_mailbox_maps = hash:/etc/postfix/virtual-mailbox
virtual_uid_maps = static:20000
Here's my settings.py:
# Mailman Web configuration file.
# /etc/mailman3/settings.py
from mailman_web.settings.base import *
from mailman_web.settings.mailman import *
#: Default list of admins who receive the emails from error logging.
ADMINS = (
('Mailman Suite Admin', 'redacted2(a)libertyfp.org'),
)
# Postgresql database setup.
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'mailman',
'USER': 'mailman',
# TODO: Replace this with the password.
'PASSWORD': 'passwd',
'HOST': 'localhost',
'PORT': '5432',
}
}
# 'collectstatic' command will copy all the static files here.
# Alias this location from your webserver to `/static`
STATIC_ROOT = '/opt/mailman/web/static'
# Make sure that this directory is created or Django will fail on
start.
LOGGING['handlers']['file']['filename'] =
'/opt/mailman/web/logs/mailmanweb.log'
#: See
https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts
ALLOWED_HOSTS = [
"localhost", # Archiving API from Mailman, keep it.
"www.libertyfp.org",
"libertyfp.org",
"mail.libertyfp.org",
"list.libertyfp.org",
"127.0.0.1",
"2.56.57.28"
# "lists.your-domain.org",
# Add here all production domains you have.
]
#: Current Django Site being served. This is used to customize the web
host
#: being used to serve the current website. For more details about
Django
#: site, see: https://docs.djangoproject.com/en/dev/ref/contrib/sites/
SITE_ID = 1
# Set this to a new secret value.
SECRET_KEY = 'passwd'
# Set this to match the api_key setting in
# /opt/mailman/mm/mailman-hyperkitty.cfg (quoted here, not there).
MAILMAN_ARCHIVER_KEY = 'passwd'
HAYSTACK_CONNECTIONS = {
'default': {
'ENGINE': 'haystack.backends.whoosh_backend.WhooshEngine',
'PATH': os.path.join(BASE_DIR, "fulltext_index"),
},
}
# To be added to Django's settings.py
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'localhost'
EMAIL_PORT = 25
EMAIL_HOST_USER = 'redacted(a)libertyfp.org'
EMAIL_HOST_PASSWORD = 'passwd'
DEFAULT_FROM_EMAIL = 'redacted2(a)libertyfp.org'
SITE_ID = 2
Here's my mailman.cfg:
/etc/mailman3/mailman.cfg
[paths.here]
var_dir: /opt/mailman/mm/var
[mailman]
layout: here
# This address is the "site owner" address. Certain messages which must
be
# delivered to a human, but which can't be delivered to a list owner
(e.g. a
# bounce from a list owner), will be sent to this address. It should
point to
# a human.
site_owner: redacted(a)libertyfp.org
[database]
class: mailman.database.postgresql.PostgreSQLDatabase
url: postgres://redacted2:passwd@localhost/mailman
[archiver.prototype]
enable: yes
# For the HyperKitty archiver.
[archiver.hyperkitty]
class: mailman_hyperkitty.Archiver
enable: yes
configuration: /opt/mailman/mm/mailman-hyperkitty.cfg
# And, create the /opt/mailman/mm/mailman-hyperkitty.cfg file
containing
# these settings uncommented
#[general]
#base_url: http://127.0.0.1:8000/archives/
#api_key: Secret_Hyperkitty_API_Key
[shell]
history_file: $var_dir/history.py
[shell]
history_file: $var_dir/history.py
[mta]
verp_confirmations: yes
verp_personalized_deliveries: yes
verp_delivery_interval: 1
incoming: mailman.mta.postfix.LMTP
outgoing: mailman.mta.deliver.deliver
lmtp_host: mail.libertyfp.org
lmtp_port: 8024
smtp_host: mail.libertyfp.org
smtp_port: 25
configuration: python:mailman.config.postfix
recipient_delimiter = +
unknown_local_recipient_reject_code = 550
owner_request_special = no
Here's uwsgi.ini
# /etc/mailman3/uwsgi.ini
#
[uwsgi]
# Port on which uwsgi will be listening.
#http-socket = 127.0.0.1:8000
http-socket = 0.0.0.0:8000
# If running uwsgi from the virtual environment ...
virtualenv = /opt/mailman/venv/
module=mailman_web.wsgi:application
# Add to python import path.
pythonpath = /etc/mailman3/
# The default settings module.
env = DJANGO_SETTINGS_MODULE=settings
# Setup default number of processes and threads per process.
master = true
processes = 2
threads = 2
# Setup the django_q related worker processes.
attach-daemon = /opt/mailman/venv/bin/mailman-web qcluster
# Setup the request log.
req-logger = file:/opt/mailman/web/logs/uwsgi.log
# Log qcluster commands separately.
logger = qcluster file:/opt/mailman/web/logs/uwsgi-qcluster.log
log-route = qcluster uwsgi-daemons
# Last log and it logs the rest of the stuff.
logger = file:/opt/mailman/web/logs/uwsgi-error.log
And, last but not least here's mailman-hyperkitty.cfg:
[general]
base_url: http://127.0.0.1:8000/archives/
api_key: passwd
3 years, 5 months

OK, so I backed out completely and re-installed. Here's my *original* error. Should I modify virtual mailbox maps?
by Bill Oliver
OK, I think I was clearly in the phase of dealing with errors caused by
my attempts to deal with previous errors. So I backed out and did a
clean install. Again, the installl seemed to go without a problem.
Then:
1) I set up a mailinglist (tradfp(a)forensicpath.us) for "old school"
forensic pathologists to discuss cases.
2) I added a couple of users: oliver(a)billoblog.com on the same box as
the mailinglist, though on different virtual domains, and
william.oliver(a)knoxcounty.org, a local government domain not associated
with my box.
Results:
The welcome message did not get delivered to either address.
When I send email from those addresses to tradfp(a)forensicpath.us, I get
the following error from both:
Your message couldn't be delivered
The message you sent to tradfp(a)forensicpath.us couldn't be delivered
due to: Recipient email address is possibly incorrect.
Further information
5.1.1 <tradfp(a)forensicpath.us>: Recipient address rejected: User
unknown in virtual mailbox table
If you sent this message to multiple addresses, you'll receive a
notification like this for every one that didn't arrive.
That is when I started going down the dovecot rabbit hole.
Here's the (what I think is relevant) part of the mail.cf file:
virtual_mailbox_domains =
proxy:mysql:/etc/postfix/sql/mysql_virtual_domains_maps.cf
virtual_mailbox_maps =
proxy:mysql:/etc/postfix/sql/mysql_virtual_mailbox_maps.cf,
proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_domain_mailbox_maps.cf
virtual_alias_maps =
proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_maps.cf,
proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_domain_maps.cf,
proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_domain_catchall_maps.c
f
virtual_mailbox_base = /var/vmail
virtual_minimum_uid = 900
virtual_uid_maps = static:900
virtual_gid_maps = static:900
transport_maps =
hash:/opt/mailman/mm/var/data/postfix_lmtp
local_recipient_maps =
hash:/opt/mailman/mm/var/data/postfix_lmtp
relay_domains =
hash:/opt/mailman/mm/var/data/postfix_domains
In my previous attempt, I added
hash:/opt/mailman/mm/var/data/postfix_lmtp
to both virtual_mailbox_maps and virtual_alias_maps, but I haven't
done that yet here. I thought I'd ask and make sure I should.
Should that be my next step?
Thanks,
billo
7 months, 3 weeks

Re: integrating mm3 with postfix / lmtp
by Fabian A. Santiago
On October 25, 2017 9:17:33 PM EDT, "Fabian A. Santiago" <fsantiago(a)garbage-juice.com> wrote:
>On October 25, 2017 9:13:20 PM EDT, Mark Sapiro <mark(a)msapiro.net>
>wrote:
>>On 10/25/2017 05:41 PM, Fabian A. Santiago wrote:
>>>
>>> No to the domains part and I think virtual alias maps is needed:
>>>
>>> mail postfix/trivial-rewrite[19445]: warning: do not list domain xxx
>>in BOTH virtual_mailbox_domains and relay_domains
>>> Oct 25 20:39:19 mail postfix/trivial-rewrite[19445]: warning: do not
>>list domain xxx in BOTH virtual_mailbox_domains and relay_domains
>>> Oct 25 20:39:19 mail postfix/submission/smtpd[19441]: NOQUEUE:
>>reject: RCPT from
>>pool-108-53-239-102.nwrknj.fios.verizon.net[108.53.239.102]: 550 5.1.1
>><test123@xxx>: Recipient address rejected: User unknown in virtual
>>mailbox table; from=<fsantiago@xxx> to=<test123@xxx> proto=ESMTP
>>helo=<[10.0.0.29]>
>>
>>(above slightly sanitized for return to the list)
>>
>>The issue here is your list domain cannot be a virtual_mailbox_domain
>>or
>>a virtual_alias_domain.
>>
>>I have the same issue on mail.python.org where we have both Mailman 2
>>and Mailman 3 lists @python.org. and python.org is a
>>virtual_alias_domain.
>>
>>I have a group of MRs for a branch that implements "alias_domains" to
>>deal with this.
>>
>>Basically it works by creating another (virtual_alias_maps)
>>postfix_vmap
>>mapping to map list addresses @python.org to addresses @x.python.org.
>>Then the postfix_domains and postfix_lmtp maps have the x.python.org
>>domain and there is a patch to mailman/runners/lmtp.py to map the
>>x.python.org domain back to python.org.
>>
>>The various MRs are
>><https://gitlab.com/mailman/mailman/merge_requests/202> for the core,
>><https://gitlab.com/mailman/mailmanclient/merge_requests/18> for the
>>REST bindings used by Postorius and
>><https://gitlab.com/mailman/postorius/merge_requests/186> to be able
>to
>>set an alias_domain via Postorius.
>>
>>That's not all implemented at mail.python.org. What's there is the
>>basic
>>Postfix config, a bash script the generate the new mappings from the
>>old
>>and a simple patch to mailman/runners/lmtp.py.
>>
>>So, the bottom line is it can be done and it's in process, but it
>won't
>>really be supported until Mailman 3.2. In the mean time, you just need
>>to have a separate domain for your lists that isn't a
>virtual_*_domain.
>
>Ok thanks. At least I have a clear answer now. Any ETA on 3.2 in mind
>yet?
>--
>
>Thanks,
>
>Fabian S.
>
>OpenPGP: 3C3FA072ACCB7AC5DB0F723455502B0EEB9070FC
>_______________________________________________
>Mailman-users mailing list
>mailman-users(a)mailman3.org
>https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
Mark,
Ok I have it almost perfectly working now having taken your direction and configuring a unique domain not in my email system already.
But in my testing, I replied to a subscription confirmation message and received back an undeliverable looping email error message from postfix. Any clues there you can offer? I can post to the list from any email added via the admin console. The test subscriber address was local to my server. From an outside address, same error.
Once I registered the new email domain, I reverted my postfix config back to the default suggested by maxking's docker instructions.
https://github.com/maxking/docker-mailman
Thanks.
--
Thanks,
Fabian S.
OpenPGP: 3C3FA072ACCB7AC5DB0F723455502B0EEB9070FC
7 years, 7 months

I have issue where it does not send emails on to people in the list I create.
by john_warland@hotmail.com
Hello,
I am quite new to Mailman3 and have been trying to get a working local test setup on a single VM (Centos07)
I have issue where if I send an email to the list. it does not send emails on to the people subscribed to that list.
Note the steps below were put together from memory after a few days of repeatably trying different things so there will be some inaccuracies
I have mailman running on same local box as postfix, postorius and hyperkitty.
I have root as the superuser in Postorius and have tried the following:
In unix shell created new user 'developer'
In unix shell created new user 'tester'
In shell send an email from developer user to tester:
echo 'Hello' | mailx -s 'Hello Subject line' tester(a)sandbox.mytest.com
Confirmed user tester received email in cat /home/tester/Maildir/new/ folder:
Return-Path: <developer(a)cloud7.sandbox.mytest.com>
X-Original-To: tester(a)cloud7.sandbox.mytest.com
Delivered-To: tester(a)cloud7.sandbox.mytest.com
Received: by cloud7.sandbox.mytest.com (Postfix, from userid 1000)
In Postorius web frontend:
Signed up as root
Received confirmation email in /root/Maildir/new/ folder so cut and pasted the Url in the email to activate account.
Created new list called testlist(a)sandbox.mytest.com
Logged out
Signed up as tester
Received confirmation email in /home/tester/Maildir/new/ folder so cut and pasted the Url to activate account.
Subscribed tester to the testlist.
Next in unix shell su as developer and send an email to testlist(a)sandbox.mytest.com
The root user gets the following email
Content-Transfer-Encoding: 7bit
Subject: Your message to testlist(a)cloud7.sandbox.mytest.com awaits moderator approval
From: testlist-bounces(a)cloud7.sandbox.mytest.com
To: developer(a)cloud7.sandbox.mytest.com
Message-ID: <158824480291.3035.17408340520496115243(a)localhost.localdomain>
Date: Thu, 30 Apr 2020 11:06:42 +0000
Precedence: bulk
X-Mailman-Version: 3.3.0
Your mail to 'testlist(a)cloud7.sandbox.mytest.com' with the subject
hello there 2
Is being held until the list moderator can review it for approval.
The message is being held because:
The message is not from a list member
Either the message will get posted to the list, or you will receive notification of the moderator's decision.
Once I have gone back into Postorius as root and approved the message, root user gets a second email:
Return-Path: <testlist-bounces(a)cloud7.sandbox.mytest.com>
X-Original-To: root(a)cloud7.sandbox.mytest.com
Delivered-To: root(a)cloud7.sandbox.mytest.com
Received: from localhost.localdomain (localhost [IPv6:::1])
by cloud7.sandbox.mytest.com (Postfix) with ESMTP id E056A84CE4
for <root(a)cloud7.sandbox.mytest.com>; Thu, 30 Apr 2020 11:09:10 +0000 (UTC)
Received: by cloud7.sandbox.mytest.com (Postfix, from userid 1000)
id 8F1B684CE4; Thu, 30 Apr 2020 11:06:41 +0000 (UTC)
Date: Thu, 30 Apr 2020 11:06:41 +0000
To: testlist(a)cloud7.sandbox.mytest.com
User-Agent: Heirloom mailx 12.5 7/5/10
MIME-Version: 1.0
Message-Id: <20200430110641.8F1B684CE4(a)sandbox.mytest.com>
From: developer(a)cloud7.sandbox.mytest.com
X-MailFrom: developer(a)cloud7.sandbox.mytest.com
X-Mailman-Rule-Hits: nonmember-moderation
X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation
Message-ID-Hash: FAPTJKJRZG2ELSOSBRBIDOBWXP3Y5QAY
X-Message-ID-Hash: FAPTJKJRZG2ELSOSBRBIDOBWXP3Y5QAY
X-Mailman-Approved-At: Thu, 30 Apr 2020 11:09:10 +0000
X-Mailman-Version: 3.3.0
Precedence: list
Subject: [Testlist] hello there 2
List-Id: A test list <testlist.sandbox.mytest.com>
List-Help: <mailto:testlist-request@sandbox.mytest.com?subject=help>
List-Post: <mailto:testlist@sandbox.mytest.com>
List-Subscribe: <mailto:testlist-join@sandbox.mytest.com>
List-Unsubscribe: <mailto:testlist-leave@sandbox.mytest.com>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
A test email 2
_______________________________________________
Testlist mailing list -- testlist(a)sandbox.mytest.com
To unsubscribe send an email to testlist-leave(a)sandbox.mytest.com
At no point does the email appear in the tester(a)sandbox.mytest.com Maildir
Configs as follows..
==================================================================================================
/etc/postfix/main.cf:
==================================================================================================
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
mail_owner = postfix
myhostname = cloud7.sandbox.mytest.com
mydomain = sandbox.mytest.com
myorigin = $mydomain
inet_interfaces = all
inet_protocols = all
mydestination = $myhostname, localhost.$mydomain, localhost,
mail.$mydomain, www.$mydomain, ftp.$mydomain, sandbox.mytest.com
unknown_local_recipient_reject_code = 550
# Next line Obfuscated
mynetworks = 192.***.***.0/24, 127.0.0.0/8
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
recipient_delimiter = +
home_mailbox = Maildir/
debug_peer_level = 2
debug_peer_list = sandbox.mytest.com
debugger_command =
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
ddd $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail.postfix
newaliases_path = /usr/bin/newaliases.postfix
mailq_path = /usr/bin/mailq.postfix
setgid_group = postdrop
html_directory = no
manpage_directory = /usr/share/man
sample_directory = /usr/share/doc/postfix-2.10.1/samples
readme_directory = /usr/share/doc/postfix-2.10.1/README_FILES
disable_dns_lookups = yes
owner_request_special = no
transport_maps = hash:/var/lib/mailman/data/postfix_lmtp
# Setting to nothing fixes 'Recepient address rejected: User unknown in local recipient table
local_recipient_maps =
relay_domains = hash:/var/lib/mailman/data/postfix_domains
==================================================================================================
/etc/mailman.cfg
==================================================================================================
[devmode]
enabled: yes
recipient: root(a)sandbox.mytest.com
[mailman]
# local = Recommended as installing mailman from source. Folder structure in /var/tmp/mailman
# fhs = /var/bin, /var/log, etc..
layout: fhs
[logging.database]
level: info
[mta]
# This config is for when mailman and the MTA (Postfix) are on the same host
incoming: mailman.mta.postfix.LMTP
outgoing: mailman.mta.deliver.deliver
lmtp_host: 127.0.0.1
lmtp_port: 8024
smtp_host: localhost
smtp_port: 25
configuration: python:mailman.config.postfix
[webservice]
hostname: localhost
port: 8001
use_https: no
admin_user: restadmin
admin_pass: restpass
api_version: 3.1
==================================================================================================
/etc/mailman-suite-1.0.0/mailman-suite_project/settings.py
==================================================================================================
In this file the main changes were:
DEBUG=True
SERVER_EMAIL = 'root(a)localhost.local'
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
Commented out three lines of code:
# if DEBUG == True:
# EMAIL_BACKEND = 'django.core.mail.backends.filebased.EmailBackend'
# EMAIL_FILE_PATH = os.path.join(BASE_DIR, 'emails')
Complete file:
"""
Django Settings for Mailman Suite (hyperkitty + postorius)
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'change-this-on-your-production-server'
# SECURITY WARNING: don't run with debug turned on in production!
# Have to keep it True atm as the css styles screw up when set to False
DEBUG = True
ADMINS = (
('Mailman Suite Admin', 'root@localhost'),
)
SITE_ID = 1
# Hosts/domain names that are valid for this site; required if DEBUG is False
# See https://docs.djangoproject.com/en/1.8/ref/settings/#allowed-hosts
ALLOWED_HOSTS = [
"localhost", # Archiving API from Mailman, keep it.
"MAILMAN_SERVER_ADDRESS", <--- I inject IP Address here
# Add here all production URLs you may have.
]
# Mailman API credentials
MAILMAN_REST_API_URL = 'http://localhost:8001'
MAILMAN_REST_API_USER = 'restadmin'
MAILMAN_REST_API_PASS = 'restpass'
MAILMAN_ARCHIVER_KEY = 'SecretArchiverAPIKey'
MAILMAN_ARCHIVER_FROM = ('127.0.0.1', '::1')
# Application definition
INSTALLED_APPS = (
'hyperkitty',
'postorius',
'django_mailman3',
# Uncomment the next line to enable the admin:
'django.contrib.admin',
# Uncomment the next line to enable admin documentation:
# 'django.contrib.admindocs',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'rest_framework',
'django_gravatar',
'compressor',
'haystack',
'django_extensions',
'django_q',
'allauth',
'allauth.account',
'allauth.socialaccount',
'django_mailman3.lib.auth.fedora',
'allauth.socialaccount.providers.openid',
'allauth.socialaccount.providers.github',
'allauth.socialaccount.providers.gitlab',
'allauth.socialaccount.providers.google',
# 'allauth.socialaccount.providers.facebook',
'allauth.socialaccount.providers.twitter',
'allauth.socialaccount.providers.stackexchange',
)
MIDDLEWARE = (
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'django.middleware.security.SecurityMiddleware',
'django_mailman3.middleware.TimezoneMiddleware',
'postorius.middleware.PostoriusMiddleware',
)
ROOT_URLCONF = 'urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.i18n',
'django.template.context_processors.media',
'django.template.context_processors.static',
'django.template.context_processors.tz',
'django.template.context_processors.csrf',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
'django_mailman3.context_processors.common',
'hyperkitty.context_processors.common',
'postorius.context_processors.postorius',
],
},
},
]
WSGI_APPLICATION = 'wsgi.application'
# Database
# https://docs.djangoproject.com/en/1.8/ref/settings/#databases
DATABASES = {
'default': {
# Use 'sqlite3', 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'ENGINE': 'django.db.backends.sqlite3',
# DB name or path to database file if using sqlite3.
'NAME': os.path.join(BASE_DIR, 'mailmansuite.db'),
# The following settings are not used with sqlite3:
'USER': 'mailmansuite',
'PASSWORD': 'mmpass',
# HOST: empty for localhost through domain sockets or '127.0.0.1' for
# localhost through TCP.
'HOST': '',
# PORT: set to empty string for default.
'PORT': '',
}
# Example for PostgreSQL (recommanded for production):
#'default': {
# 'ENGINE': 'django.db.backends.postgresql_psycopg2',
# 'NAME': 'database_name',
# 'USER': 'database_user',
# 'PASSWORD': 'database_password',
# 'HOST': 'localhost',
#}
}
# If you're behind a proxy, use the X-Forwarded-Host header
# See https://docs.djangoproject.com/en/1.8/ref/settings/#use-x-forwarded-host
# USE_X_FORWARDED_HOST = True
# And if your proxy does your SSL encoding for you, set SECURE_PROXY_SSL_HEADER
# https://docs.djangoproject.com/en/1.8/ref/settings/#secure-proxy-ssl-header
# SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
# SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_SCHEME', 'https')
# Other security settings
# SECURE_SSL_REDIRECT = True
# If you set SECURE_SSL_REDIRECT to True, make sure the SECURE_REDIRECT_EXEMPT
# contains at least this line:
# SECURE_REDIRECT_EXEMPT = [
# "archives/api/mailman/.*", # Request from Mailman.
# ]
# SESSION_COOKIE_SECURE = True
# SECURE_CONTENT_TYPE_NOSNIFF = True
# SECURE_BROWSER_XSS_FILTER = True
# CSRF_COOKIE_SECURE = True
# CSRF_COOKIE_HTTPONLY = True
# X_FRAME_OPTIONS = 'DENY'
# Password validation
# https://docs.djangoproject.com/en/1.9/ref/settings/#auth-password-validators
AUTH_PASSWORD_VALIDATORS = [
{
'NAME':
'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
},
{
'NAME':
'django.contrib.auth.password_validation.MinimumLengthValidator',
},
{
'NAME':
'django.contrib.auth.password_validation.CommonPasswordValidator',
},
{
'NAME':
'django.contrib.auth.password_validation.NumericPasswordValidator',
},
]
# Internationalization
# https://docs.djangoproject.com/en/1.8/topics/i18n/
LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'UTC'
USE_I18N = True
USE_L10N = True
USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.8/howto/static-files/
# Absolute path to the directory static files should be collected to.
# Don't put anything in this directory yourself; store your static files
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
# Example: "/var/www/example.com/static/"
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
# URL prefix for static files.
# Example: "http://example.com/static/", "http://static.example.com/"
STATIC_URL = '/static/'
# Additional locations of static files
STATICFILES_DIRS = (
# Put strings here, like "/home/html/static" or "C:/www/django/static".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
# BASE_DIR + '/static/',
)
# List of finder classes that know how to find static files in
# various locations.
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
# 'django.contrib.staticfiles.finders.DefaultStorageFinder',
'compressor.finders.CompressorFinder',
)
# Django 1.6+ defaults to a JSON serializer, but it won't work with
# django-openid, see
# https://bugs.launchpad.net/django-openid-auth/+bug/1252826
SESSION_SERIALIZER = 'django.contrib.sessions.serializers.PickleSerializer'
LOGIN_URL = 'account_login'
LOGIN_REDIRECT_URL = 'list_index'
LOGOUT_URL = 'account_logout'
# If you enable internal authentication, this is the address that the emails
# will appear to be coming from. Make sure you set a valid domain name,
# otherwise the emails may get rejected.
# https://docs.djangoproject.com/en/1.8/ref/settings/#default-from-email
# DEFAULT_FROM_EMAIL = "mailing-lists(a)you-domain.org"
DEFAULT_FROM_EMAIL = 'postorius(a)localhost.local'
# If you enable email reporting for error messages, this is where those emails
# will appear to be coming from. Make sure you set a valid domain name,
# otherwise the emails may get rejected.
# https://docs.djangoproject.com/en/1.8/ref/settings/#std:setting-SERVER_EMAIL
# SERVER_EMAIL = 'root(a)your-domain.org'
SERVER_EMAIL = 'root(a)localhost.local'
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
# Compatibility with Bootstrap 3
from django.contrib.messages import constants as messages # flake8: noqa
MESSAGE_TAGS = {
messages.ERROR: 'danger'
}
#
# Social auth
#
AUTHENTICATION_BACKENDS = (
'django.contrib.auth.backends.ModelBackend',
'allauth.account.auth_backends.AuthenticationBackend',
)
# Django Allauth
ACCOUNT_AUTHENTICATION_METHOD = "username_email"
ACCOUNT_EMAIL_REQUIRED = True
ACCOUNT_EMAIL_VERIFICATION = "mandatory"
# You probably want https in production, but this is a dev setup file
ACCOUNT_DEFAULT_HTTP_PROTOCOL = "http"
ACCOUNT_UNIQUE_EMAIL = True
SOCIALACCOUNT_PROVIDERS = {
'openid': {
'SERVERS': [
dict(id='yahoo',
name='Yahoo',
openid_url='http://me.yahoo.com'),
],
},
'google': {
'SCOPE': ['profile', 'email'],
'AUTH_PARAMS': {'access_type': 'online'},
},
'facebook': {
'METHOD': 'oauth2',
'SCOPE': ['email'],
'FIELDS': [
'email',
'name',
'first_name',
'last_name',
'locale',
'timezone',
],
'VERSION': 'v2.4',
},
}
#
# Gravatar
# https://github.com/twaddington/django-gravatar
#
# Gravatar base url.
# GRAVATAR_URL = 'http://cdn.libravatar.org/'
# Gravatar base secure https url.
# GRAVATAR_SECURE_URL = 'https://seccdn.libravatar.org/'
# Gravatar size in pixels.
# GRAVATAR_DEFAULT_SIZE = '80'
# An image url or one of the following: 'mm', 'identicon', 'monsterid',
# 'wavatar', 'retro'.
# GRAVATAR_DEFAULT_IMAGE = 'mm'
# One of the following: 'g', 'pg', 'r', 'x'.
# GRAVATAR_DEFAULT_RATING = 'g'
# True to use https by default, False for plain http.
# GRAVATAR_DEFAULT_SECURE = True
#
# django-compressor
# https://pypi.python.org/pypi/django_compressor
#
COMPRESS_PRECOMPILERS = (
('text/less', 'lessc {infile} {outfile}'),
('text/x-scss', 'sass -t compressed {infile} {outfile}'),
('text/x-sass', 'sass -t compressed {infile} {outfile}'),
)
# On a production setup, setting COMPRESS_OFFLINE to True will bring a
# significant performance improvement, as CSS files will not need to be
# recompiled on each requests. It means running an additional "compress"
# management command after each code upgrade.
# http://django-compressor.readthedocs.io/en/latest/usage/#offline-compression
# COMPRESS_OFFLINE = True
# Needed for debug mode
# INTERNAL_IPS = ('127.0.0.1',)
#
# Full-text search engine
#
HAYSTACK_CONNECTIONS = {
'default': {
'ENGINE': 'haystack.backends.whoosh_backend.WhooshEngine',
'PATH': os.path.join(BASE_DIR, "fulltext_index"),
# You can also use the Xapian engine, it's faster and more accurate,
# but requires another library.
# http://django-haystack.readthedocs.io/en/v2.4.1/installing_search_engines.h…
# Example configuration for Xapian:
#'ENGINE': 'xapian_backend.XapianEngine'
},
}
#
# Asynchronous tasks
#
Q_CLUSTER = {
'timeout': 300,
'save_limit': 100,
'orm': 'default',
}
# A sample logging configuration. The only tangible logging
# performed by this configuration is to send an email to
# the site admins on every HTTP 500 error when DEBUG=False.
# See http://docs.djangoproject.com/en/dev/topics/logging for
# more details on how to customize your logging configuration.
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'filters': {
'require_debug_false': {
'()': 'django.utils.log.RequireDebugFalse'
}
},
'handlers': {
'mail_admins': {
#'level': 'ERROR',
'level': 'INFO',
'filters': ['require_debug_false'],
'class': 'django.utils.log.AdminEmailHandler'
},
'file':{
#'level': 'ERROR',
'level': 'INFO',
#'class': 'logging.handlers.RotatingFileHandler',
'class': 'logging.handlers.WatchedFileHandler',
'filename': os.path.join(BASE_DIR, 'logs', 'mailmansuite.log'),
'formatter': 'verbose',
},
'console': {
'class': 'logging.StreamHandler',
'formatter': 'simple',
},
},
'loggers': {
'django.request': {
'handlers': ['mail_admins', 'file'],
#'level': 'ERROR',
'level': 'INFO',
'propagate': True,
},
'django': {
'handlers': ['file'],
#'level': 'ERROR',
'level': 'INFO',
'propagate': True,
},
'hyperkitty': {
'handlers': ['file'],
#'level': 'DEBUG',
'level': 'INFO',
'propagate': True,
},
'postorius': {
'handlers': ['console', 'file'],
#'level': 'ERROR',
'level': 'INFO',
},
},
'formatters': {
'verbose': {
'format': '%(levelname)s %(asctime)s %(process)d %(name)s %(message)s'
},
'simple': {
'format': '%(levelname)s %(message)s'
},
},
'root': {
'handlers': ['file'],
#'level': 'ERROR',
'level': 'INFO',
},
}
# Using the cache infrastructure can significantly improve performance on a
# production setup. This is an example with a local Memcached server.
#CACHES = {
# 'default': {
# 'BACKEND': 'django.core.cache.backends.memcached.PyLibMCCache',
# 'LOCATION': '127.0.0.1:11211',
# }
#}
# When DEBUG is True, don't actually send emails to the SMTP server, just store
# them in a directory. This way you won't accidentally spam your mailing-lists
# while you're fiddling with the code.
# Kept DEBUG=True as it breaks css styling when set to False so commented out this code as temp fix.
#if DEBUG == True:
# EMAIL_BACKEND = 'django.core.mail.backends.filebased.EmailBackend'
# EMAIL_FILE_PATH = os.path.join(BASE_DIR, 'emails')
#
# HyperKitty-specific
#
# Only display mailing-lists from the same virtual host as the webserver
FILTER_VHOST = False
POSTORIUS_TEMPLATE_BASE_URL = 'http://localhost:8000'
try:
from settings_local import *
except ImportError:
pass
5 years, 1 month

Re: Newbie question 2: Rewriting issue for bounced emails
by William Oliver
On Sat, 2021-12-25 at 21:32 -0800, Mark Sapiro wrote:
>
>
> Have you added an Alias Domain for your domain?
>
> After doing that did you run `mailman aliases` or restart mailman to
> (re)generate the files.
>
> postfix_domains postfix_lmtp postfix_vmap
> postfix_domains.db postfix_lmtp.db postfix_vmap.db
>
>
> --
>
First, thanks for your patience. Two steps forward and one step back,
here. I have the interface running and I can create a list which
*does* send messages to my test recipients.
To answer your question, yes, I did all that, and that generates
postfix_domains and postfix_lmtp, but not postfix_vmap. Here's what I
got:
$more postfix_domains
# AUTOMATICALLY GENERATED BY MAILMAN ON 2021-12-26 22:29:27
#
# This file is generated by Mailman, and is kept in sync with the
binary hash
# file. YOU SHOULD NOT MANUALLY EDIT THIS FILE unless you know what
you're
# doing, and can keep the two files properly in sync. If you screw it
up,
# you're on your own.
libertyfp.org libertyfp.org
$more postfix_lmtp
# AUTOMATICALLY GENERATED BY MAILMAN ON 2021-12-26 22:29:27
#
# This file is generated by Mailman, and is kept in sync with the
binary hash
# file. YOU SHOULD NOT MANUALLY EDIT THIS FILE unless you know what
you're
# doing, and can keep the two files properly in sync. If you screw it
up,
# you're on your own.
# Aliases which are visible only in the @libertyfp.org domain.
testlist(a)libertyfp.org lmtp:[mail.libertyfp.org]:8024
testlist-bounces(a)libertyfp.org lmtp:[mail.libertyfp.org]:8024
testlist-confirm(a)libertyfp.org lmtp:[mail.libertyfp.org]:8024
testlist-join(a)libertyfp.org lmtp:[mail.libertyfp.org]:8024
testlist-leave(a)libertyfp.org lmtp:[mail.libertyfp.org]:8024
testlist-owner(a)libertyfp.org lmtp:[mail.libertyfp.org]:8024
testlist-request(a)libertyfp.org lmtp:[mail.libertyfp.org]:8024
testlist-subscribe(a)libertyfp.org lmtp:[mail.libertyfp.org]:8024
testlist-unsubscribe(a)libertyfp.org lmtp:[mail.libertyfp.org]:8024
But no postfix_vmap.
However, let me ask another question first:
When running mailman3, do I need to set up a completely different
virtual domain for it to run in? My "real" domain name is
libertyfp.org, and I'm trying to make mailman work on that domain, e.g.
"testlist(a)libertyfp.org." I'm starting to get the idea that I need to
stick a completely different domain in there for the mailinglist.
Which I can do -- I've got another two or three domain names to play
with. Is it a problem to run the mailinglist on the same domain that
the machine sits on for its regular business? A lot of the errors I'm
getting seem to be from trying to do regular mail *and* the mailinglist
on the same domain.
Now that I've installed all this stuff a couple of times, I can easily
re-install for a second virtual domain, if that's what I should be
doing.
But, on to what's not working now...
Unfortunately, I seem to have completely screwed the pooch on getting
postfix/dovecot to play nicely with respect to *receiving* mail.
First, adding "virtual_alias_domains" (and putting libertyfp.org in it)
and commenting out "virtual_mailbox_domains" resulted in postfix
ignoring all my virtual mailboxes. Mail still worked, but mail is now
being sent to /home/<user>/Maildir instead of
/home/vmail/libertyfp/<user>/Maildir -- which means that dovecot, which
looks in the virtual mailboxes, is now unaware of new mail. I suppose
I could link /home/<user>/Maildir to
/home/vmail/libertyfp.org/<user>/Maildir, but I suspect there will be
problems and it's not a real fix. But.. .a problem for another day.
Except... the same thing is happening with the mailinglist.
In mailman3:
I set up a test list (testlist(a)libertyfp.org) and added two test users
(one local and one on a different domain). They added just fine, and
both received the welcome message.
However, when I replied, both messages bounced with the error that
"testlist(a)libertyfp.org" was "user unknown in virtual alias table."
No problem, I thought. So I added:
testlist(a)libertyfp.org testlist
to /etc/postfix/virtual, and
testlist libertyfp.org/testlist/Maildir
to /etc/postfix/virtual-mailbox,
and I added testlist as a user:
$ adduser -m testlist
So, now mail from my list members goes to /home/testlist/Maildir, but
not to the mailinglist.
I also have managed to get another *different* warning, and the "there
ain't no vmap, newbie" error as well:
Dec 26 17:33:11 libertyfp systemd[1]: certbot.service: Consumed 1.041s
CPU time.
Dec 26 17:33:12 libertyfp postfix/smtpd[46453]: error: open database
/opt/mailman/mm/var/data/postfix_vmap.db: No such file or directory
Dec 26 17:33:12 libertyfp postfix/smtpd[46453]: error: unsupported
dictionary type: #hash
Dec 26 17:33:12 libertyfp postfix/smtpd[46453]: connect from
billoblog.com[162.144.108.19]
Dec 26 17:33:16 libertyfp postfix/trivial-rewrite[46479]: warning: do
not list domain libertyfp.org in BOTH virtual_alias_domains and
relay_domains
Dec 26 17:33:16 libertyfp postfix/smtpd[46453]: warning:
hash:/opt/mailman/mm/var/data/postfix_vmap is unavailable. open
database /opt/mailman/mm/var/data/postfix_vmap.db: No such file or
directory
Dec 26 17:33:16 libertyfp postfix/smtpd[46453]: warning:
hash:/opt/mailman/mm/var/data/postfix_vmap lookup error for
"fplist(a)libertyfp.org"
Dec 26 17:33:16 libertyfp postfix/smtpd[46453]: NOQUEUE: reject: RCPT
from billoblog.com[162.144.108.19]: 451 4.3.0 <fplist(a)libertyfp.org>:
Temporary lookup failure; from=<billo(a)billoblog.com>
to=<fplist(a)libertyfp.org> proto=ESMTP helo=<billoblog.com>
That "you can't have both virtual_alias_domains" and "relay_domains"
seems like it should be a clue. But I don't' know what for. Adding
virtual_alias_domains really changed things...
Anyway, here's the part of the /etc/postfix/main.cf that I think is
likely important. Note that I comments out "virtual_mailbox_domains".
myorigin = localhost
mydestination = localhost, localhost.$mydomain
alias_maps = /etc/aliases (which, by the way, just contains
"postmaster: root")
home_mailbox= Maildir
# add to the end (add ssl support)
smtpd_use_tls = yes
smtp_tls_mandatory_protocols = !SSLv2, !SSLv3
smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3
smtpd_tls_cert_file = /etc/letsencrypt/live/libertyfp.org/fullchain.pem
smtpd_tls_key_file = /etc/letsencrypt/live/libertyfp.org/privkey.pem
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
# add to the end (add virtual users)
# if specify multiple domains, specify comma or space separated
#virtual_mailbox_domains = libertyfp.org
virtual_mailbox_base = /home/vmail
virtual_mailbox_maps = hash:/etc/postfix/virtual-mailbox
virtual_uid_maps = static:20000
virtual_gid_maps = static:20000
# mailman3 changes
owner_request_special = no
always_add_missing_headers = yes
transport_maps = hash:/opt/mailman/mm/var/data/postfix_lmtp
local_recipient_maps = proxy:unix:passwd.byname $alias_maps
hash:/opt/mailman/mm/var/data/postfix_lmtp
relay_domains = hash:/opt/mailman/mm/var/data/postfix_domains
default_destination_recipient_limit = 30
default_destination_concurrency_limit = 15
virtual_alias_domains = hash:/etc/postfix/domains
virtual_alias_maps = hash:/opt/mailman/mm/var/data/postfix_vmap
#hash:/etc/postfix/virtual
Here's the postfix maps:
/etc/postfix/domains:
libertyfp.org #
/etc/postfix/virtual:
fp145(a)libertyfp.org fp145
mailman(a)libertyfp.org mailman
testlist(a)libertyfp.org testlist
/etc/postfix/virtual-mailbox:
mailman libertyfp.org/mailadmin/Maildir/
fp145@localhost libertyfp.org/fp145/Maildir/
testlist libertyfp.org/testlist/Maildir
3 years, 5 months