• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Qmail configuration

M

mirage

Guest
Ok, so I'm officially going bonkers.... Searched hi and lo... but without success.

I keep getting the infamous triple bounce from qmail.

My hostname is alderaan.innernine.com.

The domain innernine.com is hosted on that machine.

But mail is hosted elsewhere. In fact I'm not hosting any mail on this Plesk server at all. All turned off. But I'm sending mail from websites, etc.

In the maillog, I can see that the system is trying to send to three email addresses in succession - over and over and over again:

1. [email protected]
2. [email protected]
3. [email protected]



What I want to simply forward those messages to another account. So I tried to set this up in the alias files and even the user control files for root

cat /var/qmail/alias/.qmail-anonymous
[email protected]

cat /var/qmail/alias/.qmail-drweb-daemon
[email protected]

cat /var/qmail/alias/.qmail-mailer-daemon
[email protected]

cat /var/qmail/alias/.qmail-postmaster
[email protected]

cat /var/qmail/alias/.qmail-root
[email protected]

cat /var/qmail/alias/.qmail-root
[email protected]


And for the root user:

cat ~/.forward
[email protected]

cat ~/.qmail
[email protected]

As mail is disabled for all hosted domain my rcpthosts file is empty.

Where else can I look?

Here is that log section that repeats over and over:
Feb 1 14:02:01 alderaan qmail-queue-handlers[24273]: Handlers Filter before-queue for qmail started ...
Feb 1 14:02:01 alderaan qmail-queue-handlers[24273]: [email protected]
Feb 1 14:02:01 alderaan qmail-queue-handlers[24273]: [email protected]
Feb 1 14:02:01 alderaan qmail-queue-handlers[24273]: hook_dir = '/usr/local/psa/handlers/before-queue'
Feb 1 14:02:01 alderaan qmail-queue-handlers[24273]: recipient[3] = '[email protected]'
Feb 1 14:02:01 alderaan qmail-queue-handlers[24273]: handlers dir = '/usr/local/psa/handlers/before-queue/recipient/[email protected]'
Feb 1 14:02:01 alderaan qmail-queue-handlers[24273]: starter: submitter[24274] exited normally
Feb 1 14:02:01 alderaan qmail: 1233518521.180533 new msg 163728620
Feb 1 14:02:01 alderaan qmail: 1233518521.180612 info msg 163728620: bytes 727 from <[email protected]> qp 24274 uid 10034
Feb 1 14:02:01 alderaan qmail: 1233518521.184077 starting delivery 22: msg 163728620 to local [email protected]
Feb 1 14:02:01 alderaan qmail: 1233518521.184186 status: local 1/10 remote 0/20
Feb 1 14:02:01 alderaan qmail-local-handlers[24276]: Handlers Filter before-local for qmail started ...
Feb 1 14:02:01 alderaan qmail-local-handlers[24276]: cannot create temporary file - (13) Permission denied
Feb 1 14:02:01 alderaan qmail-local-handlers[24276]: cannot read message from stdin
Feb 1 14:02:01 alderaan qmail: 1233518521.188944 delivery 22: failure:
Feb 1 14:02:01 alderaan qmail: 1233518521.189186 status: local 0/10 remote 0/20
Feb 1 14:02:01 alderaan qmail-queue-handlers[24278]: Handlers Filter before-queue for qmail started ...
Feb 1 14:02:01 alderaan qmail-queue-handlers[24278]: from=
Feb 1 14:02:01 alderaan qmail-queue-handlers[24278]: [email protected]
Feb 1 14:02:01 alderaan qmail-queue-handlers[24278]: hook_dir = '/usr/local/psa/handlers/before-queue'
Feb 1 14:02:01 alderaan qmail-queue-handlers[24278]: recipient[3] = '[email protected]'
Feb 1 14:02:01 alderaan qmail-queue-handlers[24278]: handlers dir = '/usr/local/psa/handlers/before-queue/recipient/[email protected]'
Feb 1 14:02:01 alderaan qmail-queue-handlers[24278]: starter: submitter[24279] exited normally
Feb 1 14:02:01 alderaan qmail: 1233518521.198984 bounce msg 163728620 qp 24278
Feb 1 14:02:01 alderaan qmail: 1233518521.199051 end msg 163728620
Feb 1 14:02:01 alderaan qmail: 1233518521.200010 new msg 163728714
Feb 1 14:02:01 alderaan qmail: 1233518521.200074 info msg 163728714: bytes 1269 from <> qp 24279 uid 2522
Feb 1 14:02:01 alderaan qmail: 1233518521.204616 starting delivery 23: msg 163728714 to local [email protected]
Feb 1 14:02:01 alderaan qmail: 1233518521.204735 status: local 1/10 remote 0/20
Feb 1 14:02:01 alderaan qmail-local-handlers[24280]: Handlers Filter before-local for qmail started ...
Feb 1 14:02:01 alderaan qmail-local-handlers[24280]: cannot create temporary file - (13) Permission denied
Feb 1 14:02:01 alderaan qmail-local-handlers[24280]: cannot read message from stdin
Feb 1 14:02:01 alderaan qmail: 1233518521.209177 delivery 23: failure:
Feb 1 14:02:01 alderaan qmail: 1233518521.209262 status: local 0/10 remote 0/20
Feb 1 14:02:01 alderaan qmail-queue-handlers[24282]: Handlers Filter before-queue for qmail started ...
Feb 1 14:02:01 alderaan qmail-queue-handlers[24282]: from=#@[]
Feb 1 14:02:01 alderaan qmail-queue-handlers[24282]: [email protected]
Feb 1 14:02:01 alderaan qmail-queue-handlers[24282]: hook_dir = '/usr/local/psa/handlers/before-queue'
Feb 1 14:02:01 alderaan qmail-queue-handlers[24282]: recipient[3] = '[email protected]'
Feb 1 14:02:01 alderaan qmail-queue-handlers[24282]: handlers dir = '/usr/local/psa/handlers/before-queue/recipient/[email protected]'
Feb 1 14:02:01 alderaan qmail-queue-handlers[24282]: starter: submitter[24283] exited normally
Feb 1 14:02:01 alderaan qmail: 1233518521.355942 bounce msg 163728714 qp 24282
Feb 1 14:02:01 alderaan qmail: 1233518521.356065 end msg 163728714
Feb 1 14:02:01 alderaan qmail: 1233518521.356594 new msg 163728706
Feb 1 14:02:01 alderaan qmail: 1233518521.356763 info msg 163728706: bytes 1715 from <#@[]> qp 24283 uid 2522
Feb 1 14:02:01 alderaan qmail: 1233518521.360221 starting delivery 24: msg 163728706 to local [email protected]
Feb 1 14:02:01 alderaan qmail: 1233518521.360750 status: local 1/10 remote 0/20
Feb 1 14:02:01 alderaan qmail-local-handlers[24294]: Handlers Filter before-local for qmail started ...
Feb 1 14:02:01 alderaan qmail-local-handlers[24294]: cannot create temporary file - (13) Permission denied
Feb 1 14:02:01 alderaan qmail-local-handlers[24294]: cannot read message from stdin
Feb 1 14:02:01 alderaan qmail: 1233518521.365661 delivery 24: failure:
Feb 1 14:02:01 alderaan qmail: 1233518521.365909 status: local 0/10 remote 0/20
Feb 1 14:02:01 alderaan qmail: 1233518521.366028 triple bounce: discarding bounce/163728706
Feb 1 14:02:01 alderaan qmail: 1233518521.366094 end msg 163728706

