Score:0

Confused Email server

sj flag

I have recently migrated my server from Centos 6.9 to a new server with Centos 7.9 and I faced numerous issues owing to drastic change in OS, Version Changes in Perl, Python, PHP and Apache. I have sorted them out.

Except that the Postfix/Dovecot servers continue to cause deep anguish. For example: [email protected], [email protected] and [email protected] - all land up in the admin account of the server which is not mapped to any domain in the first place.

This is what I have done in the /ect/postfix/virtual:

[email protected] domain1.com-admin
[email protected] domain2.com-admin

Result: No joy

Then I added into /etc/postfix/vmailbox:

[email protected] domain1.com/admin
[email protected] domain2.com/admin

After doing the routine postmap /etc/postfix/virtual and postmap /etc/postfix/vmailbox, still no separation of the admin mails.

Where should I look ? I would be grateful for any pointers.

Postfix configuration information:

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
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
disable_vrfy_command = yes
header_checks = regexp:/etc/postfix/header_checks
home_mailbox = Maildir/
html_directory = no
inet_protocols = all
mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME
mailbox_size_limit = 0
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
milter_default_action = accept
mydestination = $myhostname, $mydomain, localhost.$mydomain, localhost, mail.$mydomain
newaliases_path = /usr/bin/newaliases.postfix
non_smtpd_milters = inet:localhost:8891
readme_directory = /usr/share/doc/postfix-2.10.1/README_FILES
resolve_dequoted_address = no
sample_directory = /usr/share/doc/postfix-2.10.1/samples
sender_bcc_maps = hash:/etc/postfix/bcc
sender_dependent_default_transport_maps = hash:/etc/postfix/dependent
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtp_tls_security_level = may
smtpd_error_sleep_time = 5s
smtpd_milters = inet:localhost:8891
smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
smtpd_tls_CAfile = /etc/postfix/postfix.ca.pem
smtpd_tls_cert_file = /etc/postfix/postfix.cert.pem
smtpd_tls_key_file = /etc/postfix/postfix.key.pem
smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3, !TLSv1, !TLSv1.1
smtpd_tls_security_level = may
unknown_local_recipient_reject_code = 550
virtual_alias_maps = hash:/etc/postfix/virtual
virtual_mailbox_maps = hash:/etc/postfix/vmailbox

Snippet from /etc/postfix/virtual:

domain1.com domain1.com
[email protected] domain1.com-admin
domain2.com domain2.com
[email protected] domain2.com-admin

Snippet from /etc/postfix/vmailbox:

[email protected] domain1.com/admin
[email protected] domain2.com/admin
in flag
Please provide your postfix configuration.
Wordsmith avatar
sj flag
Thanks Schneider.alias_database = hash:/etc/aliases alias_maps = hash:/etc/aliases broken_sasl_auth_clients = yes command_directory = /usr/sbin config_directory = /etc/postfix daemon_directory = /usr/libexec/postfix data_directory = /var/lib/postfix debug_peer_level = 2 debugger_command = $process_id & sleep 5 disable_vrfy_command = yes header_checks = regexp:/etc/postfix/header_checks home_mailbox = Maildir/ html_directory = no inet_protocols = all mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME
Wordsmith avatar
sj flag
mailbox_size_limit = 0 mailq_path = /usr/bin/mailq.postfix manpage_directory = /usr/share/man milter_default_action = accept mydestination = $myhostname, $mydomain, localhost.$mydomain, localhost, mail.$mydomain newaliases_path = /usr/bin/newaliases.postfix sender_dependent_default_transport_maps = hash:/etc/postfix/dependent smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination smtpd_relay_restrictions = permit_mynetworks
Wordsmith avatar
sj flag
permit_sasl_authenticated defer_unauth_destination smtpd_tls_CAfile = /etc/postfix/postfix.ca.pem smtpd_tls_cert_file = /etc/postfix/postfix.cert.pem smtpd_tls_key_file = /etc/postfix/postfix.key.pem smtpd_tls_security_level = may unknown_local_recipient_reject_code = 550 virtual_alias_maps = hash:/etc/postfix/virtual
in flag
Please edit this information into your question. It's unreadable in the comments.
anx avatar
fr flag
anx
Upgrading Postfix should in most cases continue to work with the old configuration. Unless you show us your pre-upgrade backup and the changes you made, it will be almost impossible to guess which change caused undesirable side-effects.
Nikita Kipriyanov avatar
za flag
What are `myhostname`, `mydomain`, `myorigin`? Do you realize what happens when you specify destination without "@domain" in the alias maps database? (It [appends @$myorigin](https://www.postfix.org/virtual.5.html) [by default](https://www.postfix.org/postconf.5.html#append_at_myorigin).) When you provide a Postfix configuration, you should follow a suggestion given in the tag description; it will make sure you include all the needed information.
Wordsmith avatar
sj flag
Thank you Nikita. The problem is when I migrated, obviously the Webmin/Virtualmin has munged some critical data. I have checked your link and all it says is the content of the virtual table should have the [email protected] address . But it does not specify how the address should look like. myhostname points to the main server name and mydomain refers to the virtual domains. What do I miss ?
Wordsmith avatar
sj flag
I have managed to restore normalcy by editing the /etc/postfix/virtual: The order is list your virtual domain [tab] virtual domain, user@domain[tab] user\@domain. Follow the drill to update the virtual table and reload.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.