2020/10/29

From Woozle Writes Code
Jump to navigation Jump to search
Codeblog
Oct 29 13:23:47 cloud1 postfix/qmgr[2517900]: 49BE4E64B9: from=<woozalia@gmail.com>, size=2727, nrcpt=1 (queue active)
Oct 29 13:23:47 cloud1 postfix/error[2748964]: 49BE4E64B9: to=<w.deliver-hypertwins.org@mail.vbz.net>, orig_to=<w.deliver@hypertwins.org>, relay=none, delay=0.03, delays=0.02/0.01/0/0.01, dsn=5.1.1, status=bounced (User unknown in virtual alias table)
Oct 29 13:23:47 cloud1 postfix/cleanup[2748961]: 50687E64E9: message-id=<20201029132347.50687E64E9@cloud1.vbh.ovh>
Oct 29 13:23:47 cloud1 postfix/qmgr[2517900]: 50687E64E9: from=<>, size=4685, nrcpt=1 (queue active)
Oct 29 13:23:47 cloud1 postfix/bounce[2748965]: 49BE4E64B9: sender non-delivery notification: 50687E64E9
Oct 29 13:23:47 cloud1 postfix/qmgr[2517900]: 49BE4E64B9: removed

It seems likely the problem is something to do with the virtual domain forwarding table.

postconf-n:

postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
allow_percent_hack = no
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
compatibility_level = 2
home_mailbox = Maildir/
inet_interfaces = all
inet_protocols = all
mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME
mailbox_size_limit = 0
mydestination = $myhostname, localhost
myhostname = cloud1.vbz.ovh
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
relayhost =
sender_bcc_maps = hash:/etc/postfix/bcc
sender_dependent_default_transport_maps = hash:/etc/postfix/dependent
smtp_tls_CApath = /etc/ssl/certs
smtp_tls_security_level = may
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_security_level = may
tls_server_sni_maps = hash:/etc/postfix/sni_map
virtual_alias_maps = hash:/etc/postfix/virtual

The problem with that turned out to be that

mydestination = $myhostname, localhost

needs to be

mydestination = $myhostname, localhost, $myorigin

At that point, hypertwins.org and ownedbycats.org started being received, but not domains hosted on cloud5. To fix that...

(13:01) Important thing: the receiving mail server needs at least two virtual address entries:

  • "domain.name <anything>"
  • "@domain.name <destination>" for a catch-all, or more specific addresses for non-catchall