mail client software: 553

If POP3 authorization is enabled in Plesk, then you may authorize with POP3 (simply check for new mail) to the server first, then you will be able to send mail within “POP3 lock time” that is set at Server > Mail page in Plesk CP.

If you get the bounce message with such error when send mail to a domain hosted on the Plesk server, then make sure that the Mail service for this domain is enabled and the domain name is listed in $QMAIL_ROOT_D/control/virtualdomains and $QMAIL_ROOT_D/control/rcpthosts files.
If not, use $PRODUCT_ROOT_D/admin/sbin/mchk utility to rebuild Qmail configuration.

Rebuild qmail configuration with help of $PRODUCT_ROOT_D/admin/sbin/mchk utility.

How do I block individual email accounts from sending mail to the server?

This can be done by adding the account to the badmailfrom file located in the /usr/local/psa/qmail/control/ directory for the standard build and /var/qmail/control/ directory for the RPM build.

This can be done by running the following command:

$QMAIL_ROOT_DIR/bin/qmail-qstat

For example:

/var/qmail/bin/qmail-qstat

flushing qmail queue

If you send ALRM signal to the qmail-send process, qmail will try again to process all messages in queue immediately.

# ps ax | grep qmail-send

# kill -ALRM <pid_number>

You should set domain MX record to point to an external mail server. Set a high priority for it. In the domains mail section click ON/OFF button to turn the domain’s mail service off.

Note:
Since the remote mailserver functionality is not supported by PSA
5 all instances of that domain must be removed from the virtualdomains and rcpthosts files located in the /usr/local/psa/qmail/control/ directory. These files are located in the /var/qmail/control/ directory for the RPM build. Once the changes have been made qmail needs to be stopped then started.

rebuild qmail`s queue if it is damaged or consists of a lot of spam messages?

This instruction is written for RPM-based systems (RedHat, Fedora, CentOS, etc…).

Please perform the following steps to recreate Qmail`s queue.

Attention!

All current messages will be removed from the queue in this case and cannot be restored.

1. Stop Qmail and xinetd.

/etc/init.d/qmail stop
/etc/init.d/xinetd stop

2. Move current queue to another location.

mv /var/qmail/queue /var/qmail/queue_old

3 Reinstall ‘psa-qmail’ RPM to recreate qmail queue structure with the command like:

rpm -Uvh –force psa-qmail….

4.(Optional).Reinstall drweb-qmail RPM if you use DrWeb antivirus feature which comes with Plesk.

rpm -Uvh –force drweb-qmail….

5.Start Qmail and xinetd:

/etc/init.d/qmail start
/etc/init.d/xinetd start
Note: you should get the both psa-qmail and drweb-qmail RPMs from the same Plesk version distributive which is installed on the server.
You can obtain current psa-qmail, drweb-qmail RPMs and Plesk build versions by running the following commands on Linux systems:

rpm -q psa-qmail
rpm -q drweb-qmail
rpm -q psa

qmail maillog

If so, try to start it from the command line:

/etc/init.d/qmail start

If it doesn’t help, take a look at the /usr/local/psa/var/log/maillog logfile for any error messages.

The following error occurs: “PERM_FAILURE: SMTP Error (state 13): 554 mail server permanently rejected message (#5.3.0)”

RESOLUTION:

This is a kind of permission error. Please check /usr/local/psa/var/log/maillog for errors. It usually happens when there are incorrect permissions on qmail binary files, like:

# ls -l /var/qmail/bin/qmail-queue*
-r-xr-xr-x 1 drweb qmail 158268 Aug 16 11:08 /var/qmail/bin/qmail-queue
-r-xr-xr-x 1 root qmail 158268 Sep 13 2004 /var/qmail/bin/qmail-queue.drweb
-r-xr-xr-x 1 root qmail 12044 Aug 17 13:57 /var/qmail/bin/qmail-queue.origin

But the permissions must be:

# ls -la /var/qmail/bin/qmail-queue*
-r-s–x–x 1 drweb qmail 161024 Oct 11 13:31 /var/qmail/bin/qmail-queue
-r-s–x–x 1 drweb qmail 161024 Oct 11 13:31 /var/qmail/bin/qmail-queue.drweb
-r-s–x–x 1 qmailq qmail 16012 Aug 24 13:21 /var/qmail/bin/qmail-queue.origin

Otherwise, files in the qmail queue are created with wrong permissions and qmail can’t write to drweb temp directory.

Also, fix permissions on the queue files with the following command:

for i in /var/qmail/queue/mess/*; do chown qmailq:qmail $i/*;done

How do I repair/rebuild all Qmail configuration files and restore settings for all mailboxes?

It can be done with Plesk mchk utility which is located in:

$PRODUCT_ROOT_D/admin/bin/mchk

Synopsis:
mchk [OPTION]
–without-spam – restore all settings except for SpamAssassin configuration
–with-spam – restore all settings
–spam-only – restore only SpamAssassin settings

This utility rebuilds in line with Plesk database Qmail control files
in  the /var/qmail/control, /var/qmail/users directories and mail users’ settings. Also, it sets proper ownership/permissions for all mailboxes (/var/qmail/mailnames/*).

Example:

# /usr/local/psa/admin/bin/mchk –with-spam

/sbin/ip route
192.168.50.0/24 dev eth1 proto kernel scope link src 192.168.50.53
169.254.0.0/16 dev eth1 scope link
default via 192.168.50.254 dev eth1

If no ’src’ listed in ‘ip’ output for default route, then main IP on
the interface is used for an outgoing connections. You can change it
using:

# /sbin/ip route change default via 192.168.50.254 dev eth1 src 192.168.50.100