Re: Question about message id

2024-04-09 Thread Dan Ritter
Cameron Simpson wrote: 
> On 07Apr2024 13:19, Ебрашка  wrote:
> > Question, what should I write in .muttrc to make my outgoing mails have
> > the same beautiful message-ID as Yandex mail?
> > For example Message-Id: <43265...@example.com> consisting of random
> > digits and domain name
> 
> I think it would be enough to supply your own message-id header; I don't
> think it is necessarily mutt making it at all. Mutt hands messages to a mail
> system, and a mail system adds a message-id if one is missing.
> 
> You could (a) turn on "set edit_headers=yes" so the headers are visible in
> your message and (b) have your editor startup make one?
> 
> _Or_ you could "set sendmail=" to a script of your own to add a message-id
> header - that is what mutt uses to deliver the message to a mail system -
> you could add a header there then pass the message on to whatever you had
> mutt using before.

And don't be overly clever and set a custom header to a script
that produces a message-id; that will get evaluated when mutt
starts and not again for every message, thus defeating the
point.

Please don't ask me how I know.


-dsr-


Re: Threads based on a custom header

2024-01-10 Thread Dan Ritter
dm1...@gmail.com wrote: 
> Hi all,
> 
> Is it possible to display messages (preferably automatically, as soon
> as the messages get in the mailbox) as one thread based on a value of
> a custom header? That is, all the messages that have the X header with
> the same value.


If you have threading on, when you l_imit your view to messages
with that have that ~h eader, you will see them threaded
according to the normal algorithm, which is probably what you
want.

i.e. if your custom header is X-Foo:, you can use:

l~hX-Foo

and only see X-Foo mail. If you only want to see X-Foo: barbaz, then

l~hX-Foo: barbaz

is your friend.

Introducing new parameters into the threading algorithm is
likely to be... tricky.

If this were a major part of my workload, I would probably use
a sieve or other mailfilter to append the value of X-Foo to
Subject, then drop all the X-Foo messages into their own folder,
and possibly write an outbound filter (replacing sendmail) to
remove the value of X-Foo from the end of Subject.

-dsr-


Re: hcache on tmpfs?

2023-03-31 Thread Dan Ritter
void wrote: 
> Hi mutts@
> 
> Mutt's config for $tmpdir points to a tmpfs here which is memory-backed
> and therefore v quick. The perms for this are set to 700.
> 
> I was wondering which hcache would be best in this use context. I'd like
> to point the hcache to this tmpdir. But I understand that kyotocabinet
> is memory-based already, so am unsure which to choose.

I don't know about "best", but I tried out putting hcache on a tmpfs,
and I can confirm that for large Maildirs (5000+) it makes a visible
difference even on an all SSD system.

-dsr-


Re: NeoMutt Opinions

2021-12-29 Thread Dan Ritter
Jeff Abrahamson wrote: 
> On Mon, Dec 27, 2021 at 12:33:09PM +, isdtor wrote:
> > 
> > > I fear the days where my dayjob requires me to use something else (than
> > > neo/mutt).
> > 
> > After a corp takeover, my dayjob is fully MS-centric. Yet, I am continuing 
> > to use mutt for everything that is required, including S/MIME, and LDAP/AD 
> > based address completion. Davmail+tb also works fine for the calendaring 
> > aspect.
> 
> I'm curious how you manage this, or maybe it's just a strong-willed 
> eccentricity. ;-)
> 
> Interacting with an HTML and mobile-first world has pushed my mutt usage to 
> (mostly) interacting with developers.

I'm not isdtor, but my approach is:

- read plaintext first, then look at HTML via w3m if it's not
  clear.

- have a vcal to text filter conveniently at hand -- a
  ridiculously large number of people send calendar invites that
  have no mention in the text of when they want to meet.

- have a webmail client available if necessary -- I use this at
  least once a week, but not every day.

- mail on my phone (K9) is solely for interrupts and
  emergencies. I only sync my inbox.

Mutt is by far the best client for dealing with large amounts of
mail that can't be autosorted.

-dsr-


Re: Are there any good maildir manipulation utilities out there?

2021-04-08 Thread Dan Ritter
Chris Green wrote: 
> On Thu, Apr 08, 2021 at 08:43:48AM +1000, Cameron Simpson wrote:
> > On 07Apr2021 18:34, Kurt Hackenberg  wrote:
> > >On 2021/04/07 18:16, Kurt Hackenberg wrote:
> > >>On 2021/04/07 17:01, Chris Green wrote:
> > >>>I'm looking for a tool which will allow me to search through a large
> > >>>hierarchy of maildir messages and then provide actions to take on the
> > >>>matched messages.

