toteph42 / identy_switch

This plugin allows users to switch between different accounts (and check for new mails) in a single Roundcube session.
GNU General Public License v3.0
7 stars 4 forks source link

Main account SMTP error #20

Closed HostOncilla closed 3 months ago

HostOncilla commented 3 months ago

SMTP comes up with a sending error when trying to send from main account.

toteph42 commented 3 months ago

Add // Log sent messages to <log_dir>/sendmail.log or to syslog $config['smtp_log'] = true;

// Log SMTP conversation to <log_dir>/smtp or to syslog $config['smtp_debug'] = true;

to your config.inc.php. Then you should see what's going wrong. Add results to this post and I'll check if I can help.

HostOncilla commented 3 months ago

If the plugin is enabled I get the following log in smtp.log

Connecting to tls://%h:587...

But if the plugin isn't enabled I get the following log

tls://mail.mydomain.co.uk:587...

I think it's because it's not getting the SMTP settings from roundcube config for the main email address and instead it's trying to get it from the plugin config file.

toteph42 commented 3 months ago

Do you use %h in ident_switch/config.inc.php? Plugin does not support any substitution characters. It only swaps data...

HostOncilla commented 3 months ago

No I don't, it's getting the %h from config/config.inc.php

This is my config file under plugins/identy_switch/config.inc.php

$config['identy_switch.config'] = [
    '*' => [
        'imap' => 'ssl://mail.*:993',
        'delimiter' => '.',
        'user' => 'email',
        'smtp' => 'tls://mail.*:587',
    ],

    'logging'   => false,
    'check'     => true,
    'interval'  => 300,
    'retries'   => 10,
    'debug'     => false,
];

Just to be clear, it sends emails if I have switched to any of the identities under the plugins/identy_switch/config.inc.php, it only fails to send an email if I'm on the main/default identity that is not configured under plugins/identy_switch/config.inc.php. My guess is that for the main/default identity it's getting the information from config/config.inc.php and some how itenty_swich plugin isn't letting %h to be properly converted as it's meant to.

toteph42 commented 3 months ago

Fixed in 1.0.28