Outgoing webmail bypassing Postfix set relayhost

Refers to:

  • Plesk for Linux
  • Plesk 11.0 for Linux
  • Plesk 11.5 for Linux

Created:

2016-11-16 13:23:27 UTC

Modified:

2016-12-21 20:36:37 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Outgoing webmail bypassing Postfix set relayhost

Symptoms

Outgoing mail from Horde webmail bypasses PostFix 'relayhost' configuration directive.If symlink /usr/sbin/sendmail points to /var/qmail/bin/sendmail then check for solution (1), otherwise go to resolution (2)

]# ls -la /usr/sbin/sendmail
lrwxrwxrwx 1 root root 21 Jun 29 02:46 /usr/sbin/sendmail -> /etc/alternatives/mta

]# ls -la /etc/alternatives/mta
0 lrwxrwxrwx 1 root root 23 Jun 29 02:46 /etc/alternatives/mta -> /var/qmail/bin/sendmail

Resolution

(1)

]# rm /etc/alternatives/mta
]# ln -s /usr/sbin/sendmail.postfix /etc/alternatives/mta

(2)

Edit /etc/psa-webmail/horde/horde/conf.php

Comment or remove within section $conf['mailer'] these strings:

if (ini_get("safe_mode") == "1") { // Safe mode in action
} else {
$conf['mailer']['params']['sendmail_path'] = '/usr/sbin/sendmail';
$conf['mailer']['params']['sendmail_args'] = '-oi';
$conf['mailer']['type'] = 'sendmail';
}

So it should looks as the provided below:

// if (ini_get("safe_mode") == "1") { // Safe mode in action
$conf['mailer']['params']['host'] = '127.0.0.1';
$conf['mailer']['params']['port'] = 25;
$conf['mailer']['params']['auth'] = false;
$conf['mailer']['type'] = 'smtp';
/*
} else {
$conf['mailer']['params']['sendmail_path'] = '/usr/sbin/sendmail';
$conf['mailer']['params']['sendmail_args'] = '-oi';
$conf['mailer']['type'] = 'sendmail';
}
*/

Cause

Horde is executing sendmail to send mail created via web form. Usually ' sendmail ' is a symlink to 'postfix' or 'qmail' alternatives for sendmail. And this link is broken or points to incorrect Plesk MTA.

Have more questions? Submit a request
Please sign in to leave a comment.