Re: exim - bad file descriptor

2023-06-12 Thread steve

Le 12-06-2023, à 21:25:40 +0200, Michel Verdier a écrit :


On 2023-06-11, steve wrote:


After a few days with this configuration, same errors are still present.

I guess I'll have either to reinstall or go the postfix way.


Just to be sure before you reinstall can you provide
exim -bP | grep syslog


syslog_duplication


Docs indicate it "controls duplicate log lines on syslog".
So adding syslog don't resolve the problem.

Sorry I don't have exim installed here and I can't help you more.
Try a purge+install. Perhaps after upgrading to bookworm :)


I've been a happy bookworm user for months already :)

Will give postfix a try one of these days.

Have a nice day



Re: exim - bad file descriptor

2023-06-12 Thread Michel Verdier
On 2023-06-11, steve wrote:

>>> After a few days with this configuration, same errors are still present.
>>>
>>> I guess I'll have either to reinstall or go the postfix way.
>>
>>Just to be sure before you reinstall can you provide
>>exim -bP | grep syslog
>
> syslog_duplication

Docs indicate it "controls duplicate log lines on syslog".
So adding syslog don't resolve the problem.

Sorry I don't have exim installed here and I can't help you more.
Try a purge+install. Perhaps after upgrading to bookworm :)



Re: exim - bad file descriptor

2023-06-11 Thread steve

Hi Michel,

Le 10-06-2023, à 11:19:25 +0200, Michel Verdier a écrit :


On 2023-06-10, steve wrote:


Hi Michel and al,

After a few days with this configuration, same errors are still present.

I guess I'll have either to reinstall or go the postfix way.


Just to be sure before you reinstall can you provide
exim -bP | grep syslog


syslog_duplication
syslog_facility =
syslog_pid
syslog_processname = exim
syslog_timestamp



Re: exim - bad file descriptor

2023-06-10 Thread Michel Verdier
On 2023-06-10, steve wrote:

> Hi Michel and al,
>
> After a few days with this configuration, same errors are still present.
>
> I guess I'll have either to reinstall or go the postfix way.

Just to be sure before you reinstall can you provide
exim -bP | grep syslog



Re: exim - bad file descriptor

2023-06-10 Thread steve

Hi Michel and al,

After a few days with this configuration, same errors are still present.

I guess I'll have either to reinstall or go the postfix way.

Have a nice day,

steve

Le 05-06-2023, à 10:50:00 +0200, Michel Verdier a écrit :


Le 5 juin 2023 Steve a écrit :


if one succeed without message and with code 0, add in
/etc/logrotate.d/exim4-base and /etc/logrotate.d/exim4-paniclog

   postrotate
   systemctl  exim4-base
   endscript

if you add reload but still get the error try restart, I don't know if
the reload free the files


Since this is a vanilla setup, I might as well uninstall and purge exim4
and re-install it (or postfix), what do you think?


Yes I wonder why debian don't add the postrotate.
But there is a specific package exim4-config. So you can do
dpkg-reconfigure exim4-config
you should ask to use syslog and not direct logging
it will add log_file_path in config files (you can check after)

I only use postfix for me and clients for a long time, so don't ask me :
postfix rules :)





Re: exim - bad file descriptor

2023-06-05 Thread Steve

Le 05-06-2023, à 10:50:00 +0200, Michel Verdier a écrit :


Le 5 juin 2023 Steve a écrit :


if one succeed without message and with code 0, add in
/etc/logrotate.d/exim4-base and /etc/logrotate.d/exim4-paniclog

   postrotate
   systemctl  exim4-base
   endscript

if you add reload but still get the error try restart, I don't know if
the reload free the files


Since this is a vanilla setup, I might as well uninstall and purge exim4
and re-install it (or postfix), what do you think?


Yes I wonder why debian don't add the postrotate.
But there is a specific package exim4-config. So you can do
dpkg-reconfigure exim4-config


Just did that, left unchanged except for the minimize DNS request, which
I enabled.


you should ask to use syslog and not direct logging


I did.


it will add log_file_path in config files (you can check after)


Now:

log_file_path = /var/log/exim4/%slog


I only use postfix for me and clients for a long time, so don't ask me :
postfix rules :)


Maybe another story later… :)



Re: exim - bad file descriptor

2023-06-05 Thread Michel Verdier
Le 5 juin 2023 Steve a écrit :

>>if one succeed without message and with code 0, add in
>>/etc/logrotate.d/exim4-base and /etc/logrotate.d/exim4-paniclog
>>
>>postrotate
>>systemctl  exim4-base
>>endscript
>>
>>if you add reload but still get the error try restart, I don't know if
>>the reload free the files
>
> Since this is a vanilla setup, I might as well uninstall and purge exim4
> and re-install it (or postfix), what do you think?

