Re: Obtaining the IMAP GUID from a sieve script

2021-02-01 Thread Stephan Bosch




On 15/01/2021 18:57, Ron Garret wrote:

Is there any way to obtain the IMAP GUiD of a message that is being processed 
by a sieve script?  I’m writing a filter that needs to to keep track of message 
identities as they are moved around between folders.  I could add my own id 
header, but I’d rather not have to reinvent that wheel.


There is no Sieve command/test that can do that currently.

Regards,

Stephan.


Re: Dovecot and mutt

2021-02-01 Thread Chris Bennett
On Mon, Jan 25, 2021 at 08:52:14AM -0700, @lbutlr wrote:
> I have tried, but failed,. To write a sieve and script to strip HTML parts of 
> messages and if the message is only HTML to pipe it through w3m and add the 
> html portion as an emo attachment (in case it has links that need clicking, 
> like on some 'confirm you exist' emails.
 
I truly hate those. Most often they now require Javascript, too.
I use ssh and neomutt. I'm going to write a macro to take the html
attachment and put it in a website directory. I've been doing it the
long hard manual way. I hate forced javascript. No excuse but sloppiness
to have that on a confirm you exist page.

In any case, this is just nice to vent a little steam out.
I don't think we can do much except chastise users of mailing lists.
Sounds like a good macro to send a polite form letter reply to evildoers.
 
> Honestly, I do not main HTML per se, it is when the HTML specifies font size, 
> colors, background colors, and other garbage like that that I despise it. A 
> well formed HTML message is is fine, but those are very rare.

+1

Thanks for the great software and long hard work to find the most
miniscule hidden bugs!

Chris Bennett




error getting messages from mdbox_deleted

2021-02-01 Thread Marc Roos

I was trying to list messages deleted with 

doveadm -f flow -o mail_location=mdbox_deleted:/home/mail/xxx /mdbox fetch 
-u xxx  "mailbox date.saved guid" ALL

And getting this error. What is this about?

doveadm(xxx): Panic: file mdbox-map.c: line 1494 
(mdbox_map_get_uid_validity): assertion failed: (map->view != NULL)
doveadm(xxx): Error: Raw backtrace: 
/usr/lib64/dovecot/libdovecot.so.0(+0xa192e) [0x7f854625592e] -> 
/usr/lib64/dovecot/libdovecot.so.0(default_fatal_handler+0x2a) [0x7f854625599a] 
-> /usr/lib64/dovecot/libdovecot.so.0(i_fatal+0) [0x7f85461e5257] -> 
/usr/lib64/dovecot/libdovecot-storage.so.0(+0x61830) [0x7f854654c830] -> 
/usr/lib64/dovecot/libdovecot-storage.so.0(mdbox_update_header+0xa0) 
[0x7f8546551110] -> /usr/lib64/dovecot/libdovecot-storage.so.0(+0x5d698) 
[0x7f8546548698] -> /usr/lib64/dovecot/libdovecot-storage.so.0(+0x5d7e0) 
[0x7f85465487e0] -> 
/usr/lib64/dovecot/libdovecot-storage.so.0(mailbox_sync_init+0x44) 
[0x7f85465372d4] -> 
/usr/lib64/dovecot/libdovecot-storage.so.0(mailbox_sync+0x37) [0x7f8546537377] 
-> doveadm(doveadm_mail_iter_init+0x98) [0x55b4cd34c118] -> doveadm(+0x305b1) 
[0x55b4cd34a5b1] -> doveadm(+0x2bdcc) [0x55b4cd345dcc] -> doveadm(+0x2c9ca) 
[0x55b4cd3469ca] -> doveadm(doveadm_cmd_ver2_to_mail_cmd_wrapper+0x233) 
[0x55b4cd347823] -> doveadm(doveadm_cmd_run_ver2+0x50c) [0x55b4cd357fac] -> 
doveadm(doveadm_cmd_try_run_ver2+0x37) [0x55b4cd358047] -> doveadm(main+0x1e4) 
[0x55b4cd336214] -> /lib64/libc.so.6(__libc_start_main+0xf5) [0x7f8545e08555] 
-> doveadm(+0x1c605) [0x55b4cd336605]
Aborted


Re: Master user password mismatch

2021-02-01 Thread Robert L Mathews
On 2/1/21 12:46 PM, Gregory Sloop wrote:
> I was never able to get it to work using the htpasswd utility as
> suggested in the Wiki.

I'd guess that's due to this from "man htpasswd" on my system:

> htpasswd  encrypts passwords using either bcrypt, a version
> of MD5 modified for Apache, SHA1, or the system's crypt()
> routine [... MD5] is the default (since version 2.2.18).

So it's emitting something weird that's now specific to Apache only. You
can pass htpasswd flags to emit SHA passwords and so on, but "doveadm
pw" probably makes more sense.

-- 
Robert L Mathews, Tiger Technologies, http://www.tigertech.net/


Re: Master user password mismatch

2021-02-01 Thread Gregory Sloop
Top posting.

Following up on this...

I can't recall if I ever used the "doveadm pw -t 'hash-goes-here'" method or 
not.

But I did get it working.
I was never able to get it to work using the htpasswd utility as suggested in 
the Wiki.
And as noted, htpasswd was able to "verify" the hash in the file it generated - 
so I know the hash matches the password I intended.

Prior to Aki suggesting the doveadm method, I'd actually already done so.
I used [IIRC]
doveadm pw -s SHA512-CRYPT
[I note the hash type, specifically, because I only know that this one hash 
works, so if there's any question later, from someone else struggling, try this 
specific one.]

After generating the hash, and including it in the file, and 
restarting/reloading dovecot I can now auth with a master user.

I'd recommend that someone either update the docs/wiki after verifying that 
htpasswd works and how, or remove it from the wiki and leave the doveadm 
version only.

-Greg


AT> Did you try with `doveadm pw -t 'hash-goes-here'`?

AT> Sometimes you need to use

AT> passdb {
AT>   driver = passwd-file
AT>   args = scheme=your-pw-scheme /path/to/file
AT> }

AT> Note that the path must be placed last.

AT> Aki

>> On 28/01/2021 20:53 Gregory Sloop  wrote:


>> Anyone?
>>  
>>  
>>  


>>Trying to get master users working.
>>  
>>  I'm not sure what info would be best, but here's the detail I have now, in 
>> trying to get it working.
>>  Setup the master user file, and enabled master users in the conf files.
>>  Created the master user file and user/password hash.
>>  
>>  Turned on authentication debug.
>>  When I try something like:
>>  telnet localhost 143
>>  and then supply the master user login - kind of like this:
>>  1 login joeb*jb-master somepassword
>>  
>>  I get this in the logs. (Some obfuscation done.)
>>  ---
>>  dovecot: auth: Debug: auth client connected (pid=24985)
>>  dovecot: auth: Debug: client in: 
>> AUTH#0111#011PLAIN#011service=imap#011secured#011session=MM6QC9a5SIYB#011lip=::1#011rip=::1#011lport=143#011rport=34376#011resp=
>>  dovecot: auth: Debug: 
>> passwd-file(jb-master,::1,master,): Master 
>> user lookup for login: joeb
>>  dovecot: auth: Debug: 
>> passwd-file(jb-master,::1,master,): 
>> lookup: user=jb-master file=/etc/dovecot/masterusers-test
>>  dovecot: auth: 
>> passwd-file(jb-master,::1,master,): 
>> Password mismatch
>>  dovecot: auth: Debug: client passdb out: FAIL#0111#011user=jb-master
>>  ---
>>  
>>  Yet I can use
>>  htpasswd -b -c -s /etc/dovecot/masterusers-test jb-master somepassword
>>  And this succeeds. (I created the masterusers-test file with httpasswd)
>>  
>>  So, I must have the password right, but dovecot is till failing the auth, 
>> claiming a bad password.
>>  
>>  How do I go about getting more detail so I can determine what's wrong?
>>  
>>  TIA
>>  -Greg
>>  



Re: Unknown euid and egid, wrong mail directory

2021-02-01 Thread @lbutlr
On 30 Jan 2021, at 13:51, Michael Agbaglo  wrote:
> "euid=1001() egid=1001()" 1001 doesn't not exist in
> /etc/passwd - Where does it come from?

Is there a userid 1001 in /etc/passwd?


-- 
Sam, I thought I told you never to play--



Re: Reminder Re: Dovecot Gmail OAuth2.0 Setting Question

2021-02-01 Thread Aki Tuomi
Possibly, not sure. Give it a try?

Aki

> On 01/02/2021 13:09 福田泰葵  wrote:
> 
> 
> Dear Mr. Tuomi
> 
> I created a gmail service account.
> and I have implemented the process of getting an access token using a gmail 
> service account.
> 
> https://developers.google.com/identity/protocols/oauth2/service-account
> 
> I think I then need to set the grant_url to a URL that returns an access 
> token and send that access token to the introspection_url, is that correct?
> 
> Best regards, 
> 
> -
> 〒163-6017 東京都新宿区西新宿6-8-1 住友不動産新宿オークタワー
> 株式会社 ジャストシステム 技術企画室 情報システムグループ 福田泰葵
> e-mail: taiki.fuk...@justsystems.com
> 内線: 5158
> TEL: 03-5324-7900
> mobile: 080-6198-7328
> -
> 
> 
> 
> 2021年1月29日(金) 17:58 Odhiambo Washington :
> > You broke this thread. In the original thread, I remember seeing Aki gave 
> > you the configuration which he believed might work.
> > The next thing I thought was for you to go to 
> > https://developers.google.com/identity/sign-in/web/devconsole-project and 
> > get an access token.
> > 
> > PS: I have never configured this kind of thing so I was only following the 
> > thread to try and understand what it entails.
> > 
> > 
> > 
> > On Fri, 29 Jan 2021 at 04:00, 福田泰葵  wrote:
> > > Google is responding to me as Unauthorized.
> > > So I need to send my credentials such as access token in the request 
> > > parameter for authentication in google’s Get User API request.
> > > But I don’t know how to configure dovecot to achieve that.
> > > Could you please help me with this?
> > > Best regards,
> > > -
> > > 〒163-6017 東京都新宿区西新宿6-8-1 住友不動産新宿オークタワー
> > > 株式会社 ジャストシステム 技術企画室 情報システムグループ 福田泰葵
> > > e-mail: taiki.fuk...@justsystems.com
> > > 内線: 5158
> > > TEL: 03-5324-7900
> > > mobile: 080-6198-7328
> > > -
> > > 
> > > 
> > > 
> > > 2021年1月29日(金) 3:30 Odhiambo Washington :
> > > > Your clue is in the log:
> > > > 
> > > > 1611654464.207331 "message": "Request is missing required 
> > > > authentication credential. Expected OAuth 2 access token, login cookie 
> > > > or other valid authentication credential. 
> > > > Seehttps://developers.google.com/identity/sign-in/web/devconsole-project.;,
> > > >  1611654464.207331 "status": "UNAUTHENTICATED" 1611654464.207331 }
> > > > 
> > > > 
> > > > 
> > > > 
> > > > On Thu, 28 Jan 2021 at 09:25, 福田泰葵  wrote:
> > > > > Dear Mr. Tuomi
> > > > > 
> > > > > Do you have any idea how to solve this problem?
> > > > > 
> > > > > Best regards,
> > > > > 
> > > > > -
> > > > > 〒163-6017 東京都新宿区西新宿6-8-1 住友不動産新宿オークタワー
> > > > > 株式会社 ジャストシステム 技術企画室 情報システムグループ 福田泰葵
> > > > > e-mail: taiki.fuk...@justsystems.com
> > > > > 内線: 5158
> > > > > TEL: 03-5324-7900
> > > > > mobile: 080-6198-7328
> > > > > -
> > > > > 
> > > > > 
> > > > > 
> > > > > 2021年1月26日(火) 18:51 福田泰葵 :
> > > > > > Dear Mr. Tuomi
> > > > > > Thank you for the instruction.
> > > > > > I was able to output rawlogs.
> > > > > > The following is the result.
> > > > > > 20210126-184744.1.1.in (http://20210126-184744.1.1.in):
> > > > > > 1611654464.207331 HTTP/1.1 401 Unauthorized
> > > > > > 1611654464.207331 Cache-Control: no-cache, no-store, max-age=0, 
> > > > > > must-revalidate
> > > > > > 1611654464.207331 Pragma: no-cache
> > > > > > 1611654464.207331 Expires: Mon, 01 Jan 1990 00:00:00 GMT
> > > > > > 1611654464.207331 Date: Tue, 26 Jan 2021 09:47:44 GMT
> > > > > > 1611654464.207331 Vary: X-Origin
> > > > > > 1611654464.207331 Vary: Referer
> > > > > > 1611654464.207331 Content-Type: application/json; charset=UTF-8
> > > > > > 1611654464.207331 Server: ESF
> > > > > > 1611654464.207331 X-XSS-Protection: 0
> > > > > > 1611654464.207331 X-Frame-Options: SAMEORIGIN
> > > > > > 1611654464.207331 X-Content-Type-Options: nosniff
> > > > > > 1611654464.207331 Alt-Svc: h3-29=":443"; ma=2592000,h3-T051=":443"; 
> > > > > > ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; 
> > > > > > ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; 
> > > > > > v="46,43"
> > > > > > 1611654464.207331 Accept-Ranges: none
> > > > > > 1611654464.207331 Vary: Origin,Accept-Encoding
> > > > > > 1611654464.207331 Transfer-Encoding: chunked
> > > > > > 1611654464.207331
> > > > > > 1611654464.207331 130
> > > > > > 1611654464.207331 {
> > > > > > 

Re: Reminder Re: Dovecot Gmail OAuth2.0 Setting Question

2021-02-01 Thread 福田泰葵
Dear Mr. Tuomi

I created a gmail service account.
and I have implemented the process of getting an access token using a gmail
service account.

https://developers.google.com/identity/protocols/oauth2/service-account

I think I then need to set the grant_url to a URL that returns an access
token and send that access token to the introspection_url, is that correct?

Best regards,
-
〒163-6017 東京都新宿区西新宿6-8-1 住友不動産新宿オークタワー
株式会社 ジャストシステム  技術企画室 情報システムグループ  福田泰葵
e-mail: taiki.fuk...@justsystems.com
内線: 5158
TEL: 03-5324-7900
mobile: 080-6198-7328
-


2021年1月29日(金) 17:58 Odhiambo Washington :

> You broke this thread. In the original thread, I remember seeing Aki gave
> you the configuration which he believed might work.
> The next thing I thought was for you to go to
> https://developers.google.com/identity/sign-in/web/devconsole-project and
> get an access token.
>
> PS: I have never configured this kind of thing so I was only following the
> thread to try and understand what it entails.
>
>
> On Fri, 29 Jan 2021 at 04:00, 福田泰葵  wrote:
>
>> Google is responding to me as Unauthorized.
>> So I need to send my credentials such as access token in the request
>> parameter for authentication in google’s Get User API request.
>> But I don’t know how to configure dovecot to achieve that.
>> Could you please help me with this?
>>
>> Best regards,
>>
>> -
>> 〒163-6017 東京都新宿区西新宿6-8-1 住友不動産新宿オークタワー
>> 株式会社 ジャストシステム  技術企画室 情報システムグループ  福田泰葵
>> e-mail: taiki.fuk...@justsystems.com
>> 内線: 5158
>> TEL: 03-5324-7900
>> mobile: 080-6198-7328
>>
>> -
>>
>>
>> 2021年1月29日(金) 3:30 Odhiambo Washington :
>>
>>> Your clue is in the log:
>>>
>>> 1611654464.207331 "message": "Request is missing required authentication
>>> credential. Expected OAuth 2 access token, login cookie or other valid
>>> authentication credential. See
>>> https://developers.google.com/identity/sign-in/web/devconsole-project.;,
>>> 1611654464.207331 "status": "UNAUTHENTICATED" 1611654464.207331 }
>>>
>>>
>>>
>>> On Thu, 28 Jan 2021 at 09:25, 福田泰葵  wrote:
>>>
 Dear Mr. Tuomi

 Do you have any idea how to solve this problem?

 Best regards,

 -
 〒163-6017 東京都新宿区西新宿6-8-1 住友不動産新宿オークタワー
 株式会社 ジャストシステム  技術企画室 情報システムグループ  福田泰葵
 e-mail: taiki.fuk...@justsystems.com
 内線: 5158
 TEL: 03-5324-7900
 mobile: 080-6198-7328

 -


 2021年1月26日(火) 18:51 福田泰葵 :

> Dear Mr. Tuomi
>
> Thank you for the instruction.
> I was able to output rawlogs.
> The following is the result.
>
> 20210126-184744.1.1.in:
>
> 1611654464.207331 HTTP/1.1 401 Unauthorized
> 1611654464.207331 Cache-Control: no-cache, no-store, max-age=0, 
> must-revalidate
> 1611654464.207331 Pragma: no-cache
> 1611654464.207331 Expires: Mon, 01 Jan 1990 00:00:00 GMT
> 1611654464.207331 Date: Tue, 26 Jan 2021 09:47:44 GMT
> 1611654464.207331 Vary: X-Origin
> 1611654464.207331 Vary: Referer
> 1611654464.207331 Content-Type: application/json; charset=UTF-8
> 1611654464.207331 Server: ESF
> 1611654464.207331 X-XSS-Protection: 0
> 1611654464.207331 X-Frame-Options: SAMEORIGIN
> 1611654464.207331 X-Content-Type-Options: nosniff
> 1611654464.207331 Alt-Svc: h3-29=":443"; ma=2592000,h3-T051=":443"; 
> ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; 
> ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"
> 1611654464.207331 Accept-Ranges: none
> 1611654464.207331 Vary: Origin,Accept-Encoding
> 1611654464.207331 Transfer-Encoding: chunked
> 1611654464.207331
> 1611654464.207331 130
> 1611654464.207331 {
> 1611654464.207331   "error": {
> 1611654464.207331 "code": 401,
> 1611654464.207331 "message": "Request is missing required 
> authentication credential. Expected OAuth 2 access token, login cookie or 
> other valid authentication credential. See 
> https://developers.google.com/identity/sign-in/web/devconsole-project.;,
> 1611654464.207331 "status": "UNAUTHENTICATED"
> 1611654464.207331   }
> 1611654464.207331 }
> 1611654464.207331
> 1611654464.207737 0
> 1611654464.207737
>
>