aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--main.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/main.go b/main.go
index 026ef0a..5b76871 100644
--- a/main.go
+++ b/main.go
@@ -28,6 +28,7 @@ func processFeed(feed *feed.Feed, cfg *config.Config, client *imap.Client, wg *s
}
if len(mails) == 0 {
+ feed.MarkSuccess()
return
}
@@ -43,6 +44,8 @@ func processFeed(feed *feed.Feed, cfg *config.Config, client *imap.Client, wg *s
}
log.Printf("Uploaded %d messages to '%s' @ %s", len(mails), feed.Name, folder)
+
+ feed.MarkSuccess()
}
func run() error {
@@ -82,6 +85,8 @@ func run() error {
return fmt.Errorf("No successfull feed fetch.")
}
+ state.Filter()
+
imapUrl, err := url.Parse(cfg.Target)
if err != nil {
return fmt.Errorf("parsing 'target': %w", err)