mailman (unknown user)

Discussion in 'Installation/Configuration' started by Steffan, Mar 20, 2017.

  1. Steffan

    Steffan Member

    Hello i have some trouble with mailman.
    i did post some bugs to github.
    But im getting this.
    i see the domainname is changed to the servername

    <helpdesk@xxx.nl>: Sender address triggers FILTER amavis:[127.0.0.1]:10026; from=<helpdesk@xxx.nl> to=<test@maildomain.nl> proto=ESMTP helo=<61.xxx.com>
    .....
    Mar 20 09:31:35 mail01 postfix/smtp[13971]: EA8D75C346AA: to=<test@maildomain.nl>, relay=127.0.0.1[127.0.0.1]:10026, delay=1.2, delays=0.14/0/0/1.1, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10027): 250 2.0.0 Ok: queued as 110B15C3479B)
    Mar 20 09:31:35 mail01 postfix/local[14796]: 110B15C3479B: to=<test@servername.com>, orig_to=<test@maildomain.nl>, relay=local, delay=0.11, delays=0.08/0.01/0/0.02, dsn=5.1.1, status=bounced (unknown user: "test")

    /var/lib/mailman/data/transport-mailman has no mailman-loop@servername.com local (does he need that?
    mailman-loop@maildomain.nl local

    # CREATED: Mon Mar 13 16:00:02 2017
    riantest@maildomain.nl local

    # CREATED: Mon Mar 13 16:00:02 2017
    test@maildomain.nl local
    -......

    /etc/mailman/virtual-mailman
    # CREATED: Mon Mar 13 16:00:02 2017
    test@maildomain.nl test

    mailman is configured in /etc/aliases
    ## mailman mailing list
    mailman: "|/usr/lib/mailman/mail/mailman post mailman"
    mailman-admin: "|/usr/lib/mailman/mail/mailman admin mailman"
    mailman-bounces: "|/usr/lib/mailman/mail/mailman bounces mailman"
    mailman-confirm: "|/usr/lib/mailman/mail/mailman confirm mailman"
    mailman-join: "|/usr/lib/mailman/mail/mailman join mailman"
    mailman-leave: "|/usr/lib/mailman/mail/mailman leave mailman"
    mailman-owner: "|/usr/lib/mailman/mail/mailman owner mailman"
    mailman-request: "|/usr/lib/mailman/mail/mailman request mailman"
    mailman-subscribe: "|/usr/lib/mailman/mail/mailman subscribe mailman"
    mailman-unsubscribe: "|/usr/lib/mailman/mail/mailman unsubscribe mailman"

    [root@mail01 postfix]# postconf -n
    alias_database = hash:/etc/aliases
    alias_maps = hash:/etc/aliases
    body_checks = regexp:/etc/postfix/body_checks
    broken_sasl_auth_clients = yes
    command_directory = /usr/sbin
    config_directory = /etc/postfix
    content_filter = amavis:[127.0.0.1]:10024
    daemon_directory = /usr/libexec/postfix
    data_directory = /var/lib/postfix
    debug_peer_level = 2
    debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5
    dovecot_destination_recipient_limit = 1
    greylisting = check_policy_service inet:127.0.0.1:10023
    header_checks = regexp:/etc/postfix/header_checks
    html_directory = no
    inet_interfaces = all
    inet_protocols = ipv4
    mail_owner = postfix
    mailbox_size_limit = 0
    maildrop_destination_concurrency_limit = 1
    maildrop_destination_recipient_limit = 1
    mailq_path = /usr/bin/mailq.postfix
    manpage_directory = /usr/share/man
    message_size_limit = 0
    milter_default_action = accept
    mime_header_checks = regexp:/etc/postfix/mime_header_checks
    mydestination = servername.com, localhost, localhost.localdomain, localhost.tkservers.com
    myhostname = servername.com
    mynetworks = 127.0.0.0/8
    myorigin = $myhostname
    nested_header_checks = regexp:/etc/postfix/nested_header_checks
    newaliases_path = /usr/bin/newaliases.postfix
    non_smtpd_milters = $smtpd_milters
    proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $sender_bcc_maps $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $smtpd_sender_login_maps
    queue_directory = /var/spool/postfix
    readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
    receive_override_options = no_address_mappings
    relay_domains = mysql:/etc/postfix/mysql-virtual_relaydomains.cf
    relay_recipient_maps = mysql:/etc/postfix/mysql-virtual_relayrecipientmaps.cf
    sample_directory = /usr/share/doc/postfix-2.6.6/samples
    sender_bcc_maps = proxy:mysql:/etc/postfix/mysql-virtual_outgoing_bcc.cf
    sendmail_path = /usr/sbin/sendmail.postfix
    setgid_group = postdrop
    smtp_tls_exclude_ciphers = RC4, aNULL
    smtp_tls_protocols = !SSLv2,!SSLv3
    smtp_tls_security_level = may
    smtpd_client_message_rate_limit = 100
    smtpd_client_restrictions = check_client_access mysql:/etc/postfix/mysql-virtual_client.cf
    smtpd_error_sleep_time = 1s
    smtpd_helo_required = yes
    smtpd_helo_restrictions = permit_sasl_authenticated, permit_mynetworks, check_helo_access regexp:/etc/postfix/helo_access, reject_invalid_hostname, reject_non_fqdn_hostname, check_helo_access regexp:/etc/postfix/blacklist_helo
    smtpd_milters = inet:127.0.0.1:8891, inet:127.0.0.1:8893
    smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, check_recipient_access mysql:/etc/postfix/mysql-virtual_recipient.cf, check_recipient_access mysql:/etc/postfix/mysql-virtual_policy_greylist.cf
    smtpd_restriction_classes = greylisting
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_authenticated_header = yes
    smtpd_sasl_path = private/auth
    smtpd_sasl_type = dovecot
    smtpd_sender_login_maps = proxy:mysql:/etc/postfix/mysql-virtual_sender_login_maps.cf
    smtpd_sender_restrictions = check_sender_access regexp:/etc/postfix/tag_as_originating.re , permit_mynetworks, permit_sasl_authenticated, check_sender_access mysql:/etc/postfix/mysql-virtual_sender.cf, check_sender_access regexp:/etc/postfix/tag_as_foreign.re
    smtpd_soft_error_limit = 30
    smtpd_tls_CAfile = /etc/letsencrypt/live/servername.com/fullchain.pem
    smtpd_tls_CApath = /etc/letsencrypt/live/servername.com
    smtpd_tls_cert_file = /etc/postfix/smtpd.cert
    smtpd_tls_exclude_ciphers = RC4, aNULL
    smtpd_tls_key_file = /etc/postfix/smtpd.key
    smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3
    smtpd_tls_protocols = !SSLv2,!SSLv3
    smtpd_tls_security_level = may
    smtpd_use_tls = yes
    transport_maps = hash:/var/lib/mailman/data/transport-mailman, proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
    unknown_local_recipient_reject_code = 550
    virtual_alias_domains =
    virtual_alias_maps = hash:/etc/mailman/virtual-mailman, proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, proxy:mysql:/etc/postfix/mysql-virtual_email2email.cf
    virtual_gid_maps = mysql:/etc/postfix/mysql-virtual_gids.cf
    virtual_mailbox_base = /var/vmail
    virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
    virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
    virtual_transport = dovecot
    virtual_uid_maps = mysql:/etc/postfix/mysql-virtual_uids.cf
     
  2. Steffan

    Steffan Member

    to answer my own post
    my configuration was missing:
    hash:/etc/mailman/aliases

    so i changed it to:
    alias_maps = hash:/etc/aliases, hash:/etc/mailman/aliases
    alias_database = hash:/etc/aliases, hash:/etc/mailman/aliases
     
  3. Steffan

    Steffan Member

    well it fixed my problem but:
    ls -sl /etc/mailman/virtual-mailman

    44 -rw-rw---- 1 root mailman 43070 Mar 20 11:19 virtual-mailman
    76 -rw-r--r-- 1 root mailman 81920 Mar 20 10:41 virtual-mailman.db

    so virtual-mailman is not hashed.

    i solved it for now with cron. but that is just a dirty fix

    #!/bin/bash
    FILE1="/etc/mailman/virtual-mailman"
    FILE2="/etc/mailman/virtual-mailman.db"
    if [ $FILE1 -nt $FILE2 ]; then
    echo $FILE1 is newer than $FILE2
    /usr/sbin/postmap /etc/mailman/virtual-mailman
    fi
     
    Last edited: Mar 20, 2017

Share This Page