You are not logged in.

#1 2022-05-22 04:48:37

Salkay
Member
Registered: 2014-05-22
Posts: 619

[UNSOLVED] S-nail mail freezes system when autostarted

I have a file at ~/.config/autostart/foo.desktop that executes a script. This script sends mails to me.

printf '%s\n' "foo" | mail -:x -s "Subject" salkay 2>/tmp/mail.log

The script works perfectly when called from the command line. Until recently, it also worked fine when autostarted. However, it now causes the entire system (KDE Plasma) to freeze on startup (apart from the mouse cursor). I thought maybe something KDE had to be initialised, so I added sleep 20 to the beginning, but it still freezes everything. I tried to get more information with debugging and verbose modes by adding the relevant flags.

printf '%s\n' "foo" | mail -:x -dvv -s "Subject" salkay 2>/tmp/mail.log

However, after adding these, the script just works perfectly when autostarted! Hence, I can't get any detailed information about why it might be freezing the system (without the flags). I'd like to fix it in theory, but I guess this "workaround" will do. I'm slightly concerned that there's a bigger bug somewhere though, and the workaround won't last forever. (It also took me several hours to work out why my computer wasn't starting!)

I'm not using a desktop manager, but starting KDE Plasma manually with startx from the TTY. I'm using the latest s-nail 14.9.23-1.

Last edited by Salkay (2022-06-04 10:55:22)

Offline

#2 2022-05-23 18:56:01

dogknowsnx
Member
Registered: 2021-04-12
Posts: 648

Re: [UNSOLVED] S-nail mail freezes system when autostarted

Version 14.9.24-1 is available in the testing repo (since March 31st...)


RI - Rest your Eyes and Self

"We are eternal, all this pain is an illusion" - Maynard James Keenan

Offline

#3 2022-05-24 11:21:40

Salkay
Member
Registered: 2014-05-22
Posts: 619

Re: [UNSOLVED] S-nail mail freezes system when autostarted

The latest s-nail 14.9.24-1 also has this problem.

However, I just realised that the -d flag puts s-nail in sandbox mode, so the mail wasn't actually being sent. When I remove it, the mail is indeed sent when I test manually, and with autostart it freezes the system again.

Here is the STDERR from the command.

mail: COMMAND <set> autocollapse
mail: COMMAND <set> append
mail: COMMAND <set> asksend
mail: COMMAND <set> crt
mail: COMMAND <set> editheaders
mail: COMMAND <set> emptystart
mail: COMMAND <set> fullnames
mail: COMMAND <set> history-gabby=all history-gabby-persist
mail: COMMAND <set> hold
mail: COMMAND <set> indentprefix="> "
mail: COMMAND <set> followup-to-honour=ask-yes
mail: COMMAND <set> markanswered
mail: COMMAND <set> mime-counter-evidence=0b1111
mail: COMMAND <set> keep
mail: COMMAND <set> keepsave
mail: COMMAND <set> quote
mail: COMMAND <set> recipients-in-cc
mail: COMMAND <set> reply-to-honour=ask-yes
mail: COMMAND <set> sendcharsets=utf-8,iso-8859-1
mail: COMMAND <set> showname
mail: COMMAND <set> showto
mail: COMMAND <retain> date sender from to cc subject message-id mail-followup-to reply-to
mail: Warning -- v15-compat=yes will be default in v14.10.0!
mail: P(seudo)R(andom)N(umber)G(enerator): *TLS RAND_*
mail: Forking child with spawn control: 'exec handled by caller'   
LOG: MAIN
  Warning: purging the environment.
 Suggested action: use keep_environment.
LOG: MAIN
  <= salkay@salkay-hostname U=salkay P=local S=377
delivering 1ntSW4-0000EF-RU
LOG: MAIN
  => salkay <salkay@salkay-hostname> R=localuser T=local_delivery
LOG: MAIN
  Completed

(Apart from the random string,) I get the same STDERR whether running it successfully via the CLI, or whether freezing the system via autostart. I should also mention that autostart freezes the computer, but the mail is still sent.

Last edited by Salkay (2022-05-24 11:23:54)

Offline

Board footer

Powered by FluxBB