Yes I wonder why debian don't add the postrotate.
But there is a specific package exim4-config. So you can do
dpkg-reconfigure exim4-config
you should ask to use syslog and not direct logging
it will add log_file_path in config files (you can check after)

I only use postfix for me and clients for a long time, so don't ask me :
postfix rules :)



Re: exim - bad file descriptor

2023-06-05 Thread Steve

Le 05-06-2023, à 10:21:52 +0200, Michel Verdier a écrit :


Le 5 juin 2023 Steve a écrit :


Merci pour ton aide Michel.


De rien :) Let's continue in english for the list


Sure.


log_file_path = /var/log/exim4/%slog
log_selector = +smtp_protocol_error +smtp_syntax_error 
+tls_certificate_verified +tls_peerdn


exim writes directly to the logfiles. If you get the error almost every
day it can be because of the rotation.


This error appears everyday. I boot my machine every morning at 6 am.


I don't know it exim provide a reload command, so try

systemctl reload exim4-base


systemctl reload exim4-base.service
Failed to reload exim4-base.service: Job type reload is not applicable for unit 
exim4-base.service.

systemctl status exim4-base.service
○ exim4-base.service - exim4-base housekeeping
 Loaded: loaded (/lib/systemd/system/exim4-base.service; static)
 Active: inactive (dead)
TriggeredBy: ● exim4-base.timer
   Docs: man:exim4(8)





it should be exim4-base but if the service is not found type exim and TAB
to find the actual service name

if it fails try

systemctl restart exim4-base


I stopped and restarted the service. Now I get:

 systemctl status exim4-base.service
○ exim4-base.service - exim4-base housekeeping
 Loaded: loaded (/lib/systemd/system/exim4-base.service; static)
 Active: inactive (dead) since Mon 2023-06-05 10:29:02 CEST; 35s ago
TriggeredBy: ● exim4-base.timer
   Docs: man:exim4(8)
Process: 41181 ExecStart=/etc/cron.daily/exim4-base systemd-timer 
(code=exited, status=0/SUCCESS)
   Main PID: 41181 (code=exited, status=0/SUCCESS)
CPU: 63ms

jun 05 10:29:02 box.lan systemd[1]: Starting exim4-base.service - exim4-base 
housekeeping...
jun 05 10:29:02 box.lan systemd[1]: exim4-base.service: Deactivated 
successfully.
jun 05 10:29:02 box.lan systemd[1]: Finished exim4-base.service - exim4-base 
housekeeping.



if one succeed without message and with code 0, add in
/etc/logrotate.d/exim4-base and /etc/logrotate.d/exim4-paniclog

   postrotate
   systemctl  exim4-base
   endscript

if you add reload but still get the error try restart, I don't know if
the reload free the files



Since this is a vanilla setup, I might as well uninstall and purge exim4
and re-install it (or postfix), what do you think?



Re: exim - bad file descriptor

2023-06-05 Thread Michel Verdier
Le 5 juin 2023 Steve a écrit :

> Merci pour ton aide Michel.

De rien :) Let's continue in english for the list

> log_file_path = /var/log/exim4/%slog
> log_selector = +smtp_protocol_error +smtp_syntax_error 
> +tls_certificate_verified +tls_peerdn

exim writes directly to the logfiles. If you get the error almost every
day it can be because of the rotation.

I don't know it exim provide a reload command, so try

systemctl reload exim4-base

it should be exim4-base but if the service is not found type exim and TAB
to find the actual service name

if it fails try

systemctl restart exim4-base

if one succeed without message and with code 0, add in
/etc/logrotate.d/exim4-base and /etc/logrotate.d/exim4-paniclog

postrotate
systemctl  exim4-base
endscript

if you add reload but still get the error try restart, I don't know if
the reload free the files



Re: exim - bad file descriptor

2023-06-05 Thread Steve

Le 05-06-2023, à 09:09:05 +0200, Michel Verdier a écrit :


Le 5 juin 2023 Steve a écrit :


Yes, nothing is done after rotation. But I don't remember the default
exim logging mechanism. Can you provide

grep -r log_file_path /etc/exim*


This gives nothing.


Then can you provide
exim -bP
(snip ip adresses if you want)


See attached file.

