- Dovecot quota - check mailbox free space through Dovecot api before accepting mail
- Dovecot auth - authenticate through Dovecot api
- RCPT Database - *EXAMPLE* plugin to check if recipient is in database
- Remove headers - remove headers from outgoing emails due privacy or redundancy
Remove headers
Download
#!perl -w =head1 NAME remove_headers - remove headers from outgoing emails due privacy or redundancy =head1 AUTHOR Copyright (c) 2015 Stanislav Humplik (stanislav@analogic.cz) http://poste.io This plugin is free software; you can distribute it and/or modify it under the terms of the General Public License v3. =cut use strict; use warnings; use Qpsmtpd::Constants; use Qpsmtpd::DSN; sub hook_queue_pre { my ($self, $transaction) = @_; if($self->is_immune) { $transaction->header->delete('Authentication-Results'); # privacy $transaction->header->delete('X-Virus-Checked'); $transaction->header->delete('X-Virus-Found'); # rendundant, if virus found we block transaction anyway $transaction->header->delete('X-HELO'); # privacy $transaction->header->delete('User-Agent'); # privacy my $received = $transaction->header->get('Received'); $transaction->header->delete('Received'); my $me = $self->qp->config('me'); $received =~ s/from ([^ ]+)/from $me/; $received =~ s/HELO ([^ \)]+)\)\s*\([^ \)]+\)/HELO $me\) \(127.0.0.1\)/; $transaction->header->add('Received', $received); } return OK; }