Warren wrote:

Jake Vickers wrote:

Warren wrote:

Can't do that - the [EMAIL PROTECTED] account is an active account used by a person who gets inundated with these emails (electronic faxes actually), so I need to trap the emails on the way in based on the sender.

W

Gabriel Lai - E Technology wrote:

hmmm..... i think a simple way of doing is you create another [EMAIL PROTECTED] account, then forward the emails to your [EMAIL PROTECTED] account..... :)

----- Original Message ----- From: "Warren" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Wednesday, May 31, 2006 10:21 PM
Subject: [qmailtoaster] How to redirect mail based on "from" address?


I am getting automated emails sent from two of my vendors sent to the wrong email address. They are sent to [EMAIL PROTECTED] and should be going to [EMAIL PROTECTED] (obviously not literally those addresses). They always come from the same email address [EMAIL PROTECTED]

How can I tell qmail to deliver all emails from [EMAIL PROTECTED] to [EMAIL PROTECTED]

I have never tried it, but look at the maildrop man pages. A sample script (that sent copies of emails to the Spam folder and deleted the original) should still be in /etc/mail/mailfilter. If not, I can supply the script. This should point you in the right direction to do what you want, I think.

---------------------------------------------------------------------
    QmailToaster hosted by: VR Hosted <http://www.vr.org>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

This looks like the right way to go. If I have this correct, I should make a .mailfilter file in wronguser's home directory, check for the sender and if it is found, use
to "|/var/qmail/bin/qmail-inject -a [EMAIL PROTECTED]"
to deliver the mail to the proper user.  My question then is this...
How do I gain access to the mail itself to check the header? Is there a variable that contains the header or the full email? Is it a file somewhere?

TIA,
W


---------------------------------------------------------------------
    QmailToaster hosted by: VR Hosted <http://www.vr.org>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

OK - I think I have it. I'll let you know and post the result when it works in case it is of use to anyone else.

W

---------------------------------------------------------------------
    QmailToaster hosted by: VR Hosted <http://www.vr.org>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to