I'm sure that you guys have seen this before. I don't know why it's failing to create a temporary file - much less do I have a clue 'where' this file fails to create, ergo I can't verify permission issues.



Oh and also - just trying to tackle all this: When trying to change the hostname in the Plesk Control Panel - it always reports an error - regardless of what I change it to (i.e. it doesn't matter whether I have an A record for the hostname or not):

Error: Incorrect DNS record values were specified.

Interestingly enough - It does change the hostname in the control panel regardless of the error. But checking 'hostname' in the shell, it's still the same. So I'm pretty sure this is just a bug. I host a lot of DNS on this machine and it's all working hunky dory.

Finally:
Why is it that when I add a domain alias to a domain with Mail Service enabled it's added to the qmail rcpthost file, but when I create a subdomain, then it's not? Sounds again like a bug to me.

Any takers?

My system is running fine, but it just bugs the living daylights out of me that a) Something is not working right and logs are bleeding with this error and b) I seem to have no control over fixing it? What good is Plesk then?

Thanks for any help,
Juergen
 
Hello Juergen,

I had a similar problem. Plesk is doing some weird configuration, but I managed to get hold of it. The permission denied is because of /opt/psa/handlers/spool cannot be accessed. As 0777 isn't a solution, (my support gave me that advice!???!) I changed the ownership of /var/qmail/bin/qmail-local to that of /var/qmail/bin/qmail-remote (i.e. mhandlers-user.popuser along with chmod g+s and g-r,o-r.
That did it for me, and also gives me a hint on how to add additional handlers to qmail.

