Problem with /etc/aliases

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem with /etc/aliases

filbar
I have problem with postfix, which ignore /etc/aliases file.

My postfix configuration file is
---------------------------------------------------
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
content_filter = smtp-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
html_directory = no
ignore_mx_lookup_error = yes
inet_interfaces = all
inet_protocols = all
lmtp_host_lookup = native
local_recipient_maps = hash:/etc/postfix/local
local_transport = lmtp:unix:private/dovecot-lmtp
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost
mydomain = domena.cz
myhostname = domena.cz
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.10.1/README_FILES
sample_directory = /usr/share/doc/postfix-2.10.1/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtp_host_lookup = native
smtp_tls_CAfile = /etc/pki/tls/certs/ca-bundle.crt
smtp_tls_loglevel = 1
smtp_tls_security_level = may
smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_rbl_client bl.spamcop.net, reject_unknown_client_hostname, reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_path = private/auth
smtpd_sasl_type = dovecot
smtpd_sender_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_rbl_client bl.spamcop.net, reject_unknown_client_hostname, reject_unauth_destination
smtpd_tls_cert_file = /etc/letsencrypt/live/domena.cz/cert.pem
smtpd_tls_key_file = /etc/letsencrypt/live/domena.cz/privkey.pem
smtpd_use_tls = yes
unknown_local_recipient_reject_code = 550
---------------------------------------------------

What I do wrong?

With best regards

Filip Bartmann

Reply | Threaded
Open this post in threaded view
|

Re: Problem with /etc/aliases

Viktor Dukhovni
On Mon, Sep 02, 2019 at 03:00:01PM +0200, [hidden email] wrote:

> I have problem with postfix, which ignore /etc/aliases file.

As expected based on your configuration.

> alias_database = hash:/etc/aliases
> alias_maps = hash:/etc/aliases
> local_transport = lmtp:unix:private/dovecot-lmtp
> mydestination = $myhostname, localhost.$mydomain, localhost

The aliases(5) database is used by the local(8) delivery agent,
which your setting of local_transport preƫmpts, by directly going
with LMTP.  The best solution is to use virtual(5) aliases instead.
If you really must use local aliases(5), then you need to use

        mailbox_transport = lmtp:unix:private/dovecot-lmtp

instead of:

        local_transport = lmtp:unix:private/dovecot-lmtp

See the manpages for aliases(5), virtual(5) and local(8),

--
        Viktor.