Re: Finding offending message that breaks the Sender/From requirement

2023-07-17 Thread Husain Alshehhi
Oswald Buddenhagen  writes:

> On Sun, Jul 16, 2023 at 02:05:51AM +, hus...@alshehhi.io wrote:
>> Is there a way to find the offending message? 
> probably the easiest way is to add -DN to the mbsync arguments. then you
> can directly grep for the message's content.

Thank you. -DN does the trick.



___
isync-devel mailing list
isync-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/isync-devel


Re: Finding offending message that breaks the Sender/From requirement

2023-07-16 Thread Oswald Buddenhagen

On Sun, Jul 16, 2023 at 02:05:51AM +, hus...@alshehhi.io wrote:
Is there a way to find the offending message? 

probably the easiest way is to add -DN to the mbsync arguments. then you 
can directly grep for the message's content.


regards


___
isync-devel mailing list
isync-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/isync-devel


Re: Finding offending message that breaks the Sender/From requirement

2023-07-16 Thread Evgeniy Berdnikov
  Hello.

On Sun, Jul 16, 2023 at 02:05:51AM +, hus...@alshehhi.io wrote:
> Warning: lost track of 39 pushed message(s)

 BTW, this is a hit about sync problems... 

> Synchronizing...
> Notice: far side store does not support flag(s) 'P'; not propagating.
> C: 0/1  B: 1/7  F: +0/39 *0/0 #0/0  N: +0/5 *0/0 #0/0
> IMAP command 'APPEND "Archive" (\Seen) ' returned an error: BAD invalid 
> rfc5322 message: `Sender` should not be present if equal to `From`
> C: 1/1  B: 2/7  F: +0/39 *0/0 #0/0  N: +0/5 *0/0 #0/0
> 
> Seems that the Sender/From field is invalid. I assume that this is
> related to section 3.6.2 of
> 
>   https://www.rfc-editor.org/rfc/rfc5322.txt .
> 
> Is there a way to find the offending message? 

 It's not a question about mbsync, but a request for sysadmin's help...
 This command
 
 grep -irl '^Sender:' /path/to/mailbox{1,2,..etc} \
  | xargs egrep -i '^(From|Sender):' 

 helps to find quickly mails with both From: and Sender: headers.
 It should lead to several files to inspect. If output is too large,
 some additional filtering would help to locate offending mail.
-- 
 Eugene Berdnikov


___
isync-devel mailing list
isync-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/isync-devel