Re: "MitM" account to bypass quota
Please can you reply to list rather than directly do me?
I just know of the tool and not how to use it. It doesn't look like it supports continually running it in the background, but you can always put it in a loop in a shell script, perhaps with a delay between iterations. If you use cron, you have to be careful that it is not already running when it gets fires again.
Nick
On 02/09/2025 20:08, Carlos Mogas da Silva wrote:
Can doveadm-sync be configured to keep running on the background? Can't seem to find anything related to this...
On 2 September 2025 20:00:01 WEST, Nick Howitt via dovecot <dovecot@dovecot.org> wrote:
How about doveadm-sync (https://doc.dovecot.org/main/core/man/doveadm-sync.1.html) or imapsync? On 02/09/2025 19:26, Carlos Mogas da Silva via dovecot wrote: Hi list. I have an email address hosted on a server not controlled by me which enforces quota on the accounts. No issues there. What I want to know, is how can I use my mail server, or in this case, dovecot, to act as a "client" to that imap server and download all the messages from it storing them locally (in my server) in effect, bypassing the quota restriction. If you can point me to some documentation or give a general idea on how I could accomplish this it would be nice. Thanks in advance! Carlos Mogas da Silva ------------------------------------------------------------------------ dovecot mailing list --dovecot@dovecot.org To unsubscribe send an email todovecot-leave@dovecot.org
Please can you reply to list rather than directly do me?
I just know of the tool and not how to use it. It doesn't look like it supports continually running it in the background, but you can always put it in a loop in a shell script, perhaps with a delay between iterations. If you use cron, you have to be careful that it is not already running when it gets fires again.
Nick
On 02/09/2025 20:08, Carlos Mogas da Silva wrote:
Can doveadm-sync be configured to keep running on the background? Can't
seem to find anything related to this...
On 2 September 2025 20:00:01 WEST, Nick Howitt via dovecot
[1]<dovecot@dovecot.org> wrote:
How about doveadm-sync ([2]https://doc.dovecot.org/main/core/man/doveadm-sync.1.html) or imapsync?
On 02/09/2025 19:26, Carlos Mogas da Silva via dovecot wrote:
Hi list.
I have an email address hosted on a server not controlled by me which
enforces quota on the accounts. No issues there.
What I want to know, is how can I use my mail server, or in this case,
dovecot, to act as a "client" to that imap server and download all the
messages from it storing them locally (in my server) in effect, bypassing
the quota restriction.
If you can point me to some documentation or give a general idea on how I
could accomplish this it would be nice.
Thanks in advance!
Carlos Mogas da Silva
--------------------------------------------------------------------------
dovecot mailing list --dovecot@dovecot.org To unsubscribe send an email [3]todovecot-leave@dovecot.org
References
Visible links
- mailto:dovecot@dovecot.org
- https://doc.dovecot.org/main/core/man/doveadm-sync.1.html
- mailto:todovecot-leave@dovecot.org
Indeed, doveadm sync would have to be ran at some certain interval in order to ensure you have all the messages. Typically when converting a mailbox or transferring accounts across servers, we run it up to a max of 7 times till no new messages come in due to sync so that we can be sure we "got everything" including messages that came in while we were doing the sync.
If it's just a question of cloning your mailbox locally/on another server, putting doveadm sync on a cron should suffice to do what is desired here. That said, doveadm sync will not delete the messages once done, so you'd need to also handle that yourself.
If the main concern is dodging quota full, I'd probably just use POP3 to connect (if they offer it) instead, as almost every POP3 server I know of deletes all the remote messages after fetch, thus ensuring your quota'd mailbox is never much of a problem except between the interval your mail client checks for new mail.
Thomas "Andy" Baugh thomas.baugh@webpros.com
From: Nick Howitt via dovecot <dovecot@dovecot.org> Sent: Tuesday, September 2, 2025 2:28 PM To: dovecot@dovecot.org <dovecot@dovecot.org> Subject: Re: "MitM" account to bypass quota
Please can you reply to list rather than directly do me?
I just know of the tool and not how to use it. It doesn't look like it supports continually running it in the background, but you can always put it in a loop in a shell script, perhaps with a delay between iterations. If you use cron, you have to be careful that it is not already running when it gets fires again.
Nick
On 02/09/2025 20:08, Carlos Mogas da Silva wrote:
Can doveadm-sync be configured to keep running on the background? Can't seem to find anything related to this...
On 2 September 2025 20:00:01 WEST, Nick Howitt via dovecot <dovecot@dovecot.org> wrote:
How about doveadm-sync (https://doc.dovecot.org/main/core/man/doveadm-sync.1.html) or imapsync? On 02/09/2025 19:26, Carlos Mogas da Silva via dovecot wrote: Hi list. I have an email address hosted on a server not controlled by me which enforces quota on the accounts. No issues there. What I want to know, is how can I use my mail server, or in this case, dovecot, to act as a "client" to that imap server and download all the messages from it storing them locally (in my server) in effect, bypassing the quota restriction. If you can point me to some documentation or give a general idea on how I could accomplish this it would be nice. Thanks in advance! Carlos Mogas da Silva ------------------------------------------------------------------------ dovecot mailing list --dovecot@dovecot.org To unsubscribe send an email todovecot-leave@dovecot.org
Probably the simpest solution is to use fetchmail
Best regards
Kenneth
Complexity is easy... simplicity is difficult.
On Tue, 2 Sep 2025, Andy Baugh via dovecot wrote:
Indeed, doveadm sync would have to be ran at some certain interval in order to ensure you have all the messages. Typically when converting a mailbox or transferring accounts across servers, we run it up to a max of 7 times till no new messages come in due to sync so that we can be sure we "got everything" including messages that came in while we were doing the sync.
If it's just a question of cloning your mailbox locally/on another server, putting doveadm sync on a cron should suffice to do what is desired here. That said, doveadm sync will not delete the messages once done, so you'd need to also handle that yourself.
If the main concern is dodging quota full, I'd probably just use POP3 to connect (if they offer it) instead, as almost every POP3 server I know of deletes all the remote messages after fetch, thus ensuring your quota'd mailbox is never much of a problem except between the interval your mail client checks for new mail.
Thomas "Andy" Baugh thomas.baugh@webpros.com
From: Nick Howitt via dovecot <dovecot@dovecot.org> Sent: Tuesday, September 2, 2025 2:28 PM To: dovecot@dovecot.org <dovecot@dovecot.org> Subject: Re: "MitM" account to bypass quota
Please can you reply to list rather than directly do me?
I just know of the tool and not how to use it. It doesn't look like it supports continually running it in the background, but you can always put it in a loop in a shell script, perhaps with a delay between iterations. If you use cron, you have to be careful that it is not already running when it gets fires again.
Nick
On 02/09/2025 20:08, Carlos Mogas da Silva wrote:
Can doveadm-sync be configured to keep running on the background? Can't seem to find anything related to this...
On 2 September 2025 20:00:01 WEST, Nick Howitt via dovecot <dovecot@dovecot.org> wrote:
How about doveadm-sync (https://doc.dovecot.org/main/core/man/doveadm-sync.1.html) or imapsync? On 02/09/2025 19:26, Carlos Mogas da Silva via dovecot wrote: Hi list. I have an email address hosted on a server not controlled by me which enforces quota on the accounts. No issues there. What I want to know, is how can I use my mail server, or in this case, dovecot, to act as a "client" to that imap server and download all the messages from it storing them locally (in my server) in effect, bypassing the quota restriction. If you can point me to some documentation or give a general idea on how I could accomplish this it would be nice. Thanks in advance! Carlos Mogas da Silva ------------------------------------------------------------------------ dovecot mailing list --dovecot@dovecot.org To unsubscribe send an email todovecot-leave@dovecot.org
dovecot mailing list -- dovecot@dovecot.org To unsubscribe send an email to dovecot-leave@dovecot.org
On Tue, 2 Sep 2025, Benny Pedersen via dovecot wrote:
Kenneth Irving via dovecot skrev den 2025-09-02 22:14:
Probably the simpest solution is to use fetchmail
with lda set in fetchmailrc
but its more clean on headers with imapsync, no new headers
True, but if I understood correctly, he's only interested in removing de mail from the remote server.
Best regards
Kenneth
Den 02.09.2025 22:44, skrev Benny Pedersen via dovecot:
Kenneth Irving via dovecot skrev den 2025-09-02 22:14:
Probably the simpest solution is to use fetchmail
with lda set in fetchmailrc
Fetchmail will automatically delete on the server after successful local delivery. I have fetchmail use the socket for dovecot-lmtp like so:
/etc/fetchmailrc: smtphost /var/spool/postfix/dovecot-lmtp
/etc/dovecot/dovecot.conf (or some included file):
service lmtp { process_limit = 512 unix_listener /var/spool/postfix-local-deliver/dovecot-lmtp { group = postfix mode = 0660 user = postfix } }
to deliver locally. Very easy setup in fetchmailrc for several remote mail-accounts allowing to deliver to the corresponding local mail address. This has been working more or less unchanged for 20 years on my box.
Fetchmail also supports not deleting the emails from the remote mailserver (-k | --keep).
On 02/09/2025 22:19, Håkon Alstadheim via dovecot wrote:
Den 02.09.2025 22:44, skrev Benny Pedersen via dovecot:
Kenneth Irving via dovecot skrev den 2025-09-02 22:14:
Probably the simpest solution is to use fetchmail
with lda set in fetchmailrc
Fetchmail will automatically delete on the server after successful local delivery. I have fetchmail use the socket for dovecot-lmtp like so:
/etc/fetchmailrc: smtphost /var/spool/postfix/dovecot-lmtp
/etc/dovecot/dovecot.conf (or some included file):
service lmtp { process_limit = 512 unix_listener /var/spool/postfix-local-deliver/dovecot-lmtp { group = postfix mode = 0660 user = postfix } }
to deliver locally. Very easy setup in fetchmailrc for several remote mail-accounts allowing to deliver to the corresponding local mail address. This has been working more or less unchanged for 20 years on my box.
dovecot mailing list -- dovecot@dovecot.org To unsubscribe send an email to dovecot-leave@dovecot.org
Fetchmail also supports not deleting the emails from the remote mailserver (-k | --keep).
On 02/09/2025 22:19, Haakon Alstadheim via dovecot wrote:
Den 02.09.2025 22:44, skrev Benny Pedersen via dovecot:
Kenneth Irving via dovecot skrev den 2025-09-02 22:14:
Probably the simpest solution is to use fetchmail
with lda set in fetchmailrc
Fetchmail will automatically delete on the server after successful local
delivery. I have fetchmail use the socket for dovecot-lmtp like so:
/etc/fetchmailrc: smtphost /var/spool/postfix/dovecot-lmtp
/etc/dovecot/dovecot.conf (or some included file):
service lmtp {
process_limit = 512
unix_listener /var/spool/postfix-local-deliver/dovecot-lmtp {
group = postfix
mode = 0660
user = postfix
}
}
to deliver locally. Very easy setup in fetchmailrc for several remote
mail-accounts allowing to deliver to the corresponding local mail
address. This has been working more or less unchanged for 20 years on my
box.
_______________________________________________
dovecot mailing list -- [1]dovecot@dovecot.org
To unsubscribe send an email to [2]dovecot-leave@dovecot.org
References
Visible links
- mailto:dovecot@dovecot.org
- mailto:dovecot-leave@dovecot.org
Håkon Alstadheim via dovecot skrev den 2025-09-02 23:19:
Den 02.09.2025 22:44, skrev Benny Pedersen via dovecot:
Kenneth Irving via dovecot skrev den 2025-09-02 22:14:
Probably the simpest solution is to use fetchmail
with lda set in fetchmailrc
Fetchmail will automatically delete on the server after successful local delivery. I have fetchmail use the socket for dovecot-lmtp like so:
/etc/fetchmailrc: smtphost /var/spool/postfix/dovecot-lmtp
make a smtpd listner in postfix for this, or does fetchmail realy do smtpd to lmtp ?
but lda in fetchmail is intended to be direct to dovecot-lda without needing postfix
/etc/dovecot/dovecot.conf (or some included file):
service lmtp { process_limit = 512 unix_listener /var/spool/postfix-local-deliver/dovecot-lmtp { group = postfix mode = 0660 user = postfix } }
thats ok with postfix :)
to deliver locally. Very easy setup in fetchmailrc for several remote mail-accounts allowing to deliver to the corresponding local mail address. This has been working more or less unchanged for 20 years on my box.
i just stopped using fetchmail
Den 02.09.2025 23:30, skrev Benny Pedersen via dovecot:
Håkon Alstadheim via dovecot skrev den 2025-09-02 23:19:
Den 02.09.2025 22:44, skrev Benny Pedersen via dovecot:
Kenneth Irving via dovecot skrev den 2025-09-02 22:14:
Probably the simpest solution is to use fetchmail
with lda set in fetchmailrc
Fetchmail will automatically delete on the server after successful local delivery. I have fetchmail use the socket for dovecot-lmtp like so:
/etc/fetchmailrc: smtphost /var/spool/postfix/dovecot-lmtp
make a smtpd listner in postfix for this, or does fetchmail realy do smtpd to lmtp ?
No, I had the socket set up anyway, for local delivery from postfix, so why not let fetchmail use the same?
Note: small typo in my post cited below: The socket is obviously meant to be THE SAME for dovecot and fetchmail, so remove the "-local-deliver" crud from that dovecot.conf snippet. I.e. /var/spool/postfix/dovecot-lmtp both places, and then, for completeness, in
/etc/postfix/main.cf: mailbox_transport = lmtp:unix:dovecot-lmtp
For further completeness, that dovecot-lmtp will barf on SMTPUTF8. Consider yourselves warned, so maybe better use /usr/lib/dovecot/dovecot-lda. I've never tried that with fetchmail, so will defer to others on that.
but lda in fetchmail is intended to be direct to dovecot-lda without needing postfix
/etc/dovecot/dovecot.conf (or some included file):
service lmtp { process_limit = 512 unix_listener /var/spool/postfix-local-deliver/dovecot-lmtp { group = postfix mode = 0660 user = postfix } }
thats ok with postfix :)
to deliver locally. Very easy setup in fetchmailrc for several remote mail-accounts allowing to deliver to the corresponding local mail address. This has been working more or less unchanged for 20 years on my box.
i just stopped using fetchmail
dovecot mailing list -- dovecot@dovecot.org To unsubscribe send an email to dovecot-leave@dovecot.org
participants (5)
-
Andy Baugh
-
Benny Pedersen
-
Håkon Alstadheim
-
Kenneth Irving
-
Nick Howitt