• 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

Limiting "failure notice" bounce messages in the remote queue

M

mandrich

Guest
Hello,

I would like to limit bounce messages in order to keep the remote queue to a minimum. I understand the Plesk's qmail install is modified, so patch programs like checkusr won't work. I'd like to set it so that message injected into the server for invalid domains don't produce a failure message. What tools can I use with Plesk to achieve this?

Thanks,

Mark
 
If I understand your question correctly, you want to eliminate bounce/failure messages for invalid domains and/or non existent email addresses. The way I accomplished this is to create an email address ( I created [email protected] ) but I did NOT enable the mailbox for this address. Then I set failure/bounce/reject notices to be forwarded to this email address. Since there is not a mailbox for this address, the email disappears into a "black hole" and will not build up in the local or remote queue.
 
Thanks for the reply! I see how to set this on the domain level, but don't see how to set this on the server level under Server -> Mail -> Preferences. Am I missing something?

Thanks again,

Mark
 
Unfortunately, you cannot set this at the "server level". You would set this in the domain templates, then whenever a domain account is created, it would be there. For domains already on your server, you will have to manually set this for each. Unfortunate and time comsuming if you have a lot of domain accounts I know, but worth it.
 
To make this faster you can go into the mysql database and run a few queries.

I recently ran this thinking it would help:

UPDATE Parameters SET value='reject' where parameter='nonexist_mail';

but next I'm going to use the command line tools to script the creation of [email protected] and run:

UPDATE Parameters SET value='catch' where parameter='nonexist_mail';

But the fun part will be setting the e-mail address for the bounce. Once I figure this out I'll post the shortcut so that you don't have to manually set it for several hundred domains.

The 4-5 clicks per site adds up quickly.
 
I don't think there's going to be an easy way to do a query to set the bounce to forward address unfortunately. The Parameter id's do not match domain ids.

You can still however create the bounce addresses using the command line tools.

You can do this by running /opt/psa/bin/mail.sh -c [email protected]

You can get a domain list from the psa database by running "select name from domains;"

This will give you just a domain list and allow you to clean it up for easier mail creation.

Hope this helps
 
Had some help here where I work...

But here are the queries that will help you to update every single domain's mail parameters to catch them at a [email protected] per site. So as long as you create a [email protected] address for each domain using the client command line tools you're set.


update Parameters, domains, DomainServices
set
Parameters.value=concat('bounce@',domains.name)
where
domains.id=DomainServices.dom_id
and
DomainServices.parameters_id=Parameters.id
and
Parameters.parameter='catch_addr';

UPDATE Parameters SET value='catch' where parameter='nonexist_mail';
 
Again to clarify. Use the above script at your own risk. Only do it if you know what you're doing and have performed a backup prior to running the script.

That script will work for every single domain on your box.

You can verify that it works by running the following query before and afterwards:

select * from Parameters where parameter='catch_addr';

or a slightly more indepth script of:

select p.id, d.name, p.parameter, p.value
from domains d, DomainServices ds, Parameters p
where d.id=ds.dom_id and
ds.parameters_id=p.id and
p.parameter='catch_addr'
;
 
Back
Top