Hope I am not to late with the answer.

Regards Johannes
 
Hello Juergen,

I had a similar problem. Plesk is doing some weird configuration, but I managed to get hold of it. The permission denied is because of /opt/psa/handlers/spool cannot be accessed. As 0777 isn't a solution, (my support gave me that advice!???!) I changed the ownership of /var/qmail/bin/qmail-local to that of /var/qmail/bin/qmail-remote (i.e. mhandlers-user.popuser along with chmod g+s and g-r,o-r.
That did it for me, and also gives me a hint on how to add additional handlers to qmail.

Hope I am not to late with the answer.

Regards Johannes

Thanks Johannes this fix worked for me. :) I'd like to know what might of caused it though...

DM.
 
Hello!

Im facing the same problem.

But when i try this solution i start receiving a lot of mails in my administration mail, all mails from daemons (mailer daemon, drweb mailer daemon, cron daemon).

How can i solve both issues?


Thanks in advance,
Gustavo.
 
Note that the solution posted by Johannes Frank is only a solution for the "permission denied" problem.
The famous triple bounce then becomes sending a lot of mails to the postmaster and daemon mail adresses.

There you also have the solution for the problem .....

From what i can see in your posts, you all have separate mailadresses for the postmaster etc. adresses, defined as normal adresses in a domain.

However, qmail has some alias for these mailadresses and sends them to the administrator account. These do not belong to a domain and are, therefore, not checked by drweb and spamassassin.

So, when using existing mailadresses, checked by drweb and spamassassin, the results are again being send to the postmaster etc adresses and again (depending on your drweb and spam settings) the corresponding outgoing and incoming mails are being checked, with the check results again being send to the postmaster etc adresses.

And so on, naturally. And that is exactly the loop you are encountering, resulting in many mails for the daemons and postmaster.

Simple resolution (read below before implementing the solution): simply discard the postmaster and other adresses on the domain you used for these mailadresses.

Advanced solutions:

NOTE: depends on what you want. I need some feedback from you, the reader.
NOTE: the infamous triple bounce and multiple daemon mails often are caused by other configuration problems. Be aware of that and first try to find a good simple setup, before implementing these advanced solutions.

A - Simplest scenario:keeping mailboxes for postmaster etc. on <domain>.tld

Steps:
1 Go to directory /var/qmail/alias
2 Change the line in the (for example) .qmail-anonymous file to &anonymous@<domain>.tld
3 Save
4 Repeat for every .qmail-* file (as desired)
5 Check the existing and proper working of the mailadresses anonymous@<domain>.tld etc.
6 Restart qmail with the command: service qmail restart

NOTE: if you have a problem with configuration of qmail, then the above mentioned solution is not giving you any end solution. It merely gives you the possibility to receive the postmaster etc. mails in a separate mailbox and not being bothered by the vast amount of mails on other mailadresses.

