[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Poco Forums • View topic - Can autobounce bounce everything in a certain mailbox?

Can autobounce bounce everything in a certain mailbox?

Scripting questions and ideas

Moderators: Eric, Tomas, robin, Michael

Can autobounce bounce everything in a certain mailbox?

Postby mlewis » Wed Oct 10, 2007 4:58 am

I'm using poco 3.4.

I would like to have a command that would take all of the emails I've placed into a specific mailbox, bounced to another email address.

Either automatically when I put email in there, or on a timer that does it every now and then or even manually would be fine.

Can autobounce do this and if so, what do I need to change?

Thanks.

Mike
mlewis
Drop-in Visitor
 
Posts: 9
Joined: Wed Oct 10, 2007 4:54 am

Re: Can autobounce bounce everything in a certain mailbox?

Postby Eric » Thu Oct 11, 2007 7:00 am

Hi Mike & welcome to Poco Forums, :D
mlewis wrote:Can autobounce do this and if so, what do I need to change?
Do have a look at Extras for the autobounce script.

Sorry for the late reply, very busy at present. :?
Eric
 

Re: Can autobounce bounce everything in a certain mailbox?

Postby mlewis » Thu Oct 11, 2007 7:46 am

Eric wrote:Hi Mike & welcome to Poco Forums, :D
mlewis wrote:Can autobounce do this and if so, what do I need to change?
Do have a look at Extras for the autobounce script.

Sorry for the late reply, very busy at present. :?


I did, that's why I'm asking :).
mlewis
Drop-in Visitor
 
Posts: 9
Joined: Wed Oct 10, 2007 4:54 am

Re: Can autobounce bounce everything in a certain mailbox?

Postby Eric » Thu Oct 11, 2007 7:58 am

mlewis wrote:I did, that's why I'm asking :).
:oops: Sorry, didn't know.

As explained on that page you can run that script also manually, so you could create a manual filter to test it out.

That's the best way to find out if it works for you. :wink:
Eric
 

Re: Can autobounce bounce everything in a certain mailbox?

Postby mlewis » Thu Oct 11, 2007 10:25 pm

Eric wrote:As explained on that page you can run that script also manually, so >you could create a manual filter to test it out.
That's the best way to find out if it works for you. :wink:

I'm not a programmer so I'd have tp spend god knows how long on this. I need help, tips input :).

In my case, from the script;

External $userdata1 "Match messages if sent to" "sales"

I don't need it to check for whom it's from, but which mailbox it is in. If in that mailbox, then send off to specified email address.

- I need to make it bounce, not forward.
-I've taken out $userdata1 so that it doesn't exit if it doesn't find the uer "sales".
-Problem; Sends out as the spam user who sent in. This means my email server rejects user since he/she doesn't exist.

Mike
mlewis
Drop-in Visitor
 
Posts: 9
Joined: Wed Oct 10, 2007 4:54 am

Re: Can autobounce bounce everything in a certain mailbox?

Postby Eric » Fri Oct 12, 2007 12:16 am

mlewis wrote:I'm not a programmer so I'd have tp spend god knows how long on this. I need help, tips input :).
I'm not a programmer either, so I can't help further with this script.

I'll move this entire thread to PocoScript, so it will get better attention Mike. :wink:
Eric
 

Postby Michael » Fri Oct 12, 2007 12:59 am

You could have simply entered "@" in the userdata1 field to have it recognize any email address.

Controlling the script for a given mailbox could be done by adding an "OnAdd" filter for the particuilar mailbox.

How do you want to control this for spammers? Could you bounce only those message from people who are in your address book? If this is the case you can add a condition to check this in the event filter that controls running the script.
Michael
Moderator
 
Posts: 866
Joined: Mon Jul 26, 2004 12:14 pm
Location: Victoria BC, Canada

Postby mlewis » Fri Oct 12, 2007 1:54 am

Hi Michael,

>You could have simply entered "@" in the userdata1 field to have >it recognize any email address.

No problem, I've done that now.

>Controlling the script for a given mailbox could be done by adding >an "OnAdd" filter for the particuilar mailbox.

Any example?

>How do you want to control this for spammers? Could you bounce >only those message from people who are in your address book?
>If this is the case you can add a condition to check this in the >event filter that controls running the script.

I manually place the emails I consider spam into a 'spam' mailbox I've created because no spam filter is 100% accurate.

I want to run this on that mailbox only and process only the emails in that box.

Mike
mlewis
Drop-in Visitor
 
Posts: 9
Joined: Wed Oct 10, 2007 4:54 am

Postby Michael » Fri Oct 12, 2007 10:51 am

Do you manually move messages into that mailbox or are there automated filters that move the messages? If you do have automated ones is the filter criteria such that no spammer's message will get into the mailbox?

"On Add" filters are created using the "Events" feature. From the "Tools" menu select "Events...". Press the "New event" button. Now you have to make a decision...

a) If you want to run the filter every time a message is added to the mailbox, regardless of who sent it, what subject the message has, etc then select "Run the following script" from the "Event action" drop down list. Next choose the script you want to add in the "Target" drop down list.

OR

b) If you want to add conditions to control which messages will be bounced then select "Run this filter" in the "Event action" box and then use the "Setup" button that appears next to the target to define the filter conditions. The action will be to run a script.

Regardless of which option you choose you must also:
1. Check the "Run only for a specific folder" check box AND
2. Select the folder from the drop down "Folder" list.

If you have sub-folders beneath the folder then, depending on whether or not you want the same process to run for them (i.e., bounce the message to the same recipient(s)) then you may want to check the "Include all folders parented by this folder" box.

I hope this helps, events are a very powerful but fairly obscure feature of Poco/Barca.
Michael
Moderator
 
Posts: 866
Joined: Mon Jul 26, 2004 12:14 pm
Location: Victoria BC, Canada

Postby mlewis » Sun Oct 14, 2007 1:27 am

>Do you manually move messages into that mailbox or are there >automated filters that move the messages?

No, I have no need for anything automated. I move them into the spam mailbox I created, manually.

I just need them to bounce to another email address automatically so that I don't have to open and bounce every single one.

Should be nothing too special, just bounce anything I manually put into a certain mailbox. In my case, a new mb I call spam.

I'll take a look at all of this, thanks very much.

Mike
mlewis
Drop-in Visitor
 
Posts: 9
Joined: Wed Oct 10, 2007 4:54 am

Postby mlewis » Mon Oct 15, 2007 2:51 am

Guess I just have too many things going on at once. I followed your directions but can't get anywhere near getting this to work. In fact, there is no option to bounce in the list of cuntions once I set up the event.

Mike
mlewis
Drop-in Visitor
 
Posts: 9
Joined: Wed Oct 10, 2007 4:54 am

Postby chrisretusn » Mon Oct 15, 2007 10:25 am

Mike,

I just tested this using Slaven's AutoBounce script in Extras

Here is a couple of screen shots of my test setup. First the OnAdd event. Change Folder: to your "spam" mailbox folder that you created for the autobounces.

Image

Next the autobounce script. Only changes you need to make are in the script setup as shown below. Just add the address you are bouncing your messages to. If you want the messages to delete after the task is done change the Yes to No

Image

As you manually move messages to your spam folder they will be modified (To: address changed to your bounce address) and queued (placed in your Outbox) for sending.

All you need to do next is Send Queued Messages (Ctrl-Y). If you have "Send queued messages when checking mail" checked in Options they will be sent on the next check.

Hope this is what you are looking for.
Chris

PocoMail 4.8.0.4400 running in Slackware64 w/Wine
chrisretusn
Poco Enthusiast
 
Posts: 284
Joined: Tue May 24, 2005 12:09 am
Location: Philippines

Postby Michael » Tue Oct 16, 2007 12:47 am

Just following up, Chris' instructions are exactly what you need to do. Thanks Chris, and especially for the bit about the messages being queued in the Out box rather than being sent immediately.
Michael
Moderator
 
Posts: 866
Joined: Mon Jul 26, 2004 12:14 pm
Location: Victoria BC, Canada

Postby mlewis » Tue Oct 16, 2007 6:53 am

Thank you for the detailed reply. This helped to confirm that I had in fact done it right but had not figured out the control-y to send.

My next problem is that I need to send them out using only one mail server. They aren't making it out because the mail server is not recognizing the user.

Is there a way to tell the script to replace user's with a specific outgoing user@domain?

When the script tries to send out, the mail server won't accept the connection as it's not from a known user. I need to make the FROM email address one which will be allowed by my server.


Mike
mlewis
Drop-in Visitor
 
Posts: 9
Joined: Wed Oct 10, 2007 4:54 am

Postby Michael » Thu Oct 18, 2007 2:56 pm

You need to replace the "X-Account:" header in the message. Check out the DeleteHeader and AddHeader commands.
Michael
Moderator
 
Posts: 866
Joined: Mon Jul 26, 2004 12:14 pm
Location: Victoria BC, Canada

Next

Return to PocoScript Help and How-To

Who is online

Users browsing this forum: No registered users and 2 guests

cron