Fix mail queue and logs commands
- Hardcode paths: /usr/sbin/postqueue, /usr/sbin/postsuper, /usr/bin/journalctl - Fix postqueue: remove -p flag (conflicts with -j) - Add stderr logging for queue errors
This commit is contained in:
parent
d56722ddb9
commit
060f88dffe
3 changed files with 14 additions and 8 deletions
|
|
@ -1,6 +1,7 @@
|
|||
package handlers
|
||||
|
||||
import (
|
||||
"log"
|
||||
"net/http"
|
||||
|
||||
"github.com/imc-vibe/backend/internal/mail"
|
||||
|
|
@ -20,7 +21,8 @@ func (h *QueueHandler) List(w http.ResponseWriter, r *http.Request) {
|
|||
|
||||
entries, err := mail.GetQueue()
|
||||
if err != nil {
|
||||
Error(w, http.StatusServiceUnavailable, "mail queue tools not available")
|
||||
log.Printf("Queue error: %v", err)
|
||||
Error(w, http.StatusServiceUnavailable, "failed to get queue: "+err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue