Nick Sinyakov
Nick Sinyakov

Reputation: 53

Qmail. Send email from Maildir\new folder

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

Upvotes: 0

Views: 467

Answers (1)

Nick Sinyakov
Nick Sinyakov

Reputation: 53

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 [email protected] -a [email protected] <"$file"
done

And execute it: # bash script_name

Upvotes: 0

Related Questions