Only some of my sent emails are stored in sent-folder
Lots of the emails I send aren't stored in the sent folder. It seems that it mostly (but not always) work for sent emails where the main email-address (the one that is also used as login name) is used as sender. It never seems to work when an alias is used as sender name.
There isn't any entry in the mail.err log and nothing that looks suspicious to me in the regular mail.log.
I didn't notice it at first, because I usually don't check my sent folder that much, but I it seems to have started when I migrated to the new server a few weeks ago.
Any idea what could be the reason for it?
Kind regards, Nils
Test 1 using main email address (NOT STORED IN SENT FOLDER) Jun 20 20:10:28 SERVER postfix/submission/smtpd[5156]: connect from INTERNET_PROVIDER[IPV6_ADDRESS] Jun 20 20:10:28 SERVER postfix/submission/smtpd[5156]: 3B8B0C0DA8: client=INTERNET_PROVIDER[IPV6_ADDRESS], sasl_method=PLAIN, sasl_username=RECIPIENT@SERVER.TLD Jun 20 20:10:28 SERVER postfix/cleanup[5161]: 3B8B0C0DA8: message-id=<bcdc1b7e-e3f1-4a82-8fd9-05dd307313e4@SERVER.TLD> Jun 20 20:10:28 SERVER amavis[5197]: (05197-01) Passed CLEAN {AcceptedInbound}, AM.PDP-SOCK [IPV6_ADDRESS] [IPV6_ADDRESS] <RECIPIENT@SERVER.TLD> -> <RECIPIENT@SERVER.TLD>, Queue-ID: 3B8B0C0DA8, Message-ID: <bcdc1b7e-e3f1-4a82-8fd9-05dd307313e4@SERVER.TLD>, mail_id: nv7qsKFzK11D, Hits: 0.975, size: 702, 463 ms Jun 20 20:10:28 SERVER opendkim[1081]: 3B8B0C0DA8: DKIM-Signature field added (s=SERVER.TLD, d=SERVER.TLD) Jun 20 20:10:28 SERVER postfix/qmgr[1792]: 3B8B0C0DA8: from=<RECIPIENT@SERVER.TLD>, size=402, nrcpt=1 (queue active) Jun 20 20:10:28 SERVER dovecot: lmtp(5228): Connect from local Jun 20 20:10:28 SERVER dovecot: lmtp(RECIPIENT@SERVER.TLD)<5228><cL5iLbSMdGZsFAAAVy37qw>: sieve: msgid=<bcdc1b7e-e3f1-4a82-8fd9-05dd307313e4@SERVER.TLD>: stored mail into mailbox 'INBOX' Jun 20 20:10:28 SERVER postfix/lmtp[5227]: 3B8B0C0DA8: to=<RECIPIENT@SERVER.TLD>, relay=SERVER.TLD[private/dovecot-lmtp], delay=0.55, delays=0.54/0/0/0.01, dsn=2.0.0, status=sent (250 2.0.0 <RECIPIENT@SERVER.TLD> cL5iLbSMdGZsFAAAVy37qw Saved) Jun 20 20:10:28 SERVER dovecot: lmtp(5228): Disconnect from local: Logged out (state=READY) Jun 20 20:10:28 SERVER postfix/qmgr[1792]: 3B8B0C0DA8: removed Jun 20 20:10:28 SERVER dovecot: imap-login: Login: user=<RECIPIENT@SERVER.TLD>, method=PLAIN, rip=IPV6_ADDRESS, lip=2a01:4f8:10a:e50::2, mpid=5248, TLS, session=<DdED6FcbbusgAwDKv0yBAGXh6Xy3cdaM> Jun 20 20:10:29 SERVER dovecot: imap(RECIPIENT@SERVER.TLD)<5248><DdED6FcbbusgAwDKv0yBAGXh6Xy3cdaM>: Disconnected: Logged out in=496 out=637 deleted=0 expunged=0 trashed=0 hdr_count=0 hdr_bytes=0 body_count=0 body_bytes=0 Jun 20 20:10:33 SERVER postfix/submission/smtpd[5156]: disconnect from INTERNET_PROVIDER[IPV6_ADDRESS] ehlo=2 starttls=1 auth=1 mail=1 rcpt=1 data=1 quit=1 commands=8
Test 2 using alias email address (NOT STORED IN SENT FOLDER) Jun 20 20:10:41 SERVER postfix/submission/smtpd[5156]: connect from INTERNET_PROVIDER[IPV6_ADDRESS] Jun 20 20:10:42 SERVER postfix/submission/smtpd[5156]: 184A5C0DAD: client=INTERNET_PROVIDER[IPV6_ADDRESS], sasl_method=PLAIN, sasl_username=EMAIL@SERVER.TLD Jun 20 20:10:42 SERVER postfix/cleanup[5161]: 184A5C0DAD: message-id=<bc2f2025-67e0-4780-9a54-8f06c3b16389@SERVER.TLD> Jun 20 20:10:42 SERVER amavis[5196]: (05196-02) Passed CLEAN {AcceptedInbound}, AM.PDP-SOCK [IPV6_ADDRESS] [IPV6_ADDRESS] <ALIAS@SERVER.TLD> -> <RECIPIENT@SERVER.TLD>, Queue-ID: 184A5C0DAD, Message-ID: <bc2f2025-67e0-4780-9a54-8f06c3b16389@SERVER.TLD>, mail_id: ySF-pJQA8aRl, Hits: 0.975, size: 716, 607 ms Jun 20 20:10:42 SERVER opendkim[1081]: 184A5C0DAD: DKIM-Signature field added (s=key1, d=SERVER.TLD) Jun 20 20:10:42 SERVER postfix/qmgr[1792]: 184A5C0DAD: from=<ALIAS@SERVER.TLD>, size=408, nrcpt=1 (queue active) Jun 20 20:10:42 SERVER dovecot: lmtp(5228): Connect from local Jun 20 20:10:42 SERVER dovecot: lmtp(RECIPIENT@SERVER.TLD)<5228><KCs+LcKMdGZsFAAAVy37qw>: sieve: msgid=<bc2f2025-67e0-4780-9a54-8f06c3b16389@SERVER.TLD>: stored mail into mailbox 'INBOX' Jun 20 20:10:42 SERVER dovecot: lmtp(5228): Disconnect from local: Logged out (state=READY) Jun 20 20:10:42 SERVER postfix/lmtp[5227]: 184A5C0DAD: to=<RECIPIENT@SERVER.TLD>, relay=SERVER.TLD[private/dovecot-lmtp], delay=0.69, delays=0.68/0/0/0.01, dsn=2.0.0, status=sent (250 2.0.0 <RECIPIENT@SERVER.TLD> KCs+LcKMdGZsFAAAVy37qw Saved) Jun 20 20:10:42 SERVER postfix/qmgr[1792]: 184A5C0DAD: removed Jun 20 20:10:47 SERVER postfix/submission/smtpd[5156]: disconnect from INTERNET_PROVIDER[IPV6_ADDRESS] ehlo=2 starttls=1 auth=1 mail=1 rcpt=1 data=1 quit=1 commands=8
Test 3 using main email address (stored in sent-folder) Jun 20 20:30:24 SERVER postfix/submission/smtpd[5813]: connect from INTERNET_PROVIDER[IPV6_ADDRESS] Jun 20 20:30:25 SERVER postfix/submission/smtpd[5813]: 3F2C1C0DAD: client=INTERNET_PROVIDER[IPV6_ADDRESS], sasl_method=PLAIN, sasl_username=EMAIL@SERVER.TLD Jun 20 20:30:25 SERVER postfix/cleanup[5818]: 3F2C1C0DAD: message-id=<603d7b61-d8d1-4099-bbc2-f0d2e9c776ee@SERVER.TLD> Jun 20 20:30:26 SERVER amavis[5197]: (05197-02) Passed CLEAN {AcceptedInbound}, AM.PDP-SOCK [IPV6_ADDRESS] [IPV6_ADDRESS] <EMAIL@SERVER.TLD> -> <RECIPIENT@SERVER.TLD>, Queue-ID: 3F2C1C0DAD, Message-ID: <603d7b61-d8d1-4099-bbc2-f0d2e9c776ee@SERVER.TLD>, mail_id: KDDY0Tv2B0Ut, Hits: 0.975, size: 704, 1096 ms Jun 20 20:30:26 SERVER opendkim[1081]: 3F2C1C0DAD: DKIM-Signature field added (s=key1, d=SERVER.TLD) Jun 20 20:30:26 SERVER postfix/qmgr[1792]: 3F2C1C0DAD: from=<EMAIL@SERVER.TLD>, size=398, nrcpt=1 (queue active) Jun 20 20:30:26 SERVER dovecot: lmtp(5824): Connect from local Jun 20 20:30:26 SERVER dovecot: lmtp(RECIPIENT@SERVER.TLD)<5824><xsEAGWKRdGbAFgAAVy37qw>: sieve: msgid=<603d7b61-d8d1-4099-bbc2-f0d2e9c776ee@SERVER.TLD>: stored mail into mailbox 'INBOX' Jun 20 20:30:26 SERVER postfix/lmtp[5823]: 3F2C1C0DAD: to=<RECIPIENT@SERVER.TLD>, relay=SERVER.TLD[private/dovecot-lmtp], delay=1.2, delays=1.2/0.01/0.01/0.01, dsn=2.0.0, status=sent (250 2.0.0 <RECIPIENT@SERVER.TLD> xsEAGWKRdGbAFgAAVy37qw Saved) Jun 20 20:30:26 SERVER dovecot: lmtp(5824): Disconnect from local: Logged out (state=READY) Jun 20 20:30:26 SERVER postfix/qmgr[1792]: 3F2C1C0DAD: removed Jun 20 20:30:26 SERVER dovecot: imap(EMAIL@SERVER.TLD)<5669><5nRfHlgbHIYgAwDKv0yBAGXh6Xy3cdaM>: Disconnected: Logged out in=1228 out=11932 deleted=0 expunged=0 trashed=0 hdr_count=3 hdr_bytes=816 body_count=0 body_bytes=0 Jun 20 20:30:31 SERVER postfix/submission/smtpd[5813]: disconnect from INTERNET_PROVIDER[IPV6_ADDRESS] ehlo=2 starttls=1 auth=1 mail=1 rcpt=1 data=1 quit=1 commands=8
On 6/20/24 22:47, Marc wrote:
using outlook?
I also had this, and when I searched for this, I found lots of people have had this and it is a known issue since many years. (They recommend creating new profile)
Thank you very much for your fast response, Marc.
I use Thunderbird (currently 115.12.0). I was suspicious of my client too, but I manage accounts on other servers with that client too and they seem to work without problems (although I don't use aliases there). I'm gonna prepare another client and check that.
I definitely don't know if it's a dovecot issue, but I thinks it's a good place to start looking, since dovecot is managing the mailboxes. Can I increase the verbosity in a way that saving an email into a folder would be logged?
On 6/20/24 23:00, Marc wrote:
Maybe reindex the mailbox and see if the messages turn up? Yes, thanks for the good idea. Not sure if I did it right:
doveadm force-resync -u EMAIL@SERVER.TLD Sent
It didn't show an error, but the emails didn't appear.
I've already searched for the email files on the server and they weren't there.
If you using Thunderbird I would try repairing the folder, (under properties) or compact folders. That fixes a lot of issues for us.
The only other thought I had was maybe the UID of your use for the sent folder was different from the old to the new server, and the mail is still trying to be copied to the old uid?
Chris
On 6/20/2024 4:00 PM, Marc via dovecot wrote:
-- Christopher Wensink IS Administrator Five Star Plastics, Inc 1339 Continental Drive Eau Claire, WI 54701 Office: 715-831-1682 Mobile: 715-563-3112 Fax: 715-831-6075 cwensink@five-star-plastics.com www.five-star-plastics.com
On 6/20/24 23:15, Christopher Wensink via dovecot wrote:
Thank you for your hints, Chris. I didn't know that Thunderbird had a repair option. Sadly it didn't work this time, but I will keep it in mind for the future.
I'm not exactly sure if I understand you correctly. Do you mean the filesystem uid as in user-id/owner of the folder or is there something that I don't know of.
Yes that's correct. Look at the owner/group of the file/folder in question, and compare that to the id in /etc/passwd for the user on the old vs the new server. Also confirm that messages are actually sending and not suck in /var/spool/mail/<user>, (centos/redhat/oracle/rocky) or wherever your spool directories are on your system
check /var/log/messages or your default log location for clues as to where things are going or if there are errors, and check /etc/dovecot/conf.d/10-logging.conf for logging details.
You may want to increase the logging verbosity for a time to track down where the messages are going.
Chris
On 6/20/2024 5:04 PM, Nils via dovecot wrote:
-- Christopher Wensink IS Administrator Five Star Plastics, Inc 1339 Continental Drive Eau Claire, WI 54701 Office: 715-831-1682 Mobile: 715-563-3112 Fax: 715-831-6075 cwensink@five-star-plastics.com www.five-star-plastics.com
On Thu, Jun 20, 2024 at 10:56:48PM +0200, Nils via dovecot wrote:
For Thunderbird I suggest going to "Copies & Folders" of the account and replacing "Place a copy in" with "Bcc these email addresses" option. Then if you want outgoing mails to be in the Sent folder on IMAP server, move them there with a Sieve filter.
Storing sent mails over IMAP is unreliable because it is not the same connection as you use for SMTP. It is always possible that you manage to send the mail out but fail to connect to IMAP or disconnect from the network before the message is fully stored there.
The default of storing messages over IMAP looks to me like a historical solution that evolved by users switching from using TUI clients that stored mails in the Sent folder using "Fcc" mechanism on the remote *nix machines to accessing these same *nix machines over IMAP sometimes. In this case it makes sense to store mails into the same folder. But now that email servers are accessed exclusively over IMAP and not remote shell, Bcc to self looks like a better solution.
On 6/20/24 22:40, Nils via dovecot wrote:
I spent some more time checking. I think I might made a mistake when I said that some of the emails, where the main email-address is used as sender, are not saved into the Sent folder.
After carefully double-checking, it seems to be that:
- All emails that have the main email-address (that is used as login-name) as "From" value are stored to the "Sent"-folder
- All emails that have an alias as "From" value are not store to the "Sent"-folder
On 6/20/24 22:40, Nils via dovecot wrote:
I've copied the file "/etc/dovecot/conf.d/10-logging.conf.ucf-dist" to "/etc/dovecot/conf.d/10-logging.conf" and changed it's content to:
I've restarted dovecot, but the verbosity level of the logs didn't change. The events "delete" and "save" are not being logged for mails.
Could someone please tell me how to change the verbosity level of the dovecot logs?
You need to enable the plugin mail_plugins = $mail_plugins notify mail_log Aki On 21/06/2024 15:27 EEST Nils via dovecot <dovecot@dovecot.org> wrote: On 6/20/24 22:40, Nils via dovecot wrote: Lots of the emails I send aren't stored in the sent folder. It seems that it mostly (but not always) work for sent emails where the main email-address (the one that is also used as login name) is used as sender. It never seems to work when an alias is used as sender name. There isn't any entry in the mail.err log and nothing that looks suspicious to me in the regular mail.log. I didn't notice it at first, because I usually don't check my sent folder that much, but I it seems to have started when I migrated to the new server a few weeks ago. Any idea what could be the reason for it? Kind regards, Nils I've copied the file "/etc/dovecot/conf.d/10-logging.conf.ucf-dist" to "/etc/dovecot/conf.d/10-logging.conf" and changed it's content to: mail_debug = yes # mail_log plugin provides more event logging for mail processes. plugin { mail_log_events = delete undelete expunge copy mailbox_delete mailbox_rename save mailbox_create mailbox_rename flag_change mail_log_fields = uid box msgid size flags from subject } I've restarted dovecot, but the verbosity level of the logs didn't change. The events "delete" and "save" are not being logged for mails. Could someone please tell me how to change the verbosity level of the dovecot logs? _______________________________________________ dovecot mailing list -- dovecot@dovecot.org To unsubscribe send an email to dovecot-leave@dovecot.org
Hi Nils,
Am 21.06.24 um 15:09 schrieb Nils via dovecot:
Looks like there is no IMAP access at all for the second mail.
[German UI Thunderbird] Menu Bearbeiten -> Konten-Einstellungen -> [choose your main identity] -> Weitere Identitäten -> [Choose one] -> Bearbeiten -> Kopien & Ordner -> tick "Eine Kopie speichern unter" and choose a Sent mail folder that you like -> click "Ok"
[English UI Thunderbird] Menu Edit -> Account Settings -> [choose your main identity] -> Manage Identities -> [Choose one] -> Edit -> Copies & Folders -> tick "Place a copy in" and choose a Sent mail folder that you like -> click "OK"
Kind regards, Daniel
On 6/21/24 15:43, Daniel Lange via dovecot wrote:
Sehr vielen Dank, Daniel! Thank you very much, Daniel!
I can't believe it. I'd never thought that it would fall back to "Sent on local folders" instead of the account-setting. All the emails I've been searching for on the server were stored locally.
When I migrated to a new server, I've changed the name of the mail server. I didn't had to recreate my accounts in Thunderbird. I just edited the server name and had to store all the passwords again. Still, that must have been enough to trigger Thunderbird to change that setting to a fallback. I'm pretty sure that I didn't change that setting, when I was creating the identities. Until now, I didn't even notice that Thunderbirds Identity-Editor had more than one tab.
Ich bin so froh, dass Du dieses Rätsel gelöst hast! I'm so glad that you've solved this mystery.
participants (6)
-
Aki Tuomi
-
Alex
-
Christopher Wensink
-
Daniel Lange
-
Marc
-
Nils