Re: Fetching local mail

2023-11-18 Thread Greg Wooledge
On Sat, Nov 18, 2023 at 03:58:20PM -0500, Pocket wrote:
> Will this work?
> 
> symlink /var/mail/paulf to /home/paulf/Mail/in
> 
> ln -vs /home/paulf/Mail/in /var/mail/paulf

I wouldn't expect it to work.  Most programs that try to deliver to
an mbox file like /var/mail/username will try to "dot-lock" it (by
creating another file next to it with a .lock extension, and using
that as a sort of semaphor), and that isn't likely to work across
file systems.  There may also be security measures in place (AppArmor
and so on) which restrain the reach of a mail delivery agent to
specific directories.  Symlinks tend to interact poorly with such things.

You're much better off configuring a ~/.forward file if you're running
an MTA which honors that.



Re: Fetching local mail

2023-11-18 Thread Pocket



On 11/18/23 07:44, Paul M Foster wrote:

Folks:

After using claws-mail for a number of years, I'm testing the idea of going
back to mutt and fetchmail. One problem I've encountered is how to get
local mail in /var/mail/paulf into mutt's inbox at /home/paulf/Mail/in.

I could run a POP server, and have fetchmail query it like any other
smarthost, but I'd rather not add another daemon. Does anyone know a way to
have mutt and/or fetchmail grab mail from /var/mail/paulf to
/home/paulf/Mail/in?

Paul



Will this work?

symlink /var/mail/paulf to /home/paulf/Mail/in

ln -vs /home/paulf/Mail/in /var/mail/paulf


--
It's not easy to be me



Re: Fetching local mail

2023-11-18 Thread Dan Ritter
Paul M Foster wrote: 
> Also worth noting that I have exim installed, which handles the cron job
> emails, and puts them, by default into the standard location,
> /var/mail/paulf.


Missed this. You can either have exim hand off to maildrop, or
deliver where you want via a .forward file in your $HOME:

https://www.exim.org/exim-html-current/doc/html/spec_html/filter_ch-forwarding_and_filtering_in_exim.html
and
https://www.exim.org/exim-html-current/doc/html/spec_html/filter_ch-exim_filter_files.html

-dsr-



Re: Fetching local mail

2023-11-18 Thread Dan Ritter
Paul M Foster wrote: 
> On Sat, Nov 18, 2023 at 09:29:02AM -0500, Dan Ritter wrote:
> 
> > Paul M Foster wrote: 
> > > After using claws-mail for a number of years, I'm testing the idea of 
> > > going
> > > back to mutt and fetchmail. One problem I've encountered is how to get
> > > local mail in /var/mail/paulf into mutt's inbox at /home/paulf/Mail/in.
> > > 
> > > I could run a POP server, and have fetchmail query it like any other
> > > smarthost, but I'd rather not add another daemon. Does anyone know a way 
> > > to
> > > have mutt and/or fetchmail grab mail from /var/mail/paulf to
> > > /home/paulf/Mail/in?
> > 
> > Options:
> > 
> > 1. tell mutt your spool is /var/mail/paulf:
> > 
> > set spoolfile="/var/mail/paulf"
> 
> This would be okay if all my mail was delivered to that spool file, but it
> isn't. Fetchmail hands off (internet) mail to maildrop, which puts in my
> spool file at /home/paulf/Mail/in. That's where mutt thinks my spool file
> is. Only mail generated by the system or cron jobs is delivered to
> /var/mail/paulf. And I'd like that mail to end up instead in
> /home/paulf/Mail/in.


That's easy, then. Have your system mail handled by maildrop as
well.

Your system is most likely running exim or postfix; either one
can invoke maildrop as a local delivery agent, which will then
read your .mailfilter and obey it. 

-dsr-
 



Re: Fetching local mail

