Re: Unexplained mutt error

2022-02-21 Thread Kevin J. McCarthy

On Mon, Feb 21, 2022 at 06:10:51PM -0600, Ion wrote:

I tried both set smtp_url ="smtp://smtp.fastmail.com:465" and set
smtp_url ="smtp://smtp.fastmail.com:587" and got "SMTP session failed:
530 5.7.1 Authentication required".


You'll need to add your username to the $smtp_url, so something like
  set smtp_url = "smtp://ionm...@eml.cc@smtp.fastmail.com:587"

I used the same password as IMAP as the Fastmail help page tells me 
"Your app-specific password.  You cannot use your regular Fastmail 
password."


Yes that's right.


So does the "set ssl_force_tls =yes" not cover authentication?


No that just makes sure encryption is used for 'smtp://' URLs.

--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: Receive email, filtering

2022-02-21 Thread Charles Cazabon
Piet  wrote:
> 
> Dear Charles,
> 
> thank you for the hint.

You're most welcome.

> I'll try harder to get it work now, because I'm sure if will be possible.

Someone else said I should have given the answer here, even though it is
off-topic.

For getmail, in the [options] section of your rc file, use:

  read_all = false
  delete = false

It will retrieve all messages the first time they're seen, and will not delete
them from the server.

Charles
-- 
---
Charles Cazabon
GPL'ed software available at:   http://pyropus.ca/software/
---


Re: Unexplained mutt error

2022-02-21 Thread Ion

I tried both set smtp_url ="smtp://smtp.fastmail.com:465" and set
smtp_url ="smtp://smtp.fastmail.com:587" and got "SMTP session failed:
530 5.7.1 Authentication required".

I used the same password as IMAP as the Fastmail help page tells me
"Your app-specific password. You cannot use your regular Fastmail
password." So does the "set ssl_force_tls =yes" not cover authentication?

On 21/02/2022 16:40, Kevin J. McCarthy wrote:

On Mon, Feb 21, 2022 at 02:46:11PM -0600, Ion wrote:

set smtp_url ="smtp://smtp.fastmail.com:465"



But the response was...

"SMTP session failed: read error"


The prefix 'smtps://' should be used with port 465:
  set smtp_url ="smtps://smtp.fastmail.com:465"

Alternatively you can use 'smtp://' with port 587 to use STARTTLS:
  set smtp_url ="smtp://smtp.fastmail.com:587"


set timeout=15
set mail_check=1


You didn't ask, but as an aside, $mail_check of 1 is a bit too
aggressive for IMAP.   suggests
  set mail_check=90
  set timeout=15
which I think is a fairly balanced approach.



Re: Unexplained mutt error

2022-02-21 Thread Kevin J. McCarthy

On Mon, Feb 21, 2022 at 02:46:11PM -0600, Ion wrote:

set smtp_url ="smtp://smtp.fastmail.com:465"



But the response was...

"SMTP session failed: read error"


The prefix 'smtps://' should be used with port 465:
  set smtp_url ="smtps://smtp.fastmail.com:465"

Alternatively you can use 'smtp://' with port 587 to use STARTTLS:
  set smtp_url ="smtp://smtp.fastmail.com:587"


set timeout=15
set mail_check=1


You didn't ask, but as an aside, $mail_check of 1 is a bit too 
aggressive for IMAP.   suggests

  set mail_check=90
  set timeout=15
which I think is a fairly balanced approach.

--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: Unexplained mutt error

2022-02-21 Thread Ion

Since my previous attempts failed I decided to go the default route
using Fastmail IMAP and SMTP as advised on their web help page. I set my
.muttrc file as follows, hoping it would be easier to resolve the problem.

set imap_user=ionm...@eml.cc
set imap_pass="my fastmail password"
set realname    ="Ion"
set from = "ionm...@eml.cc"
set folder=imaps://imap.fastmail.com:993
set smtp_url ="smtp://smtp.fastmail.com:465"
set smtp_pass = "my fastmail password"
set ssl_force_tls =yes
set header_cache = ~/.cache/mutt
set spoolfile = "+INBOX"
set record ="+Sent Items"
set postponed="+Drafts"
set trash = "+Trash"
set editor ="nano"
set timeout=15
set mail_check=1
set check_new=yes
auto_view text/html

But the response was...

"SMTP session failed: read error"



Re: Receive email, filtering

2022-02-21 Thread Piet


Dear Charles,

thank you for the hint.
I'll try harder to get it work now, because I'm sure if will be possible.

But regarding fetchmail, the logs said that both options can't
be used together (On a Debian testing system):

With fetchmailrc:

options keep fetchall ssl mda "/usr/bin/procmail -d %T"

Starting with:  

$fetchmail 

Message:

Both fetchall and keep on in daemon or idle mode is a mistake!


I would be prefere to use fetchmail, because I use it for a long time.

Kind regards


Piet



Am Mon, Feb 21, 2022 at 09:00:47AM -0600 schrieb Charles Cazabon:
> Piet  wrote:
> > 
> > It seems, that fetchmail  receives emails from imap, but only in two
> > ways which can not be combined:
> [...]
> > Getmail seems to work similar to fetchmail.
> 
> > Is there the opportunity to fetch and filter email without deleting it in
> > the external imap account?
> 
> As the author of getmail, I can assure you that getmail is capable of
> retrieving mail and not deleting it from the server afterwards; it's explained
> in the docs.
> 
> As much as I detest fetchmail, it virtually certainly can also do this.
> 
> Charles
> -- 
> ---
> Charles Cazabon
> GPL'ed software available at:   http://pyropus.ca/software/
> ---


Re: Receive email, filtering

2022-02-21 Thread Charles Cazabon
Piet  wrote:
> 
> It seems, that fetchmail  receives emails from imap, but only in two
> ways which can not be combined:
[...]
> Getmail seems to work similar to fetchmail.

> Is there the opportunity to fetch and filter email without deleting it in
> the external imap account?

As the author of getmail, I can assure you that getmail is capable of
retrieving mail and not deleting it from the server afterwards; it's explained
in the docs.

As much as I detest fetchmail, it virtually certainly can also do this.

Charles
-- 
---
Charles Cazabon
GPL'ed software available at:   http://pyropus.ca/software/
---


Receive email, filtering

2022-02-21 Thread Piet
Dear List,

before I use email with several devices, I used fetchmail and procmail
to receive and filter email.

I switched from pop3 to (external) imap and have some question how to deal with 
mutt and mailfiltering.

It seems, that fetchmail  receives emails from imap, but only in two
ways which can not be combined:

1. 'Fetchall'  and delete the messages (option fetchall).
Problem: Messages are not avaible for other devices anymore on
external imap.
Or 

2. Fetch only the unread messages (option 'keep') and keep the messages.
Problem: Messages which are aleady red will not be fetched.

Both ways do not fit to my needs.
I'm not 100% sure if I understand how fetchmail is working.

Further I try mbsync, but it seems not to work with procmail.
Getmail seems to work similar to fetchmail.
I don't like to use 'sieve', because not all imap provider offer this. 

Is there the opportunity to fetch and filter email without deleting it in
the external imap account?

Thank you for your tipps!

Kind regards

Piet