...


> Yes, that was just one typical requirement.  The other major
> requirement is rather different.  I have (for example) lots of
> messages about orders from Screwfix which are currently spread around
> in various sub-directories of 'shopping'.  For suppliers like Screwfix
> from whom I buy a lot of rather mixed up sort of items it now makes
> sense to me to keep them all in a Screwfix directory.  So the
> requirement is to find all messages from Screwfix and put them in one
> directory.
> 
> 
> > I suspect Chris may need to roll his own. I'd imagine something like:
> > 
> > find message paths using mairix \
> > | move message files sideways, making sure there's no conflicts
> > 
> Yes, I think it may have to be a roll my own something like this.
> It's just that mairix doesn't provide a very good 'handle' to use.

Have you added a mairix search => maildir integration in your
muttrc?

The Screwfix case would be:

macro index  "set my_cmd = 
\`/usr/local/bin/mairixsearch\`push \$my_cmd" 
"search messages"

macro index  "~/results." 
"display search results"

F8 f screwfix
F9
# tag or untag or whatever until you've got the right ones
;s =screwfix

Would that work for you?

-dsr-


Re: Cannot Receive Mail with Mutt / Debian Stable

2020-12-21 Thread Dan Ritter
D.J.J. Ring, Jr. wrote: 
> For several months now, I haven't been able to receive mail with mutt.

General, currently useless suggestion: don't let this sort of
thing go past a day or two. If you haven't solved it then, ask.

> When regrettably, I go into X Windows (MATE), I use webmail and see
> that google has blocked an attempt to log in and proudly says that the
> user (me) had my password.  I'm guessing since it always happens when
> I make little changes in .muttrc to see if I can get mail with mutt,
> that it's because of mutt.

I'm guessing that you are trying to use mutt to access GMail via
IMAP.

Is that correct?

Did you ask Google to set up an application-specific password
for mutt? It's in your Google security settings.

https://support.google.com/accounts/answer/185833?hl=en

-dsr-


Re: IMAPS && Certificate host check failed

2020-11-02 Thread Dan Ritter
Matthias Apitz wrote: 
> 
> Hello,
> 
> Since some days I get 
> 
> Certificate host check failed: certificate owner does not match hostname 
> pod51010.outlook.com
> 
> This certificate belongs to:
>outlook.com
>Unknown
>Microsoft Corporation
>Unknown
>Redmond
>Washington
>US
> 
> This certificate was issued by:
>DigiCert Cloud Services CA-1
>Unknown
>DigiCert Inc
>Unknown
>Unknown
>Unknown
>US
> 
> This certificate is valid
>from Oct  7 00:00:00 2020 GMT
>  to Oct  7 12:00:00 2021 GMT
> -- Mutt: SSL Certificate check (certificate 3 of 3 in chain)
> (r)eject, accept (o)nce
> 
> when I connect with mutt to imaps://pod51010.outlook.com/

Are you supposed to be connecting to pod51010, or to a branded
name or something like outlook.office365.com ?

Try 

openssl s_client -connect pod51010.outlook.com:993

to see what cert it is actually handing out.

-dsr-




Re: Handling Encrypted messages

2020-05-30 Thread Dan Ritter
John J. Boyer wrote: 
> Hello,
> 
> My insurance organization insists on sending Zimcorp Secure messages. is 
> there a way to handle these in Mutt?
> 

I'm assuming you mean Zixcorp. Zimcorp is a trucking company,
IIRC.

These messages are only email notifications that there is
something waiting for you in a web application; the messages on
the web application are not email.

-dsr-


Re: When using mutt with mailto: From and Fcc are holding wrong values

2019-06-11 Thread Dan Ritter
Martin wrote: 
> Hello everyone,
> I'm using mutt on Debian with several accounts and Firefox as a
> browser. When I click on a mailto: link it opens a new terminal with
> mutt and from all I see it does pick up my muttrc correctly, but the
> new email has "Fcc:" as ~/sent and "From" as myuser
> .
> 
> Same happens when I start it like:
> mutt mailto:f...@bar.net?subject=foo
> 
> Also tried to pass one of my accounts with the -f flag.
> I would expect mutt to select the first or any of my accounts to use
> for the Sent-folder and From-Address.
> 
> Can you give me advice how to use one of my regular accounts for
> composing emails via mailto links?

You'll need a wrapper that parses the mailto: URL and submits
the subject line as -s foo. It might as well set up your
terminal the way you like it and, if you want, use an alternate
.muttrc.

-dsr-



Re: mailing-list to bugs

2018-05-08 Thread Dan Ritter
On Tue, May 08, 2018 at 02:21:01PM -0400, jrun wrote:
> 
> i am looking for a library to parse email messages. i'm assigned to write
> something to parse incoming emails on our mailing-list and create bugs in
> bugzilla out of them and possibly appending to the existing bug. btw, how 
> would
> you do this? would you use Reference: ?  can neomutt/mutt be used for this
> and/or as a lib?

Depends on the language you use, but mostly I would think about
switching to Request Tracker (RT) which handles email very very
well.

What you want for bugzilla is probably

https://www.bugzilla.org/docs/3.0/html/api/email_in.html

and you probably want to work in Perl.

-dsr-


Re: moving messages on imap4 server based on date received

2017-09-28 Thread Dan Ritter
On Thu, Sep 28, 2017 at 02:10:22PM +0100, tech-lists wrote:
> Hello mutt-users@
> 
> I'm running mutt 1.9.1 (2017-09-22) on freebsd-11-stable.
> 
> What I'd like to have is, when mutt loads, it scans its subscribed
> folders and moves the mail based on date received into preconfigured
> mail folders. Either that, or maybe run another standalone program in a
> screen or cron that does the same. I don't want to "download" the mail
> at this stage - it needs to be moved around on the remote server.
> 
> Can mutt do this, or is there another program that does this with imap4?

If your IMAP server supports SIEVE, that is the easiest way to
get this done. Sorting will happen at delivery time.

If your mail server supports procmail, mailfilter, or running
your own delivery programs via a .forward or equivalent, that
is also an easy way to get this done at delivery time.

-dsr-


Re: Suggestions for offline/remote mail usage?

2011-06-27 Thread Dan Ritter
On Sun, Jun 26, 2011 at 08:04:09PM -0700, Dr. Ed Morbius wrote:
 
 The second hitch is coming up with a good way to have local mail
 submitted to the remote host when sending.  Local and remote MTAs are
 both exim4.  I'm thinking some magick with SSH (ssh-agent is running) or
 such.

Make your local MTA send all mail to local:2525.

Construct a mail tunnel with SSH and autossh and an SSH key
which is limited via authorized_keys on the remote host to 
only build a tunnel from local:2525 to remote:25.

autossh -N -L 2525:localhost:25 -i ~/.ssh/mail_key remote.example.com 

-dsr-

-- 
http://tao.merseine.nu/~dsr/eula.html is hereby incorporated by reference.
You can't fight for freedom by taking away rights.


Re: Thunderbird-like mail archives (macro)

2010-12-07 Thread Dan Ritter
On Tue, Dec 07, 2010 at 07:46:36PM +, seanh wrote:
 On Tue, Dec 07, 2010 at 05:37:29PM +, seanh wrote:
  Also, I realised that if the year is 2010 when you archive a mail then it 
  will
  go into Archives/2010, even though (if the mail has been hanging around in 
  your
  inbox) you might have actually received the mail in 2009. A better macro 
  might
  move each mail into a different archive folder depending on the date of the
  mail. Although in that case I worry about the possibility of receiving an 
  email
  in 2010 with an incorrect date header, stating 1977 to 2017 or something, 
  maybe
  I'm just paranoid.
 
 I think save-hook is pretty close to what you would need here. Unfortunately
 you need to filter messages according to their year, and their doesn't seem to
 be a save-hook expando for that (there is one for the date, but only for the
 full date as displayed in the index).

Given that I have this working nicely:
set record=~/Mail/archive/sent-`date +%Y-%m`

I'm sure that you could do a similar thing in a save-hook. If
you want annual rather than -MM, just make it `date +%Y`

-dsr-


-- 
http://tao.merseine.nu/~dsr/eula.html is hereby incorporated by reference.
You can't defend freedom by getting rid of it.


Re: Subfolders

2009-10-28 Thread Dan Ritter
On Wed, Oct 28, 2009 at 10:08:35PM +, Charles Howard wrote:
 
 I'd like such a system but I haven't got it to work. My question is:
 
 Do you, a mutt user, who is reading this, delete most of your email within a 
 short 
 period (say a week) ?

No. Real spam that was caught by my filter and properly
categorized gets deleted. Everything else gets archived.

 Here's my background. I am an academic and I get about 1000 emails a month. 
 This doesn't 
 include solid-crap spam (nor mailing lists) and I need to keep most of the 
 1000. I used pine 

I am a network and systems plumber and get about 1000 emails a day.

 Maybe mutt just isn't for keepers of emails? Or am I missing something?

mutt isn't great at sorting email. Mutt is certainly for keepers,
searchers and archivers of email.

On the mail server, my mail is spam-checked, then filtered into
folders. Each list gets its own folder. Major topics not in lists get
their own folders. Occasionally a person or a company becomes a topic in
its own right. The entire tree structure is replicated under /archive/,
as well.

Anything that comes in and is misfiled is moved to the proper folder. If
I've read something, I leave it alone. At the end of the month, or when
a folder is getting full of history I don't need, I tag everything more
than two months old and move that into the /archive/ equivalent folder.

For the initial sorting, procmail or mailfilter or whatever you
like is good. Just make sure the editing procedure is easy
enough that you're willing to do it every few days, and several
times a day while you are getting it set up.

-- 
http://tao.merseine.nu/~dsr/eula.html is hereby incorporated by reference.
You can't defend freedom by getting rid of it.


Re: keyboard paste address in compose, To: line

2009-09-04 Thread Dan Ritter
On Thu, Sep 03, 2009 at 09:42:02PM -0400, Thomas Baker wrote:
 On Thu, Sep 03, 2009 at 05:47:45PM -0500, Derek Martin wrote:
   I run mutt on Cygwin in a Windows console window 
  
  Yuck.  Why? :)  
 
 Well I'm glad you asked that question... :-)
 
  FWIW, you can run startx (in cygwin) and use a proper
  xterm, and save a lot of hastle.  The windows console is next to
  useless to me, and I find the fonts are horrible at the sizes I'd
  prefer to have them.  Anything comfortable to read is too large.
 
 I'm probably older than most people on this list, and I was
 never able to reproduce the nice, large, readable interface of a
 Windows console window with 10x18 Raster fonts in a 120x45
 window, black letters on grey, in any xterm window, though I'm
 sure it could be done if I had fiddled long enough with the
 settings.

If the font is named 10x18, then:

xterm -font 10x18 -fg black -bg grey -geometry 120x45 

I don't have a 10x18, but I have a 10x20, and substituting that
in worked.

For rxvt-unicode, -font becomes -fn.

-dsr-



-- 
http://tao.merseine.nu/~dsr/eula.html is hereby incorporated by reference.
You can't defend freedom by getting rid of it.


Re: The MBOX file paradigm

2009-09-04 Thread Dan Ritter
On Thu, Sep 03, 2009 at 10:27:20PM -0400, Thomas Baker wrote:
 If I am reading an important thread in mutt and need to put that
 thread into my to-do list, I save it as a file, e.g.:
 
 2009-09-03.mutt-rxvt-configuration.mbox
 
 I run a shell script to add a reference to that file to the
 to-do list in my browser, e.g. the clickable:
 
 a href=file://localhost/e:/foo/2009-09-03.mutt-rxvt-configuration.mbox
 
 I can move email files around just like any another
 data .doc or .xls files, and I can archive the email for a
 project together with all the other data files.

You might want to consider switching to Maildir.

Maildir uses a small directory structure (name, name/cur,
name/new, name/tmp) to hold messages as individual files.

The advantages are:

- reading/writing/moving/deleting messages is faster than opening an
  mbox, looking for the right message, editing it, then
  rewriting the whole mbox.

- grep returns individual messages, not an mbox to search
  through

- safe for multiple opens of the same Maildir simultaneously

- safe to use over NFS or Samba or what-have-you

- safe for MTA's to deliver to

The disadvantages are:

- it's not exactly what you are used to.

- reading a giant Maildir may be slower than reading a giant
  mbox.

Mutt supports Maildir very well.

-dsr-

-- 
http://tao.merseine.nu/~dsr/eula.html is hereby incorporated by reference.
You can't defend freedom by getting rid of it.


Re: keyboard paste address in compose, To: line

2009-09-03 Thread Dan Ritter
On Thu, Sep 03, 2009 at 01:19:43PM -0400, brownh wrote:
 Often, when composing a message, I want to past an address in the To: 
 line without using my mouse. However, the usual C-y or C-v keyboard 
 commands don't work. Any suggestions?

Entirely dependent on your terminal program, not Mutt. Mutt
doesn't know you're running in a graphical environment.

If you say what terminal program you're using, or what's
available to you, people may be able to help.

 If I may, a minor secondary question. When I type in an address on the 
 To: line, the insertion point is not visible. This is annoying when I 
 need to go back to correct a typo. I don't know where I am so that I 
 can do a DEL or type at the right place. Can I change this behavior?

Probably terminal program dependent as well.

-dsr-

-- 
http://tao.merseine.nu/~dsr/eula.html is hereby incorporated by reference.
You can't defend freedom by getting rid of it.