Forward and delete

Ben51

New member
Joined
Apr 9, 2018
Messages
3
I need to setup a full e-mail accounts in DirectAdmin (so not only a forwarding account) and I want to set up a forwarding for these e-mail accounts that deletes the forwarded e-mails.
There seems to no "Forward and delete" option in DirectAdmin. A cronjob could do the job of course, but what script can I use that purges all e-mailboxes in a domain?
 
There seems to no "Forward and delete" option in DirectAdmin.
If you are using the same e-mail adresses as forwarders as for the real accounts, then you would also be deleting the email in the real account, because in that case forwarded mails are only saved in the existing email box.

Example:
[email protected]
forwarder [email protected] -> [email protected]

Now any email to [email protected] is saved to the inbox of [email protected] and at the same time forwarded to [email protected]
So deleting the forwarded mail means that the original mail is deleted as if it's not send to the inbox, just as with a forwarder only account.

That's why there is no "forward and delete" option, because that can already be achieved by using a forward only account.

When using a script to purge all e-mail boxes anyway, why don't you use a forward-only account then?
 
Thanks Richard, but you do not understand my question.

If I use a forward-only account, than I can only use that account as "forward-only".
I have to use real accounts with which I can send and receive e-mails. And the received e-mails should be forwarded. Because these are "real" accounts, the forwarded e-mails are saved. But after forwarding they should be deleted.

The question (again) is: what script can I use to purge my e-mailaccounts? I need such a script because DirectAdmin does not have a "forward and delete" option (which is quite common, but not in DirectAdmin).

Regards,
Ben
 
Have to use real accounts

Thanks for your answer, but I have to use real e-mailaccount with which I can send and receive e-mails. But I want the received e-mails to be redirected to external accounts, so forwarded. After being forwarded they can be deleted from the internal account. On all websites that I used (that did not work with DirectAdmin) there was a simple ("Forward and then delete") option available. Not in DirectAdmin.

A simple workaround could be a cronjob that, with intervals, purges the mailboxes of my website. They may all be purged, because everything is forwarded to external accounts.

Can someone tell me what script to use? That's my only question ...

Regards
Ben
 
Sieve filtering can be used here. You need to build Dovecot with pigeonhole support.
 
Back
Top