mirror of
https://git.sr.ht/~magic_rb/dotfiles
synced 2024-11-25 17:46:14 +01:00
Add overlay for getmail6
Signed-off-by: Magic_RB <magic_rb@redalder.org>
This commit is contained in:
parent
d9b1925c57
commit
62d4c68f62
|
@ -56,6 +56,7 @@
|
||||||
overlays/zfs-relmount
|
overlays/zfs-relmount
|
||||||
overlays/ical2org.nix
|
overlays/ical2org.nix
|
||||||
overlays/mautrix-discord.nix
|
overlays/mautrix-discord.nix
|
||||||
|
overlays/getmail6
|
||||||
overlays/maildrop
|
overlays/maildrop
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
14
overlays/getmail6/default.nix
Normal file
14
overlays/getmail6/default.nix
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
let
|
||||||
|
inherit (lib)
|
||||||
|
singleton;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
flake.overlays.getmail6 =
|
||||||
|
final: prev:
|
||||||
|
{
|
||||||
|
getmail6 = prev.getmail6.overrideAttrs (old: {
|
||||||
|
patches = singleton ./getmail-read-exec-from-path.patch;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
}
|
73
overlays/getmail6/getmail-read-exec-from-path.patch
Normal file
73
overlays/getmail6/getmail-read-exec-from-path.patch
Normal file
|
@ -0,0 +1,73 @@
|
||||||
|
diff --git a/getmailcore/baseclasses.py b/getmailcore/baseclasses.py
|
||||||
|
index 7143886..e94ba0d 100755
|
||||||
|
--- a/getmailcore/baseclasses.py
|
||||||
|
+++ b/getmailcore/baseclasses.py
|
||||||
|
@@ -261,7 +261,7 @@ class ConfFile(ConfString):
|
||||||
|
if val is None:
|
||||||
|
return None
|
||||||
|
val = expand_user_vars(val)
|
||||||
|
- if not os.path.isfile(val):
|
||||||
|
+ if not os.path.isfile(val) and not self.name == 'path' and not self.name == 'password_command':
|
||||||
|
raise getmailConfigurationError(
|
||||||
|
'%s: specified file "%s" does not exist' % (self.name, val)
|
||||||
|
)
|
||||||
|
@@ -473,7 +473,7 @@ class ForkingBase(object):
|
||||||
|
stdout, stderr, args, nolog=False):
|
||||||
|
self._pipemail(msg, delivered_to, received, unixfrom, stdout, stderr)
|
||||||
|
nolog or self.log.debug('about to execl() with args %s\n' % str(args))
|
||||||
|
- os.execl(*args)
|
||||||
|
+ os.execlp(*args)
|
||||||
|
|
||||||
|
def forkchild(self, childfun, with_out=True):
|
||||||
|
self.child = child = Namespace()
|
||||||
|
diff --git a/getmailcore/destinations.py b/getmailcore/destinations.py
|
||||||
|
index 2d25558..d7adeba 100755
|
||||||
|
--- a/getmailcore/destinations.py
|
||||||
|
+++ b/getmailcore/destinations.py
|
||||||
|
@@ -607,9 +607,9 @@ class MDA_external(DeliverySkeleton, ForkingBase):
|
||||||
|
def initialize(self):
|
||||||
|
self.log.trace()
|
||||||
|
self.conf['command'] = os.path.basename(self.conf['path'])
|
||||||
|
- if not os.access(self.conf['path'], os.X_OK):
|
||||||
|
- raise getmailConfigurationError('%s not executable'
|
||||||
|
- % self.conf['path'])
|
||||||
|
+ # if not os.access(self.conf['path'], os.X_OK):
|
||||||
|
+ # raise getmailConfigurationError('%s not executable'
|
||||||
|
+ # % self.conf['path'])
|
||||||
|
if type(self.conf['arguments']) != tuple:
|
||||||
|
raise getmailConfigurationError(
|
||||||
|
'incorrect arguments format; see documentation (%s)'
|
||||||
|
diff --git a/getmailcore/filters.py b/getmailcore/filters.py
|
||||||
|
index e118e8e..014970a 100755
|
||||||
|
--- a/getmailcore/filters.py
|
||||||
|
+++ b/getmailcore/filters.py
|
||||||
|
@@ -193,10 +193,10 @@ class Filter_external(FilterSkeleton, ForkingBase):
|
||||||
|
def initialize(self):
|
||||||
|
self.log.trace()
|
||||||
|
self.conf['command'] = os.path.basename(self.conf['path'])
|
||||||
|
- if not os.access(self.conf['path'], os.X_OK):
|
||||||
|
- raise getmailConfigurationError(
|
||||||
|
- '%s not executable' % self.conf['path']
|
||||||
|
- )
|
||||||
|
+ # if not os.access(self.conf['path'], os.X_OK):
|
||||||
|
+ # raise getmailConfigurationError(
|
||||||
|
+ # '%s not executable' % self.conf['path']
|
||||||
|
+ # )
|
||||||
|
if type(self.conf['arguments']) != tuple:
|
||||||
|
raise getmailConfigurationError(
|
||||||
|
'incorrect arguments format; see documentation (%s)'
|
||||||
|
@@ -332,10 +332,10 @@ class Filter_TMDA(FilterSkeleton, ForkingBase):
|
||||||
|
def initialize(self):
|
||||||
|
self.log.trace()
|
||||||
|
self.conf['command'] = os.path.basename(self.conf['path'])
|
||||||
|
- if not os.access(self.conf['path'], os.X_OK):
|
||||||
|
- raise getmailConfigurationError(
|
||||||
|
- '%s not executable' % self.conf['path']
|
||||||
|
- )
|
||||||
|
+ # if not os.access(self.conf['path'], os.X_OK):
|
||||||
|
+ # raise getmailConfigurationError(
|
||||||
|
+ # '%s not executable' % self.conf['path']
|
||||||
|
+ # )
|
||||||
|
self.exitcodes_keep = (0, )
|
||||||
|
self.exitcodes_drop = (99, )
|
||||||
|
|
Loading…
Reference in a new issue