Skip to content

Commit f979fc3

Browse files
committed
When IMAP is run via the dovecot command, there is no need to login
1 parent c3d994c commit f979fc3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

mailbox/mailbox-lib.pl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,11 @@ sub list_folders
300300
$rv[0]->{'autouser'} = 1;
301301
}
302302

303+
# No need to prompt for a login if using the local dovecot command
304+
if ($imapserver eq "*") {
305+
$rv[0]->{'autouser'} = 1;
306+
}
307+
303308
# Get other IMAP folders (if we can)
304309
my ($ok, $ih) = &imap_login($rv[0]);
305310
if ($ok == 1) {
@@ -317,6 +322,7 @@ sub list_folders
317322
'server' => $imapserver,
318323
'user' => $rv[0]->{'user'},
319324
'pass' => $rv[0]->{'pass'},
325+
'autouser' => $rv[0]->{'autouser'},
320326
'mode' => 0,
321327
'remote' => 1,
322328
'flags' => 1,

0 commit comments

Comments
 (0)