Merci pour ton aide Michel.
accept_8bitmime
acl_not_smtp = 
acl_not_smtp_start = 
acl_smtp_auth = 
acl_smtp_connect = 
acl_smtp_data = acl_check_data
acl_smtp_data_prdr = accept
acl_smtp_dkim = 
acl_smtp_etrn = 
acl_smtp_expn = 
acl_smtp_helo = 
acl_smtp_mail = acl_check_mail
acl_smtp_mailauth = 
acl_smtp_notquit = 
acl_smtp_predata = 
acl_smtp_quit = 
acl_smtp_rcpt = acl_check_rcpt
acl_smtp_starttls = 
acl_smtp_vrfy = 
add_environment = 
admin_groups =
no_allow_domain_literals
no_allow_mx_to_ip
no_allow_utf8_domains
auth_advertise_hosts = *
auto_thaw = 0s
bi_command = 
bounce_message_file = 
bounce_message_text = 
bounce_return_body
bounce_return_linesize_limit = 998
bounce_return_message
bounce_return_size_limit = 100K
bounce_sender_authentication = 
callout_domain_negative_expire = 3h
callout_domain_positive_expire = 1w
callout_negative_expire = 2h
callout_positive_expire = 1d
callout_random_local_part = $primary_hostname-$tod_epoch-testing
check_log_inodes = 100
check_log_space = 10M
check_rfc2047_length
check_spool_inodes = 100
check_spool_space = 10M
chunking_advertise_hosts = *
no_commandline_checks_require_admin
daemon_smtp_ports = smtp
daemon_startup_retries = 9
daemon_startup_sleep = 30s
no_debug_store
delay_warning = 1d
delay_warning_condition = ${if or {{ 
!eq{$h_list-id:$h_list-post:$h_list-subscribe:}{} }{ 
match{$h_precedence:}{(?i)bulk|list|junk} }{ 
match{$h_auto-submitted:}{(?i)auto-generated|auto-replied} }} {no}{yes}}
no_deliver_drop_privilege
deliver_queue_load_max =
delivery_date_remove
no_disable_ipv6
dkim_verify_hashes = sha256:sha512
dkim_verify_keytypes = ed25519:rsa
dkim_verify_min_keysizes = rsa=1024 ed25519=250
no_dkim_verify_minimal
dkim_verify_signers = $dkim_signers
dns_again_means_nonexist = 
dns_check_names_pattern = (?i)^(?>(?(1)\.|())[^\W](?>[a-z0-9/_-]*[^\W])?)+(\.?)$
dns_cname_loops = 1
dns_csa_search_limit = 5
dns_csa_use_reverse
dns_dnssec_ok = 1
dns_ipv4_lookup = 
dns_retrans = 0s
dns_retry = 0
dns_trust_aa = 
dns_use_edns0 = -1
no_drop_cr
dsn_advertise_hosts = 
dsn_from = Mail Delivery System 
envelope_to_remove
errors_copy = 
errors_reply_to = 
event_action = 
exim_group = Debian-exim
exim_path = /usr/sbin/exim4
exim_user = Debian-exim
exim_version = 4.96
extra_local_interfaces = 
extract_addresses_remove_arguments
finduser_retries = 0
freeze_tell = postmaster
gecos_name = $1
gecos_pattern = ^([^,:]*)
no_gnutls_allow_auto_pkcs11
no_gnutls_compat_mode
header_line_maxsize = 0
header_maxsize = 1048576
headers_charset = UTF-8
helo_accept_junk_hosts = 
helo_allow_chars = 
helo_lookup_domains = @ : @[]
helo_try_verify_hosts = 
helo_verify_hosts = 
hold_domains = 
host_lookup = *
host_lookup_order = bydns:byaddr
host_reject_connection = 
hosts_connection_nolog = 
hosts_require_alpn = 
hosts_require_helo = *
hosts_treat_as_local = 
ignore_bounce_errors_after = 2d
ignore_fromline_hosts = 
no_ignore_fromline_local
keep_environment = 
keep_malformed = 4d
no_local_from_check
local_from_prefix = 
local_from_suffix = 
local_interfaces = <; 127.0.0.1 ; ::1
local_scan_path = 
local_scan_timeout = 5m
local_sender_retain
localhost_number = 
log_file_path = /var/log/exim4/%slog
log_selector = +smtp_protocol_error +smtp_syntax_error 
+tls_certificate_verified +tls_peerdn
no_log_timezone
lookup_open_max = 25
max_username_length = 0
no_message_body_newlines
message_body_visible = 500
message_id_header_domain = 
message_id_header_text = 
message_logs
message_size_limit = 50M
no_move_frozen_messages
no_mua_wrapper
never_users =
notifier_socket = $spool_directory/exim_daemon_notify
openssl_options = 
percent_hack_domains = 
pid_file_path = /run/exim4/exim.pid
pipelining_advertise_hosts = *
pipelining_connect_advertise_hosts = *
prdr_enable
no_preserve_message_logs
primary_hostname = box.lan
no_print_topbitchars
process_log_path = /var/spool/exim4/exim-process.info
prod_requires_admin
qualify_domain = box.lan
qualify_recipient = box.lan
queue_domains = 
no_queue_fast_ramp
queue_list_requires_admin
no_queue_only
queue_only_file = 
queue_only_load =
queue_only_load_latch
queue_only_override
no_queue_run_in_order
queue_run_max = 5
queue_smtp_domains = 
receive_timeout = 0s
received_header_text = Received: ${if def:sender_rcvhost {from 
$sender_rcvhost\n\t}{${if def:sender_ident {from 
${quote_local_part:$sender_ident} }}${if def:sender_helo_name 
{(helo=$sender_helo_name)\n\tby $primary_hostname ${if 
def:received_protocol {with $received_protocol }}${if def:tls_in_ver{ 
($tls_in_ver)}}${if def:tls_in_cipher_std { tls $tls_in_cipher_std\n\t}}(Exim 
$version_number)\n\t${if def:sender_address {(envelope-from 
<$sender_address>)\n\t}}id 

Re: exim - bad file descriptor

2023-06-05 Thread Michel Verdier
Le 5 juin 2023 Steve a écrit :

>>Yes, nothing is done after rotation. But I don't remember the default
>>exim logging mechanism. Can you provide
>>
>>grep -r log_file_path /etc/exim*
>
> This gives nothing.

Then can you provide
exim -bP
(snip ip adresses if you want)



Re: exim - bad file descriptor

2023-06-05 Thread Steve

Le 04-06-2023, à 19:11:57 +0200, Michel Verdier a écrit :


Le 4 juin 2023 Steve a écrit :


Does this help?


Yes, nothing is done after rotation. But I don't remember the default
exim logging mechanism. Can you provide

grep -r log_file_path /etc/exim*


This gives nothing.



Re: exim - bad file descriptor

2023-06-04 Thread Michel Verdier
Le 4 juin 2023 Steve a écrit :

> Does this help?

Yes, nothing is done after rotation. But I don't remember the default
exim logging mechanism. Can you provide

grep -r log_file_path /etc/exim*



Re: exim - bad file descriptor

2023-06-04 Thread Steve

Le 04-06-2023, à 14:30:08 +0200, Michel Verdier a écrit :


Le 4 juin 2023 Steve a écrit :


2023-06-04T06:30:54.117016+02:00 box exim[24894]: 2023-06-04 06:30:54 
1q5fOD-0006TT-2C failed to write to main log: length=91 result=-1 errno=9 (Bad 
file descriptor)
2023-06-04T06:30:54.150516+02:00 box exim[24894]: write failed on panic log: 
length=116 result=-1 errno=9 (Bad file descriptor)
jun 04 06:30:54 box.lan exim[24894]: 2023-06-04 06:30:54 1q5fOD-0006TT-2C 
failed to write to main log: length=91 result=-1 errno=9 (Bad file descriptor)
jun 04 06:30:54 box.lan exim[24894]: write failed on panic log: length=116 
result=-1 errno=9 (Bad file descriptor)


6h25 is the usual hour for cron.daily launching logrotate.
Check in /etc/logrotate.d/ if exim is reloaded/restarted after rotation.


cat /etc/logrotate.d/exim4-base
/var/log/exim4/mainlog /var/log/exim4/rejectlog {
daily
missingok
rotate 10
compress
delaycompress
notifempty
nocreate
}


cat /etc/logrotate.d/exim4-paniclog
/var/log/exim4/paniclog {
size 10M
missingok
rotate 10
compress
delaycompress
notifempty
nocreate
}

Does this help?



Re: exim - bad file descriptor

2023-06-04 Thread Michel Verdier
Le 4 juin 2023 Steve a écrit :

> 2023-06-04T06:30:54.117016+02:00 box exim[24894]: 2023-06-04 06:30:54 
> 1q5fOD-0006TT-2C failed to write to main log: length=91 result=-1 errno=9 
> (Bad file descriptor)
> 2023-06-04T06:30:54.150516+02:00 box exim[24894]: write failed on panic log: 
> length=116 result=-1 errno=9 (Bad file descriptor)
> jun 04 06:30:54 box.lan exim[24894]: 2023-06-04 06:30:54 1q5fOD-0006TT-2C 
> failed to write to main log: length=91 result=-1 errno=9 (Bad file descriptor)
> jun 04 06:30:54 box.lan exim[24894]: write failed on panic log: length=116 
> result=-1 errno=9 (Bad file descriptor)

6h25 is the usual hour for cron.daily launching logrotate.
Check in /etc/logrotate.d/ if exim is reloaded/restarted after rotation.