On Tue, 9 Oct 2018 12:08:00 +0200 Sami Ketola <sami.ketola at dovecot.fi> wrote:> How do you deliver then mails to the server? > > also mbox is very unoptimised mailbox format for this. Each time mail is deleted from mbox mailbox the whole mbox while needs to be rewritten to remove the mail.OpenSMTPD and Dovecot run on the same machine. OpenSMTPD receives incoming mails and stores them in a mailbox (/var/spool/mail/user). Dovecot then fetches mails from this mailbox file. Mailbox file is indeed very unoptimal, but at this moment I'm more curious about the reason why I can't expunge mails... perhaps it'd simpler with maildir, where it just means a simple file deletion. -- Selmeci Tam?s http://www.486.hu/
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tue, 9 Oct 2018, Selmeci Tam?s wrote:> On Tue, 9 Oct 2018 12:08:00 +0200 Sami Ketola <sami.ketola at dovecot.fi> > wrote: > >> How do you deliver then mails to the server? >> >> also mbox is very unoptimised mailbox format for this. Each time mail is deleted from mbox mailbox the whole mbox while needs to be rewritten to remove the mail. > > OpenSMTPD and Dovecot run on the same machine. OpenSMTPD receives > incoming mails and stores them in a mailbox (/var/spool/mail/user). > Dovecot then fetches mails from this mailbox file. > > Mailbox file is indeed very unoptimal, but at this moment I'm more > curious about the reason why I can't expunge mails... perhaps it'd > simpler with maildir, where it just means a simple file deletion.try out pure IMAP via telnet: https://wiki2.dovecot.org/TestInstallation?highlight=(telnet)#Check_out_some_other_IMAP_commands telnet server 143 1 login user pwd 2 select inbox 4 CREATE Trash 5 COPY 1 Trash 3 STORE 1 +FLAGS \Deleted 4 EXPUNGE Try with another mailbox, 7 select Trash 3 STORE 1 +FLAGS \Deleted 4 EXPUNGE - -- Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEVAwUBW7ywrsQnQQNheMxiAQJKNgf/SqbCxUHv7Ga6COtUVeFxv51e5YGBJzrE IDjD1bG/DAweaYDkWG+sJvwihpcYU7LRIX7nGGx7LiCOuFatWoQ2r/yIh1FSnMny SBjRdaDP/V+JaM3t+wAQ8AS8ObLi3RSy5GXrSbQvxrXzillVC6lKl37jQ4vbxevm MEazFDFubV9OSVs1n8oAUdKTvQVFL19xc2PYn8jkxXZMtED8a9Z7EAlwXFIbCQ/M WMkRE2G2WFy5sxchEgxDdrXwHnr7fe6mIEm1fyp+1ed6NytDNEwXDCryh0PmR5p5 XT95amjqRlCc3YVB+Q3R8W5AcrG9/bWfaPTglA3o3MBR8iH7xkbQPg==znSD -----END PGP SIGNATURE-----
On Tue, 2018-10-09 at 15:30 +0200, Selmeci Tam?s wrote:> On Tue, 9 Oct 2018 12:08:00 +0200 Sami Ketola <sami.ketola at dovecot.fi > > wrote: > > > How do you deliver then mails to the server?? > >> > OpenSMTPD and Dovecot run on the same machine. OpenSMTPD receives > incoming mails and stores them in a mailbox (/var/spool/mail/user). > Dovecot then fetches mails from this mailbox file. >Regarding locks, OpenSMTPD's config should match methods AND order of dovecot's mbox_write_locks.? Methods known by dovecot are dotlock, flock, fcntl and lockf. I couldn't find out, which methods are used by OpenSMTPD. Dovecot's mbox_read_locks should match too, but dotlock isn't used. https://wiki.dovecot.org/MailLocation/mbox https://wiki.dovecot.org/MboxLocking https://wiki.dovecot.org/MailboxFormat/mbox Martin
> On 09 October 2018 at 17:18 Martin Johannes Dauser <mdauser at cs.sbg.ac.at> wrote: > > > On Tue, 2018-10-09 at 15:30 +0200, Selmeci Tam?s wrote: > > On Tue, 9 Oct 2018 12:08:00 +0200 Sami Ketola <sami.ketola at dovecot.fi > > > wrote: > > > > > How do you deliver then mails to the server?? > > > > > > > > OpenSMTPD and Dovecot run on the same machine. OpenSMTPD receives > > incoming mails and stores them in a mailbox (/var/spool/mail/user). > > Dovecot then fetches mails from this mailbox file. > > > > Regarding locks, OpenSMTPD's config should match methods AND order of > dovecot's mbox_write_locks.? > > Methods known by dovecot are dotlock, flock, fcntl and lockf. I > couldn't find out, which methods are used by OpenSMTPD. > > Dovecot's mbox_read_locks should match too, but dotlock isn't used. > > https://wiki.dovecot.org/MailLocation/mbox > https://wiki.dovecot.org/MboxLocking > https://wiki.dovecot.org/MailboxFormat/mbox > > MartinYou could use LMTP instead of direct delivery, too. Aki
On Tue, 9 Oct 2018 15:44:14 +0200 (CEST) Steffen Kaiser <skdovecot at inf.h-brs.de> wrote:> try out pure IMAP via telnet: > > telnet server 143 > 1 login user pwd > 2 select inbox > 4 CREATE Trash > 5 COPY 1 Trash > 3 STORE 1 +FLAGS \Deleted > 4 EXPUNGEHere's the output: * OK [CAPABILITY IMAP4rev1 SASL-IR LOGIN-REFERRALS ID ENABLE IDLE LITERAL+ AUTH=PLAIN AUTH=LOGIN] Dovecot ready. 1 login 1 BAD Error in IMAP command received by server. 1 login user pass 1 OK [CAPABILITY IMAP4rev1 SASL-IR LOGIN-REFERRALS ID ENABLE IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS THREAD=ORDEREDSUBJECT MULTIAPPEND URL-PARTIAL CATENATE UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS BINARY MOVE SNIPPET=FUZZY LITERAL+ NOTIFY SPECIAL-USE] Logged in 2 select inbox * FLAGS (\Answered \Flagged \Deleted \Seen \Draft $MDNSent $Forwarded $label1 $Labelimportant receipt-handled NonJunk $label5 $label2 $label3 $label4 $has_cal) * OK [PERMANENTFLAGS ()] Read-only mailbox. * 1995 EXISTS * 0 RECENT * OK [UNSEEN 1971] First unseen. * OK [UIDVALIDITY 1250421210] UIDs valid * OK [UIDNEXT 25219] Predicted next UID 2 OK [READ-ONLY] Select completed (0.016 + 0.000 + 0.017 secs). 4 create Trash 4 NO [ALREADYEXISTS] Mailbox already exists (0.006 + 0.000 + 0.006 secs). 5 Copy 1 Trash 5 OK [COPYUID 1 4067 17246] Copy completed (0.020 + 0.000 + 0.019 secs). 3 STORE 1 +FLAGS \Deleted * 1 FETCH (FLAGS (\Deleted \Seen)) 3 OK Store completed (0.003 + 0.000 + 0.002 secs). 4 expunge 4 OK Expunge completed (0.001 + 0.000 secs). ---------------------- The answer to "2 select inbox" contains "Read-only mailbox", it's suspicious to me... -- Selmeci Tam?s http://www.486.hu/