1
0
mirror of https://blitiri.com.ar/repos/chasquid synced 2025-12-22 15:27:02 +00:00

Implement couriers

This patch introduces the couriers, which the queue uses to deliver mail.

We have a local courier (using procmail), a remote courier (uses SMTP), and a
router courier that decides which of the two to use based on a list of local
domains.

There are still a few things pending, but they all have their basic
functionality working and tested.
This commit is contained in:
Alberto Bertogli
2015-11-06 02:03:21 +00:00
parent e5c2676f83
commit 77d547288f
10 changed files with 639 additions and 25 deletions

View File

@@ -35,7 +35,23 @@ func (t *Trace) SetError() {
func (t *Trace) Errorf(format string, a ...interface{}) error {
err := fmt.Errorf(format, a...)
t.t.SetError()
t.LazyPrintf("Error: %v", err)
t.t.LazyPrintf("error: %v", err)
if glog.V(2) {
msg := fmt.Sprintf("%p %s %s: error: %v", t, t.family, t.title, err)
glog.InfoDepth(1, msg)
}
return err
}
func (t *Trace) Error(err error) error {
t.t.SetError()
t.t.LazyPrintf("error: %v", err)
if glog.V(2) {
msg := fmt.Sprintf("%p %s %s: error: %v", t, t.family, t.title, err)
glog.InfoDepth(1, msg)
}
return err
}