0

I have a bunch of emails within .../Maildir/new folder. How to send them via qmail?

Also maybe you can advise how to block all emails from specific domain? I've tried to block using control/badmailfrom file, but seems that it doesn't work

.*\ @.*
!.*@.*\..*
.*%.*
@domain.com

Thanks in advance, Nick

Nick Sinyakov
  • 53
  • 1
  • 8

1 Answers1

0

The answer how to send emails from /Maildir/new folder below:

Create a new script:

for file in /var/vpopmail/domains/.../username/Maildir/new/* ; do
qmail-inject -f mail@domain.com -a wheretosend@domain.com <"$file"
done

And execute it: # bash script_name

Nick Sinyakov
  • 53
  • 1
  • 8