B - Scenario: changing file /var/qmail/me

Still to come, still testing

C - Scenario: changing file /var/qmail/locals

Still to come, still testing.
 
Juergen,

Some strange things in your post:

A You state:
"Why is it that when I add a domain alias to a domain with Mail Service enabled it's added to the qmail rcpthost file, but when I create a subdomain, then it's not? Sounds again like a bug to me."

It is not a bug. Plesk does not allow the creation of mailadresses on subdomains, to my knowledge. That to me is a shortcoming, not a bug.

Since there are no mailadresses on subdomains, there will also be no need to change the /var/qmail/locals or /var/qmail/rcpthosts.

Im a not sure whether 8.6.x allowed for mails on subdomains, but if so, it is a shame that it has been discarded.

However, a work around, if you want to create mailboxes on subdomains:

Method 1: Creation of domain with <subdomainname>.<domain>.tld

This is straight forward, be sure that you create a domain in the normal fashion and that you leave the "www" checkbox unchecked.

Creation of mailadresses is then possible and these will be handled as if the subdomain is a domain.

Advantage: full control, a lot of possibilities and full control by means of Plesk Control Panel
Disadvantage: takes up one domain

NOTE: It is fairly easy to create mailboxes etc. in qmail by using command line programming. However, the simplest method involves work that is automated by Plesk in the method above. So why bother?

B - You state:
"My system is running fine, but it just bugs the living daylights out of me that a) Something is not working right and logs are bleeding with this error and b) I seem to have no control over fixing it? What good is Plesk then?"

Something is not working fine due to a (in my opinion) a bug. Plesk installs without the right ownership for qmail-local. Change that according to the post of Johannes Frank and one of the failures in your log disappears.

C - Another implicit issue
Your post does state another implicit problem, being the cause of more than one errors.

After all, the triple bounce is the result of two causes: a triple sending of mails and a triple bounce.

The bounce is the result of the "permission problem" and that can be resolved by the post of Johannes Frank.

The sending problem is the result of the configuration itself, which is not optimal.

Your hostname represents the format <subdomainname>.<domain>.tld. Your root- postmaster- etc mailadresses are hosted as if they are on a subdomain and are hence checked over and over again.

This causes a notorious loop, with the length of the loop depending on drweb and spamassassin settings.

NOTE: same applies if your hostname is composed of <servershortname>.<serverdomain>.tld or something similar.

Somehow, this "loop problem" should be resolved by tweeking /var/qmail/control/me and /var/qmail/control/locals, but i did not find it out yet.

Hope to present you with a result as soon as possible.

Remark: also note the other post of mine
 
This fix did not work for me.

I am still getting errors:


Jun 1 15:01:33 mydomain qmail: 1338588093.228984 warning: trouble injecting bounce message, will try later
Jun 1 15:01:33 mydomain qmail-queue-handlers[23601]: Handlers Filter before-queue for qmail started ...
Jun 1 15:01:33 mydomain qmail-queue-handlers[23601]: cannot create temporary file - (13) Permission denied
Jun 1 15:01:33 mydomain qmail-queue-handlers[23601]: cannot read message from stdin

over and over.
 
DeaneM,

In your post, you refer to ´this fix´ and that is not a clear (explicit) reference.

The log information posted is suggesting that you should have a look at the permissions and set them properly.

NOTE: the permission problem should be resolved in later versions of Plesk 9.x, so what version do you use?

The log information posted is not enough to hint where the permission problem exactly occurs.

NOTE: The permission problem is a general problem, but the resolution thereof requires different steps in the unusual case, that can occur more often with qmail than we should expect. That is, changing file permissions for files handling the qmail process requires some consideration. Moreover, a file permission issue with specific handler files can hint that other issues with the qmail configuration can be present and should be resolved.

In short, please provide me with more information, starting with more elaborate log information.

NOTE: it can be wise to recreate the error by sending a (or the) mail that is causing the problem.

It is likely that your problem can be resolved relatively easy, given elaborate log information.

Kind regards
 
Back
Top