folders and subfolders

Stephane Magnier steph.mag220 at netcourrier.com
Sat Jul 17 23:02:13 EEST 2021


Hi,

I've tried to work with the option NOT to get the INBOX, and to use "lmtp"

Email are stoill blocked into sendmail



Here is my _*sendmail config*_

define(`confLOCAL_MAILER', `local_lmtp')dnl
dnl ############################  FIN OPENDKIM ######
dnl ###### boost traitement ############"dnl
FEATURE(`access_db', `hash -T<TMPF> -o /etc/mail/access.db')dnl
dnl # define(`confCONNECTION_RATE_THROTTLE',2800)dnl
FEATURE(local_procmail, `', `procmail -t -Y -a $h -d $u')dnl
*FEATURE(`local_lmtp')*
MAILER(local)dnl
MAILER(smtp)dnl
MAILER(procmail)dnl
MAILER(dovecot)dnl   ->maybe totally useless if I declare : MAILER( local )


and my dovecot config

# 2.3.8 (9df20d2db): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.5.8 (b7b03ba2)
# OS: Linux 4.18.0-305.7.1.el8_4.x86_64 x86_64 CentOS Linux release 8.4.2105 xfs
# Hostname: mbox1.aztgrp.net
auth_mechanisms = plain login
auth_username_format = %u
default_vsz_limit = 4 G
listen = *
login_trusted_networks = 192.18.0.0/16 127.0.0.1 ::1
mail_access_groups = dovecot
mail_fsync = always
*mail_location = maildir:/var/spool3/mail/%u:LAYOUT=fs*
mail_plugins = " quota"
mail_privileged_group = mail
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date ihave
mbox_very_dirty_syncs = yes
mbox_write_locks = fcntl
mmap_disable = yes
namespace inbox {
   disabled = no
   ignore_on_failure = no
   inbox = yes
   list = yes
   location =
   mailbox Drafts {
     auto = subscribe
     special_use = \Drafts
   }
   mailbox Junk {
     auto = subscribe
     autoexpunge = 12 weeks
     special_use = \Junk
   }
   mailbox Sent {
     auto = subscribe
     special_use = \Sent
   }
   mailbox Trash {
     auto = no
     autoexpunge = 12 weeks
     special_use = \Trash
   }
   mailbox virtual/All {
     auto = no
     special_use = \All
   }
   prefix =
   subscriptions = yes
   type = private
}
passdb {
   driver = pam
}
plugin {
   quota_grace = 10%%
   quota_max_mail_size = 100M
   quota_rule = *:storage=10000M
   quota_rule2 = Trash:Storage=+100M
   quota_status_nouser = DUNNO
   quota_status_overquota = 552 5.2.2 Mailbox is full
   quota_status_success = DUNNO
   quota_warning = storage=95%% quota-warning 95 %u
   quota_warning2 = storage=80%% quota-warning 80 %u
   sieve = file:~/sieve;active=~/.dovecot.sieve
}
pop3_uidl_format = %v-%u
service auth {
   unix_listener auth-master {
     mode = 0666
   }
}
service dict {
   unix_listener dict {
     mode = 0600
     user = mail
   }
}
service imap-login {
   inet_listener imap {
     port = 0
   }
   inet_listener imaps {
     port = 993
     ssl = yes
   }
}
service lmtp {
   inet_listener lmtp {
     address = 127.0.0.1 ::1
     port = 24
   }
   unix_listener /var/run/lmtp {
     group = mail
     mode = 0660
     user = mail
   }
}
service pop3-login {
   inet_listener pop3 {
     address = *
     port = 110
   }
   inet_listener pop3s {
     port = 995
     ssl = yes
   }
}
service quota-warning {
   executable = script /usr/local/bin/quota-warning.sh
   unix_listener quota-warning {
     user = mail
   }
   user = dovecot
}
service submission {
   process_limit = 250
}
ssl = required
ssl_ca = </etc/mail/ssl/ssl1/STAR_qqq_net.ca-bundle
ssl_cert = </etc/mail/ssl/ssl1/STAR_qqq_net.crt
ssl_cipher_list = HIGH:!aNULL:!ADH:!DH:!RC4:!MD5:!RSA
ssl_dh = # hidden, use -P to show it
ssl_key = # hidden, use -P to show it
userdb {
   driver = passwd
}
verbose_proctitle = yes
protocol lmtp {
  *info_log_path = /var/log/dovecot-lmtp.log*
   mail_fsync = optimized
   mail_plugins = autocreate quota acl fts fts_solr zlib mail_log notify sieve
   postmaster_address = it at iqqq.com
}
protocol lda {
   mail_fsync = optimized
   mail_plugins = " quota sieve quota"
}
protocol imap {
   mail_max_userip_connections = 80
   mail_plugins = " quota quota imap_quota"
   ssl_cert = </etc/mail/ssl/ssl1/STAR_qqq_net.crt
   ssl_key = # hidden, use -P to show it
}
protocol pop3 {
   mail_max_userip_connections = 10
   mail_plugins = " quota"
}
protocol submission {
   mail_max_userip_connections = 10
   mail_plugins = " quota"
}


And my /var/log/dovecot-lmtp.log Jun 18 21:33:08 imap-login: Info: 
Login: user=<xxx>, method=PLAIN, rip=109.ss.ss.ss lip=192.18.3.226, 
mpid=13075, TLS, session=<fb67ZA/FutltvmZQ> Jun 18 21:35:41 imap-login: 
Info: Login: user=<xxx>, method=PLAIN, rip=109.ss.ss.ss, 
lip=192.18.3.226, mpid=14036, TLS, session=<o4zQbQ/FAuJtvmZQ> Jun 18 
21:38:43 imap(azt000)<14036><o4zQbQ/FAuJtvmZQ>: Info: *Server shutting 
down.* in=67 out=625 deleted=0 expunged=0 trashed=0 hdr_count=0 
hdr_bytes=0 body_count=0 body_bytes=0 Jun 18 21:38:43 
imap(azt000)<13075><fb67ZA/FutltvmZQ>: Info:*Server shutting down*. 
in=478 out=2094 deleted=0 expunged=0 trashed=0 hdr_count=0 hdr_bytes=0 
body_count=0 body_bytes=0

Le 16/07/2021 à 21:33, Stephane Magnier a écrit :
>
> hi,
>
> Orignially, I have :
>
> *mail_location = mbox:/var/spool2/mail/%u:INBOX=/var/spool/mail/%u* 
> that I change to : *mail_location = 
> maildir:/var/spool2/mail/%u:LAYOUT=fs:INBOX=/var/spool/mail/%u *
>
> The verdict..; This part : work fine for : *maildir:/var/spool2/mail/%u:*
>
> but does'n't work out correctly for  : *INBOX=/var/spool/mail/%u*
>
> 2 possibilities :
>
> 1) I've tried NOT to give access to Mail access on INBOX and I didn't 
> succeed in making it understand that I want my /var/spool/mail/%u to 
> move to the "MailDir" part...
>
> 2) I give access to the INBOX. I leave as it is... but the problem is 
> :Sendmail is using /var/spool/mail%u ( where %u *is a file* )  
> and*Dovecot who needs to get a folder *and to get %u/tmp ; %u/curl; 
> etc....
>
> So, that way this is incompatible..  what is wrong ??
>
> Please what should I do for this INBOX part ?
>
> Thanks
>
>
> Le 16/07/2021 à 15:54, Stephane Magnier a écrit :
>>
>> Hi,
>>
>> So, I tried to change mbox to maildir.. that sounds to be OK for the 
>> changes... I can create some folders and subfolders. The problem is 
>> that I cannot see any emails arriving into my mailbox
>>
>> I am using sendmail
>>
>> I choose the lmtp service for that and I have into Dovecot
>>
>> Maildir : mail_location = maildir:/var/spool3/mail/%u:LAYOUT=fs
>>
>>     service lmtp {
>>     unix_listener /var/spool/mail/dovecot-lmtp {
>>         mode = 0600
>>         user = mail
>>         group = mail
>>       }
>>       inet_listener lmtp {
>>         address = ::1, 127.0.0.1
>>
>>       }
>>     }
>>
>>
>> into *sendmail.mc*.. I have :
>>
>>   * FEATURE(`local_lmtp',`[IPC]',`FILE /var/spool/mail/dovecot-lmtp')dnl
>>
>> But if I add : Feature(dovecot) or Feature( local_lmtp)   it doesn't 
>> compile..
>>
>> m4:/etc/mail/sendmail.mc:154: cannot open `/usr/share/sendmail-cf/mailer/dovecot.m4': No such file or directory
>>
>> So, how can explain that any emails coming into /var/spool/mail has 
>> to be sent to Dovecot ??
>>
>> Thanks and regards
>>
>>
>> Le 16/07/2021 à 10:44, Aki Tuomi a écrit :
>>>> On 16/07/2021 11:41 Stephane Magnier<steph.mag220 at netcourrier.com>  wrote:
>>>>
>>>>
>>>> Hi,
>>>> Still looking for the way to create folders and sub folders..
>>>> Today, I am using "mbox", which apparently doesn't work for this ? correct ?
>>> mbox has very limited support for folders.
>>>
>>>> So, I would probably need to use maildir.. (https://doc.dovecot.org/configuration_manual/mail_location/Maildir/  ]
>>>> Today, what I am using is :mbox,which is gather all the mailboxes of user 1, user 2 in one folder... like : mbox:/var/spool2/mail/%u
>>>> 1) I suppose, that If I am using "mbox" with.. : LAYOUT=fs, I won't get these folders and subfolders ? - Correct ?
>>>>
>>>> 2) Instead of having : "maildir:~/Maildir " which, I suppose got eachuser folder into their own home directory .. correct ? Can I have : maildir:/var/spool2/mail/%u?
>>> yes.
>>>
>>>> ( I would prefer to gather all users' mailbox into one folder like /var/spool2/mail/ )
>>>> 3) if so, mbox:/var/spool2/mail/%u:INBOX=/var/spool/mail/%u => can become : maildir:/var/spool2/mail/%u:LAYOUT=fs:INBOX=/var/spool/mail/%u
>>>>
>>> yes. And while you're doing this, you might as well start using lda or lmtp and drop the INBOX parameter. There is no need to keep INBOX in /var/spool/mail/%u unless your users expect direct access?
>>>
>>>> What do you think ?... before trying and breaking everything :-)... if so, I will be killed
>>>>
>>>> Thanks and regards
>>>>
>>> Aki
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://dovecot.org/pipermail/dovecot/attachments/20210717/bdaba58e/attachment.html>


More information about the dovecot mailing list