froxlor / Froxlor

The server administration software for your needs - The official Froxlor development Git repository
http://www.froxlor.org
GNU General Public License v2.0
1.64k stars 459 forks source link

Debian Buster postfix default Froxlor configuration is not able to deliver mails #780

Closed OnlineArts closed 4 years ago

OnlineArts commented 4 years ago

Summary

Two fresh prepared Debian Buster machines show the same problem. After the Froxlor CLI configuration (postfix) mails can not be delivered, since warnings occur.

Only default parameters where used. I expected honestly, that the default parameters should be at least functional on Debian Buster.

According to the logs, postfix is not able to use the mysql socket, but its present and functional. MariaDB root password was added and tested, since Froxlor requires that. Unprivileged mysql user is able to access through localhost. Froxlor (php scripts) are able to run.

System information

Steps to reproduce

  1. Install Debian Buster +apache2 +php7.3 +libapache2-mod-php7.3 mariadb-server
  2. Setup apache2 for accessing Froxlor
  3. Setup mysql user and database for Froxlor
  4. Install Froxlor
  5. Use Froxlor CLI configration tool for setting up postfix etc.
  6. Send (test) mail over Froxlor or at any other place

Expected behavior

  1. Mails should be delivered

Actual behavior

  1. Mails are not deliverd
  2. Warnings appear in the mail logs.

Log files/log entries:

/var/log/mail.info

Dec 25 17:20:39 online-arts-center postfix/pickup[19302]: 89E5642ED9: uid=0 from=<root>
Dec 25 17:20:39 online-arts-center postfix/cleanup[26130]: warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
Dec 25 17:20:39 online-arts-center postfix/cleanup[26130]: warning: mysql:/etc/postfix/mysql-virtual_alias_maps.cf lookup error for "root@mail.online-arts-center.de"
Dec 25 17:20:39 online-arts-center postfix/cleanup[26130]: warning: 89E5642ED9: virtual_alias_maps map lookup problem for root@mail.online-arts-center.de -- message not accepted, try again later
d00p commented 4 years ago

Did you try using 127.0.0.1?

d00p commented 4 years ago

Honestly, I have never had any issues and I have set up quite a view froxlor installations...

OnlineArts commented 4 years ago

Hey, thank you for your fast response.

The configuration comes directly by Froxlor. I did not setup any sockets nor postfix nor any MTA settings manually.

Even that is strange:

$ grep -r --color sock /etc/postfix/
/etc/postfix/main.cf:# listen="/var/imap/socket/lmtp" prefork=0'' in cyrus.conf.
/etc/postfix/main.cf:#mailbox_transport = lmtp:unix:/var/imap/socket/lmtp
/etc/postfix/postfix-files:$manpage_directory/man5/socketmap_table.5.gz:f:root:-:644
/etc/postfix/main.cf.proto:# listen="/var/imap/socket/lmtp" prefork=0'' in cyrus.conf.
/etc/postfix/main.cf.proto:#mailbox_transport = lmtp:unix:/var/imap/socket/lmtp

Do you use Debian Buster? Which firewall policy do you follow (free for all)? Even that could not eliminate that problem. Or do I something obviously wrong?

Is it necessary to setup an email address in Froxlor before any mail can be delivered?

I could provide you as much information I have and would be glad to hear suggestions.

Would not be the first setup of software stacks, which does not run any more on a newer OS version.

Did you try using 127.0.0.1

The instance before yes, right now I'm trying localhost. Let's have a try: $ sed -i 's/localhost/127.0.0.1/g' /etc/postfix/mysql-virtual_*

What I did not try is to use apt for the Froxlor installation instead of the manual one.

d00p commented 4 years ago

Do you use Debian Buster?

Yes

Which firewall policy do you follow (free for all)?

Nothing special, all default

As said, fresh Debian, apt or tarball installation of froxlor, setting mysql root password, adjust settings in froxlor, configure services - all good.

OnlineArts commented 4 years ago

Hey,

which settings did you adjust in Froxlor (after the installation)? Is there something relevant for mail delivering?

$ mailq
9B2B6614B6     1417 Wed Dec 25 16:35:05  root
                                         root

A7912614B8     1177 Wed Dec 25 21:52:48  admin@online-arts-center.de
                                         ****@gmail.com

86A30614B3      923 Wed Dec 25 16:13:51  admin@online-arts-center.de
                                         admin@online-arts-center.de

C9D1A61095      911 Wed Dec 25 17:13:18  admin@online-arts-center.de
                                         root@online-arts-center.de

Nothing is going out, independently from the destination server.

Hmm SELECT * FROM mail_virtual AS v, panel_customers AS c WHERE c.customerid = v.customerid AND c.deactivated = 0 AND v.email = '%s'; Returns an empty result. I guess what should not happend

OnlineArts commented 4 years ago

By the way: Merry Christmas! :-)

Okay, progress is ahead. Looks like "Alternative E-Mail-Adresse benutzen" is the key player here. No permission problems have to be solved.

Dec 25 22:10:43 online-arts-center dovecot: lda(root)<29781><jlOwCFPQA15VdAAAGRjqyw>: Error: chdir(/root/) failed: Permission denied (euid=65534(nobody) egid=65534(nogroup) missing +x perm: /root, dir owned by 0:0 mode=0700)
d00p commented 4 years ago

Please use the Forum for support. But for your delivery to "root" - well you need to set a valid alias for root in your /etc/aliases file ;)

OnlineArts commented 4 years ago

it is, but its the host self :-D This looks like a "default" entry (admin@online-arts-center.de), derived from the first admin username.

Would be great if the "out-of-the-box" default would handle things like that. Even admins could like to use the same hosts ;-)