2023-11-18 Thread Christoph Brinkhaus
Am Sat, Nov 18, 2023 at 10:15:42AM -0500 schrieb Paul M Foster:
> On Sat, Nov 18, 2023 at 09:29:02AM -0500, Dan Ritter wrote:
> 
> > Paul M Foster wrote: 
> > > After using claws-mail for a number of years, I'm testing the idea of 
> > > going
> > > back to mutt and fetchmail. One problem I've encountered is how to get
> > > local mail in /var/mail/paulf into mutt's inbox at /home/paulf/Mail/in.
> > > 
> > > I could run a POP server, and have fetchmail query it like any other
> > > smarthost, but I'd rather not add another daemon. Does anyone know a way 
> > > to
> > > have mutt and/or fetchmail grab mail from /var/mail/paulf to
> > > /home/paulf/Mail/in?
> > 
> > Options:
> > 
> > 1. tell mutt your spool is /var/mail/paulf:
> > 
> > set spoolfile="/var/mail/paulf"
> 
> This would be okay if all my mail was delivered to that spool file, but it
> isn't. Fetchmail hands off (internet) mail to maildrop, which puts in my
> spool file at /home/paulf/Mail/in. That's where mutt thinks my spool file
> is. Only mail generated by the system or cron jobs is delivered to
> /var/mail/paulf. And I'd like that mail to end up instead in
> /home/paulf/Mail/in.
> 
> Also worth noting that I have exim installed, which handles the cron job
> emails, and puts them, by default into the standard location,
> /var/mail/paulf.
> 
> > 
> > (if that's a Maildir, end it with a /)
> > 
> > 2. tell fetchmail to deliver via a local agent that will put
> > things where you want them, like procmail or mailfilter or...
> > anyway, use the 'mda' config in fetchmail's config file to
> > specify that.
> > 
> 
> Fetchmail already hands off to maildrop, which puts all (internet) mail in
> /home/paulf/Mail/in. But it appears that fetchmail only queries servers,
> and then passes off the mail to an mda. I can't get it to simply copy mail
> (and delete it) from a spool file and deliver it to the mda.

If you configure fetchmail not to use an MDA as maildrop, fetchmail will
deliver incomming mails to exim. May be this is an option.

Kind regards,
Christoph
-- 
Ist die Katze gesund
schmeckt sie dem Hund.


signature.asc
Description: PGP signature


Re: Fetching local mail

2023-11-18 Thread Greg Wooledge
On Sat, Nov 18, 2023 at 10:15:42AM -0500, Paul M Foster wrote:
> This would be okay if all my mail was delivered to that spool file, but it
> isn't. Fetchmail hands off (internet) mail to maildrop, which puts in my
> spool file at /home/paulf/Mail/in. That's where mutt thinks my spool file
> is. Only mail generated by the system or cron jobs is delivered to
> /var/mail/paulf. And I'd like that mail to end up instead in
> /home/paulf/Mail/in.

Then it depends on what program is doing the local delivery.  If it's
some member of the sendmail family (including exim??) then you might
be able to configure it by creating a ~/.forward file.

I don't know maildrop.  You'll have to read its docs to see how to
control it.



Re: Fetching local mail

2023-11-18 Thread Paul M Foster
On Sat, Nov 18, 2023 at 09:29:02AM -0500, Dan Ritter wrote:

> Paul M Foster wrote: 
> > After using claws-mail for a number of years, I'm testing the idea of going
> > back to mutt and fetchmail. One problem I've encountered is how to get
> > local mail in /var/mail/paulf into mutt's inbox at /home/paulf/Mail/in.
> > 
> > I could run a POP server, and have fetchmail query it like any other
> > smarthost, but I'd rather not add another daemon. Does anyone know a way to
> > have mutt and/or fetchmail grab mail from /var/mail/paulf to
> > /home/paulf/Mail/in?
> 
> Options:
> 
> 1. tell mutt your spool is /var/mail/paulf:
> 
> set spoolfile="/var/mail/paulf"

This would be okay if all my mail was delivered to that spool file, but it
isn't. Fetchmail hands off (internet) mail to maildrop, which puts in my
spool file at /home/paulf/Mail/in. That's where mutt thinks my spool file
is. Only mail generated by the system or cron jobs is delivered to
/var/mail/paulf. And I'd like that mail to end up instead in
/home/paulf/Mail/in.

Also worth noting that I have exim installed, which handles the cron job
emails, and puts them, by default into the standard location,
/var/mail/paulf.

> 
> (if that's a Maildir, end it with a /)
> 
> 2. tell fetchmail to deliver via a local agent that will put
> things where you want them, like procmail or mailfilter or...
> anyway, use the 'mda' config in fetchmail's config file to
> specify that.
> 

Fetchmail already hands off to maildrop, which puts all (internet) mail in
/home/paulf/Mail/in. But it appears that fetchmail only queries servers,
and then passes off the mail to an mda. I can't get it to simply copy mail
(and delete it) from a spool file and deliver it to the mda.

Paul

-- 
Paul M. Foster
Personal Blog: http://noferblatz.com
Company Site: http://quillandmouse.com
Software Projects: https://gitlab.com/paulmfoster



Re: Fetching local mail

2023-11-18 Thread Dan Ritter
Paul M Foster wrote: 
> After using claws-mail for a number of years, I'm testing the idea of going
> back to mutt and fetchmail. One problem I've encountered is how to get
> local mail in /var/mail/paulf into mutt's inbox at /home/paulf/Mail/in.
> 
> I could run a POP server, and have fetchmail query it like any other
> smarthost, but I'd rather not add another daemon. Does anyone know a way to
> have mutt and/or fetchmail grab mail from /var/mail/paulf to
> /home/paulf/Mail/in?

Options:

1. tell mutt your spool is /var/mail/paulf:

set spoolfile="/var/mail/paulf"

(if that's a Maildir, end it with a /)

2. tell fetchmail to deliver via a local agent that will put
things where you want them, like procmail or mailfilter or...
anyway, use the 'mda' config in fetchmail's config file to
specify that.

-dsr-



Fetching local mail

2023-11-18 Thread Paul M Foster
Folks:

After using claws-mail for a number of years, I'm testing the idea of going
back to mutt and fetchmail. One problem I've encountered is how to get
local mail in /var/mail/paulf into mutt's inbox at /home/paulf/Mail/in.

I could run a POP server, and have fetchmail query it like any other
smarthost, but I'd rather not add another daemon. Does anyone know a way to
have mutt and/or fetchmail grab mail from /var/mail/paulf to
/home/paulf/Mail/in?

Paul


-- 
Paul M. Foster
Personal Blog: http://noferblatz.com
Company Site: http://quillandmouse.com
Software Projects: https://gitlab.com/paulmfoster